Basic
Less than 1 minute
Basic
Basic Application Router.
This router is a basic router that will evaluate the request path and set the controller, action, and arguments from a simple formatted path.
A path should be formatted as /controller/action/arg1/arg2/arg3
This will set the controller to 'Controller', the action to 'action', and the arguments to ['arg1', 'arg2', 'arg3'] which will result in the \Application\Controller\Controller::action('arg1', 'arg2', 'arg3') method being called.
Methods
initialise
Initialises the basic router.
public initialise(Router $router): bool
Parameters
Parameter | Type | Description |
---|---|---|
$router | Router |
evaluateRequest
Evaluates the request and sets the controller, action, and arguments based on the request path.
public evaluateRequest(Request $request): ?Route
Parameters
Parameter | Type | Description |
---|---|---|
$request | Request | the request object |
Generated by Hazaar API Doc Generator