public function method($method = null, $path = '/')
    {
        $parameters = array();

        $parameters['path'] = $path;

        if($method)
            $parameters['method'] = $method;

        $route = $this->factory->createRoute($this, null, $parameters);

        $this->addRoute($route);

        return $route;
    }
public function method($method = null, $path = '/')
    {
        $parameters = array();

        $parameters['path'] = $path;

        if($method)
            $parameters['method'] = $method;

        $route = $this->factory->createRoute($this, null, $parameters);

        $this->addRoute($route);

        return $route;
    }
public function method ( $ method = null , $ path = '/' ) { $ parameters = array ( ) ; $ parameters [ 'path' ] = $ path ; if ( $ method ) $ parameters [ 'method' ] = $ method ; $ route = $ this -> factory -> createRoute ( $ this , null , $ parameters ) ; $ this -> addRoute ( $ route ) ; return $ route ; }
Create a route by given methods
@param string|array method
@param string $path
@return \Exedra\Routing\Route
Create a route by given methods