src/Router/Router.php
public function add($method, $name, $path, $controller = null, array $requirements = [],
                        array $options = [], $host = '', array $schemas = [], $condition = '')
    {
        if (!in_array(strtoupper($method), $this->allowedMethod)) {
            throw new HttpMethodNotAllowedException();
        }
        $this->routes->add(
            $name,
            new Route(
                $this->prefix . $path,
                ['_controller' => $controller],
                $requirements,
                $options,
                $host,
                $schemas,
                [strtoupper($method)],
                $condition
            )
        );
        return $this;
    }
public function add($method, $name, $path, $controller = null, array $requirements = [],
                        array $options = [], $host = '', array $schemas = [], $condition = '')
    {
        if (!in_array(strtoupper($method), $this->allowedMethod)) {
            throw new HttpMethodNotAllowedException();
        }
        $this->routes->add(
            $name,
            new Route(
                $this->prefix . $path,
                ['_controller' => $controller],
                $requirements,
                $options,
                $host,
                $schemas,
                [strtoupper($method)],
                $condition
            )
        );
        return $this;
    }
public function add ( $ method , $ name , $ path , $ controller = null , array $ requirements = [ ] , array $ options = [ ] , $ host = '' , array $ schemas = [ ] , $ condition = '' ) { if ( ! in_array ( strtoupper ( $ method ) , $ this -> allowedMethod ) ) { throw new HttpMethodNotAllowedException ( ) ; } $ this -> routes -> add ( $ name , new Route ( $ this -> prefix . $ path , [ '_controller' => $ controller ] , $ requirements , $ options , $ host , $ schemas , [ strtoupper ( $ method ) ] , $ condition ) ) ; return $ this ; }
add a route rule

@param string $method
@param string $name
@param string $path
@param string $controller
@param array  $requirements
@param array  $options
@param string $host
@param array  $schemas
@param string $condition
@return $this
@throws HttpMethodNotAllowedException
add a route rule