Beispiel #1
0
 public function __invoke(ModuleEvent $e)
 {
     $module = $e->getModule();
     if (is_callable(array($module, 'init'))) {
         $module->init($e->getTarget());
     }
 }
Beispiel #2
0
 /**
  * @param \Zend\Module\ModuleEvent $e
  * @return void
  */
 public function __invoke(ModuleEvent $e)
 {
     $module = $e->getModule();
     if (!$module instanceof BootstrapListenerInterface) {
         return;
     }
     $moduleManager = $e->getTarget();
     $events = $moduleManager->events();
     $sharedEvents = $events->getSharedManager();
     $sharedEvents->attach('bootstrap', 'bootstrap', array($module, 'onBootstrap'));
 }