src/Bihan/Application.php
/**
     * Adds an event listener that listens on the specified events.
     *
     * @param string   $eventName The event to listen on
     * @param callable $callback  The listener
     * @param int      $priority  The higher this value, the earlier an event
     *                            listener will be triggered in the chain (defaults to 0)
     */
Adds an event listener that listens on the specified events.
@param string   $eventName The event to listen on
@param callable $callback  The listener
@param int      $priority  The higher this value, the earlier an event
listener will be triggered in the chain (defaults to 0)
Adds an event listener that listens on the specified events . @param string $eventName The event to listen on @param callable $callback The listener @param int $priority The higher this value the earlier an event listener will be triggered in the chain ( defaults to 0 )
public function on($eventName, $callback, $priority = 0)
    {
        if ($this->booted) {
            $this['dispatcher']->addListener($eventName, $callback, $priority);
            return;
        }
        $this->extend('dispatcher', function (EventDispatcherInterface $dispatcher, $app) use ($callback, $priority, $eventName) {
            $dispatcher->addListener($eventName, $callback, $priority);
            return $dispatcher;
        });
    }
public function on ( $ eventName , $ callback , $ priority = 0 ) { if ( $ this -> booted ) { $ this [ 'dispatcher' ] -> addListener ( $ eventName , $ callback , $ priority ) ; return ; } $ this -> extend ( 'dispatcher' , function ( EventDispatcherInterface $ dispatcher , $ app ) use ( $ callback , $ priority , $ eventName ) { $ dispatcher -> addListener ( $ eventName , $ callback , $ priority ) ; return $ dispatcher ; } ) ; }
Adds an event listener that listens on the specified events.
Adds an event listener that listens on the specified events .