Autarky\Routing\RouterInterface::addRoute PHP Method

addRoute() public method

Add a route to the router.
public addRoute ( string | array $method, string $path, string $handler, string $name = null )
$method string | array HTTP methods the route should respond to
$path string Relative URL the route should respond to. Parameters wrapped in }
$handler string string of "class:method" or "global_function"
$name string Route name (optional)
    public function addRoute($method, $path, $handler, $name = null);