public function addRoute($method, $path, $action)
    {
        $route = (new Route($this->conditions, $this->container))
            ->setMethods($method)
            ->setPath($path)
            ->setAction($action)
            ->setRouter($this);

        return $this->routes->add($route);
    }
public function addRoute($method, $path, $action)
    {
        $route = (new Route($this->conditions, $this->container))
            ->setMethods($method)
            ->setPath($path)
            ->setAction($action)
            ->setRouter($this);

        return $this->routes->add($route);
    }
public function addRoute ( $ method , $ path , $ action ) { $ route = ( new Route ( $ this -> conditions , $ this -> container ) ) -> setMethods ( $ method ) -> setPath ( $ path ) -> setAction ( $ action ) -> setRouter ( $ this ) ; return $ this -> routes -> add ( $ route ) ; }
Create route and store it in routes collection.

@param array $method
@param string $path
@param string|callable $action

@return \Assely\Routing\Route
Create route and store it in routes collection .