src/ItemCollectors/EventHandlerCollector.php
public function handle(string $event, callable $callback): Route
    {
        $route = $this->data
            ->createRoute($event, $callback)
            ->set('priority', $this->crtPriority);

        $this->data->sort();

        return $route;
    }
public function handle(string $event, callable $callback): Route
    {
        $route = $this->data
            ->createRoute($event, $callback)
            ->set('priority', $this->crtPriority);

        $this->data->sort();

        return $route;
    }
public function handle ( string $ event , callable $ callback ) : Route { $ route = $ this -> data -> createRoute ( $ event , $ callback ) -> set ( 'priority' , $ this -> crtPriority ) ; $ this -> data -> sort ( ) ; return $ route ; }
Register a new event handler

@param   string $event Event name
@param   callable $callback A callback that will be executed

@return  Route
Register a new event handler