Avolutions\Routing\Router
The Router class find the matching Route for the url of the Request.
Methods
Method | Visibility | Description |
---|---|---|
__construct() | public | Creates a new Router instance. |
findRoute() | public | Finds the matching Route from the RouteCollection by the passed uri/path and method. |
Method Details
__construct()
Creates a new Router instance.
public
__construct(RouteCollection $RouteCollection) : mixed
Parameters
RouteCollection
$RouteCollection
RouteCollection instance.
findRoute()
Finds the matching Route from the RouteCollection by the passed uri/path and method.
public
findRoute(string $path, string $method) : Route|null
Parameters
string
$path
The requested uri/path
string
$method
The method of the request