RoutingResult
Immutable routing result facade providing legacy-like getters.
Synopsis
Section titled “Synopsis”final readonly class RoutingResult
| Source | Routing/RoutingResult.php |
Constructor
Section titled “Constructor”__construct()
Section titled “__construct()”public function __construct(?string $module, ?string $action, string $outputType, string $method, array<string, mixed> $parameters = [], array<int, mixed> $matchedRoutes = []): mixed
| Parameter | Type | Description |
|---|---|---|
$module | ?``string | |
$action | ?``string | |
$outputType | string | |
$method | string | |
$parameters | array``<``string``, ``mixed``> | |
$matchedRoutes | array``<``int``, ``mixed``> |
Returns mixed
Methods
Section titled “Methods”| Method | Description |
|---|---|
getActionName(): ?string | Returns the matched action name, or null when routing did not resolve one. |
getMatchedRoutes(): array<int, mixed> | |
getModuleName(): ?string | Returns the matched module name, or null when routing did not resolve one. |
getOutputType(): string | Returns the output type the matched route renders with. |
getParameters(): array<string, mixed> | |
getRequestMethod(): string | Returns the HTTP method the routed request was made with. |
getActionName()
Section titled “getActionName()”public function getActionName(): ?string
Returns the matched action name, or null when routing did not resolve one.
Returns ?``string
getMatchedRoutes()
Section titled “getMatchedRoutes()”public function getMatchedRoutes(): array<int, mixed>
Returns array``<``int``, ``mixed``>
getModuleName()
Section titled “getModuleName()”public function getModuleName(): ?string
Returns the matched module name, or null when routing did not resolve one.
Returns ?``string
getOutputType()
Section titled “getOutputType()”public function getOutputType(): string
Returns the output type the matched route renders with.
Returns string
getParameters()
Section titled “getParameters()”public function getParameters(): array<string, mixed>
Returns array``<``string``, ``mixed``>
getRequestMethod()
Section titled “getRequestMethod()”public function getRequestMethod(): string
Returns the HTTP method the routed request was made with.
Returns string