Router
{@inheritDoc}
- Full name:
\Zemit\Mvc\Router
- Parent class:
Router
- This class implements:
\Zemit\Router\RouterInterface
Properties
config
public \Zemit\Config\ConfigInterface $config
Methods
getConfig
public getConfig(): \Zemit\Config\ConfigInterface
setConfig
public setConfig(\Zemit\Config\ConfigInterface $config): void
Parameters:
Parameter | Type | Description |
---|---|---|
$config | \Zemit\Config\ConfigInterface |
__construct
Router constructor.
public __construct(bool $defaultRoutes = true, ?\Zemit\Config\ConfigInterface $config = null): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$defaultRoutes | bool | |
$config | ?\Zemit\Config\ConfigInterface |
defaultRoutes
Default routes - Default namespace - Default controller - Default action - Default notFound
public defaultRoutes(): void
hostnamesRoutes
public hostnamesRoutes(array|null $hostnames = null, array|null $defaults = null): void
Parameters:
Parameter | Type | Description |
---|---|---|
$hostnames | **array | null** |
$defaults | **array | null** |
modulesRoutes
Defines our frontend routes /controller/action/params
public modulesRoutes(\Phalcon\Mvc\Application $application, array $defaults = null): void
Parameters:
Parameter | Type | Description |
---|---|---|
$application | \Phalcon\Mvc\Application | |
$defaults | array |
toArray
public toArray(): array