library zf2-doctrine2-autoflush
25th/zf2-doctrine2-autoflush
- Thursday, July 31, 2014
- by dready
- Repository
- 8 Watchers
- 1 Stars
- 8,324 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 1 % Grown
ZF2 Doctrine2 AutoFlushListener
Installation
Just attach an instance of the AutoFlushListener to the event manager like in the following code example:, (*1)
class Module
{
/**
* @param MvcEvent $e MVC Event
*/
public function onBootstrap(MvcEvent $e)
{
$eventManager = $e->getApplication()->getEventManager();
$eventManager->attachAggregate(new AutoFlushListener());
}
}