protected function addRoute($method, $pattern, $callback, array $middleware = null, $name = null)
    {
        $concatenatedPattern = (!is_null($this->prefix) ? '/' . $this->prefix : '') .
            $pattern;

        $this->collector->addRoute(strtoupper($method), $concatenatedPattern, new Route($callback, $middleware));

        if ($name !== null) {
            $this->namedRoutes[$name] = $concatenatedPattern;
        }
    }
protected function addRoute($method, $pattern, $callback, array $middleware = null, $name = null)
    {
        $concatenatedPattern = (!is_null($this->prefix) ? '/' . $this->prefix : '') .
            $pattern;

        $this->collector->addRoute(strtoupper($method), $concatenatedPattern, new Route($callback, $middleware));

        if ($name !== null) {
            $this->namedRoutes[$name] = $concatenatedPattern;
        }
    }
protected function addRoute ( $ method , $ pattern , $ callback , array $ middleware = null , $ name = null ) { $ concatenatedPattern = ( ! is_null ( $ this -> prefix ) ? '/' . $ this -> prefix : '' ) . $ pattern ; $ this -> collector -> addRoute ( strtoupper ( $ method ) , $ concatenatedPattern , new Route ( $ callback , $ middleware ) ) ; if ( $ name !== null ) { $ this -> namedRoutes [ $ name ] = $ concatenatedPattern ; } }
Proxies the route definition with the backend routing library

@param string $method
@param string $pattern
@param callable $callback
@param array $middleware
@param null  $name
Proxies the route definition with the backend routing library