Options
Options
Configuration for Hazaar\Application\Router\Router and its Hazaar\Application\Router\Loader implementations.
class Options extends \Hazaar\Model\StructExtends: Hazaar\Model\Struct
This single flat options class is shared verbatim between the router and whichever loader its type selects: Hazaar\Application\Router\Router only reads Hazaar\Application\Router\Options::type, Hazaar\Application\Router\Options::controller, Hazaar\Application\Router\Options::action, and Hazaar\Application\Router\Options::args, while the remaining properties are read by individual Loader subclasses (for example the file loader reads path/file, the advanced loader reads aliases). It is kept as one class, rather than a nested loader options class, because the router forwards this exact object to its loader unchanged rather than passing a nested sub-array.
Properties
type
The router loader to use, matched against a Loader class name under
public string $type = 'file'Type: string
Hazaar\Application\Router\Loader\ (for example file, basic, advanced, json, attribute, annotated, none).
controller
Default/fallback controller name used when no route matches an incoming request
public string $controller = 'index'Type: string
for /, and as the default controller for the advanced and json loaders.
action
Default/fallback action name used alongside Hazaar\Application\Router\Options::controller, and as the
public string $action = 'index'Type: string
default action for the json loader.
args
Default action arguments used for the root / fallback route.
public array $argsType: array
aliases
public array $aliasesType: array
path
public string $pathType: string
file
public string $fileType: string
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:17 +0000