private function addRoute($name, array $route)
    {
        $this->rawRoutes[$name] = $route;

        $newRoute = new Route(
                $route['pattern'],
                $route['defaults'],
                array_key_exists('requirements', $route) ? $route['requirements'] : []
        );

        $this->add($name, $newRoute);

        $this->log('debug', sprintf('Route `%s` with pattern `%s` defined.', $name, $route['pattern']));
    }
private function addRoute($name, array $route)
    {
        $this->rawRoutes[$name] = $route;

        $newRoute = new Route(
                $route['pattern'],
                $route['defaults'],
                array_key_exists('requirements', $route) ? $route['requirements'] : []
        );

        $this->add($name, $newRoute);

        $this->log('debug', sprintf('Route `%s` with pattern `%s` defined.', $name, $route['pattern']));
    }
private function addRoute ( $ name , array $ route ) { $ this -> rawRoutes [ $ name ] = $ route ; $ newRoute = new Route ( $ route [ 'pattern' ] , $ route [ 'defaults' ] , array_key_exists ( 'requirements' , $ route ) ? $ route [ 'requirements' ] : [ ] ) ; $ this -> add ( $ name , $ newRoute ) ; $ this -> log ( 'debug' , sprintf ( 'Route `%s` with pattern `%s` defined.' , $ name , $ route [ 'pattern' ] ) ) ; }
Adds a new route to the collection.

@param string $name  The name of the new route.
@param array  $route The array description of the route.
Adds a new route to the collection .