Issue #273 #274

* Implemented Votes and service to manage them
* Refactored cache methods. Placed in its own class
* Added eventDispatcher with comment and votes events
* Added eventListener for empty cache
* Tested component and bundle
great :) let's discuss this!

On 18 September 2014 12:37, Aldo Chiecchia <notifications@github.com> wrote:

> In src/Elcodi/Component/Comment/Entity/VotePackage.php:
>
> > + *
> > + * For the full copyright and license information, please view the LICENSE
> > + * file that was distributed with this source code.
> > + *
> > + * Feel free to edit as you please, and have fun.
> > + *
> > + * @author Marc Morera <yuhu@mmoreram.com>
> > + * @author Aldo Chiecchia <zimage@tiscali.it>
> > + */
> > +
> > +namespace Elcodi\Component\Comment\Entity;
> > +
> > +use Elcodi\Component\Comment\Entity\Interfaces\VoteInterface;
> > +
> > +/**
> > + * Class VotePackage
>
> VotableTrait (o some role interface) ? A strategy? The problem with the
> VotePackage is that it computes the aggregate (sum) of the votes each
> time. It relies on AbstractCacheWrapper and voting up or down means
> changing the calculated aggregate in the cached object or a whole new run
> of getCommentVotes.
> Anyway, it's better to open a new PR for discussing this topic
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/elcodi/elcodi/pull/277/files#r17719972>.
>



-- 


*Marc Morera  **I*  Web Architect

yuhu@mmoreram.com

http://mmoreram.com <http://elcodi.com/>


*Elcodi* co-founder

mmoreram@elcodi.com

http://elcodi.io

*Symfony Barcelona* organizer
symfonybarcelona@gmail.com
http://symfony-barcelona.es

@Twitter <http://twitter.com/mmoreram> - @Linkedin
<http://linkedin.com/in/mmoreram> - @Github <http://github.com/mmoreram>