Router
Table of Contents
- $maxReroutes : int
- $reroutes : int
- $routeDispatcher : Dispatcher|null
- execute() : mixed
- executeControllerAction() : mixed
- executePath() : mixed
- Executes an action for a specified path
- reroute() : void
- Tries to reroute the request using FastRoute first, if the route does not exist, it falls back to the ZubZet framework.
- getRouteDispatcher() : Dispatcher
Properties
$maxReroutes
public
int
$maxReroutes
= 10
Number of reroutes the controller can perform before aborting
$reroutes
public
int
$reroutes
= 0
Number of times this request was rerouted
$routeDispatcher
private
Dispatcher|null
$routeDispatcher
= null
Methods
execute()
public
execute([array<string|int, mixed>|null $customUrlParts = null ]) : mixed
Parameters
- $customUrlParts : array<string|int, mixed>|null = null
Return values
mixed —executeControllerAction()
public
executeControllerAction(mixed $controller, mixed $action[, array<string|int, mixed> $params = [] ][, array<string|int, mixed> $arguments = [] ]) : mixed
Parameters
- $controller : mixed
- $action : mixed
- $params : array<string|int, mixed> = []
- $arguments : array<string|int, mixed> = []
Return values
mixed —executePath()
Executes an action for a specified path
public
executePath(array<string|int, mixed> $parts) : mixed
Parameters
- $parts : array<string|int, mixed>
-
Example: ["auth", "login"]
Return values
mixed —reroute()
Tries to reroute the request using FastRoute first, if the route does not exist, it falls back to the ZubZet framework.
public
reroute(array<string|int, mixed> $parts) : void
Parameters
- $parts : array<string|int, mixed>
-
The parts of the new route. Example: ["auth", "login"]
Return values
void —getRouteDispatcher()
private
getRouteDispatcher() : Dispatcher