Basic
Basic
Basic Application Router.
class Basic extends \Hazaar\Application\Router\LoaderExtends: Hazaar\Application\Router\Loader
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 \App\Controllers\Controller::action('arg1', 'arg2', 'arg3') method being called.
Methods
evaluateRequest
Evaluates the request and sets the controller, action, and arguments based on the request path.
public evaluateRequest(Request $request): ?RouteReturns: Hazaar\Application\Route
Parameters
| Parameter | Type | Description |
|---|---|---|
$request | Hazaar\Application\Request | the request object |
getRoutes
Statically enumerates every route this loader can dispatch, by scanning the app's
public getRoutes(): arrayReturns: array
Controllers path and synthesizing one route per public method — see Hazaar\Application\Router\Loader::synthesizeRoutesForController. Not registered on the router (this loader's real Hazaar\Application\Router\Loader\Basic::evaluateRequest never consults the router's in-memory route table at all, so there's nothing to gain by populating it here).
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:17 +0000