Example #1
0
 /**
  * Get all Listeners listening to this kind of event
  * 
  * @param Event $eventObject
  * @return Callable[] listeners associated with this event
  */
 protected function getListeners(Event $eventObject)
 {
     $listeners = $this->getOption(self::OPTION_LISTENERS);
     return isset($listeners[$eventObject->getName()]) ? $listeners[$eventObject->getName()] : array();
 }
Example #2
0
 public static function catchEvent(Event $event)
 {
     if ($event instanceof ResourceCreated) {
         self::getPermissionModel()->onResourceCreated($event->getResource());
     }
 }