TYPO3
7.6
|
Public Member Functions | |
addRoute ($routeIdentifier, $route) | |
getRoutes () | |
match ($pathInfo) | |
matchRequest (ServerRequestInterface $request) | |
Protected Attributes | |
$routes = array() | |
Implementation of a class for adding routes, collecting throughout the Bootstrap to register all sorts of Backend Routes, and to fetch the main Collection in order to resolve a route (see ->match() and ->matchRequest()).
Ideally, the Router is solely instantiated and accessed via the Bootstrap, the RequestHandler and the UriBuilder.
See for more details on route matching() and Bootstrap->initializeBackendRouting().
The architecture is inspired by the Symfony Routing Component.
Definition at line 31 of file Router.php.
addRoute | ( | $routeIdentifier, | |
$route | |||
) |
Adds a new route with the identifiers
string | $routeIdentifier | |
Route | $route |
Definition at line 46 of file Router.php.
getRoutes | ( | ) |
Fetch all registered routes, only use in UriBuilder
Definition at line 56 of file Router.php.
References Router\$routes.
match | ( | $pathInfo | ) |
Tries to match a URL path with a set of routes.
string | $pathInfo | The path info to be parsed |
ResourceNotFoundException | If the resource could not be found |
Definition at line 68 of file Router.php.
Referenced by Router\matchRequest().
matchRequest | ( | ServerRequestInterface | $request | ) |
Tries to match a URI against the registered routes
ServerRequestInterface | $request |
Definition at line 87 of file Router.php.
References ServerRequestInterface\getAttribute(), and Router\match().
|
protected |
Definition at line 38 of file Router.php.
Referenced by Router\getRoutes().