Router
Table of Contents
- $routes : array<string|int, array<string|int, Route>>
- dispatch() : Route
- Dispatch request to predefined routes.
- getRoutes() : array<string|int, array<string|int, mixed>>
- Returns all registered routes.
- register() : Router
- Register router HTTP request.
Properties
$routes
private
array<string|int, array<string|int, Route>>
$routes
= array()
Methods
dispatch()
Dispatch request to predefined routes.
public
dispatch(Request $request) : Route
Parameters
- $request : Request
Return values
Route —getRoutes()
Returns all registered routes.
public
getRoutes() : array<string|int, array<string|int, mixed>>
Return values
array<string|int, array<string|int, mixed>> —register()
Register router HTTP request.
public
register(Route $route) : Router
Parameters
- $route : Route