Метод |
Описание |
|
__construct ( PHPRouter\RouteCollection $collection ) |
|
|
generate ( $routeName, array $params = [] ) : string |
Reverse route a named route |
|
match ( string $requestUrl, string $requestMethod = 'GET' ) : boolean | Route |
Match given request _url and request method and see if a route has been defined for it
If so, return route's target
If called multiple times |
|
matchCurrentRequest ( ) |
Matches the current request against mapped routes |
|
parseConfig ( array $config ) : Router |
Create routes by array, and return a Router object |
|
setBasePath ( $basePath ) |
Set the base _url - gets prepended to all route _url's. |
|