lib/Routing/Filters.php
public function register($eventType, callable $filter)
    {
        if (!isset($this->handlers[$eventType])) {
            $this->handlers[$eventType] = [];
        }

        $this->handlers[$eventType][] = $filter;
    }
public function register($eventType, callable $filter)
    {
        if (!isset($this->handlers[$eventType])) {
            $this->handlers[$eventType] = [];
        }

        $this->handlers[$eventType][] = $filter;
    }
public function register ( $ eventType , callable $ filter ) { if ( ! isset ( $ this -> handlers [ $ eventType ] ) ) { $ this -> handlers [ $ eventType ] = [ ] ; } $ this -> handlers [ $ eventType ] [ ] = $ filter ; }
Registers a filter function.

@param string $eventType The type of event, see constant values in Filters class. e.g. 'beforeRoute'.
@param callable $filter
Registers a filter function .