Exemple #1
0
 /**
  * Set the event manager instance used by this context
  *
  * @param   EventManagerInterface   $events
  * @return  \User\Authentication\Service
  */
 public function setEventManager(EventManagerInterface $events)
 {
     $events->setEventClass(__NAMESPACE__ . '\\Event');
     $events->attach(Event::EVENT_LOGIN, array($this, 'onLogin'), 1000);
     $events->attach(Event::EVENT_LOGOUT, array($this, 'onLogout'), 0);
     return parent::setEventManager($events);
 }
Exemple #2
0
 /**
  * Set the event manager instance used by this context
  *
  * @param   EventManagerInterface $events
  * @return  \User\Authentication\Service
  */
 public function setEventManager(EventManagerInterface $events)
 {
     $events->setEventClass(__NAMESPACE__ . '\\ModulesEvent')->attach(ModulesEvent::EVENT_MODULES, array($this, 'onModules'), 1000);
     return parent::setEventManager($events);
 }