Imbo\EventManager\EventInterface::getHandler PHP Method

getHandler() public method

Get the handler for the current event
public getHandler ( ) : string
return string
    function getHandler();

Usage Example

Example #1
0
 /**
  * Figure out which resources we have available and subscribe to them
  *
  * @param EventInterface $event
  */
 public function subscribe(EventInterface $event)
 {
     $resources = Resource::getAllResources();
     if ($this->params['additionalResources']) {
         $resources = array_merge($resources, $this->params['additionalResources']);
     }
     $events = [];
     foreach ($resources as $resource) {
         $events[$resource] = ['checkAccess' => 500];
     }
     $manager = $event->getManager();
     $manager->addCallbacks($event->getHandler(), $events);
 }
All Usage Examples Of Imbo\EventManager\EventInterface::getHandler