Advanced
Less than 1 minute
Advanced
- Full name:
\Hazaar\Application\Router\Loader\Advanced
- Parent class:
\Hazaar\Application\Router\Loader
Properties
controller
protected ?string $controller
controllerClass
protected ?string $controllerClass
action
protected ?string $action
actionArgs
protected array $actionArgs
Methods
exec
public exec(\Hazaar\Application\Request $request): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$request | \Hazaar\Application\Request |
evaluateAliases
Evaluates the request and sets the controller, action, and arguments based on the request path.
private evaluateAliases(string $route, array<string,string> $aliases): string
Parameters:
Parameter | Type | Description |
---|---|---|
$route | string | the request path |
$aliases | array<string,string> | the aliases |
Return Value:
the evaluated path
findController
Finds the controller based on the given parts.
private findController(string $path, string[]& $controllerParts): string
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string | the name of the controller |
$controllerParts | string[] |
Return Value:
the name of the controller
Inherited methods
__construct
public __construct(\Hazaar\Map $config): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$config | \Hazaar\Map |
exec
public exec(\Hazaar\Application\Request $request): bool
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$request | \Hazaar\Application\Request |
Automatically generated on 2024-11-14