Skip to content

RoutingResult

Immutable routing result facade providing legacy-like getters.

final readonly class RoutingResult

SourceRouting/RoutingResult.php

public function __construct(?string $module, ?string $action, string $outputType, string $method, array<string, mixed> $parameters = [], array<int, mixed> $matchedRoutes = []): mixed

ParameterTypeDescription
$module?``string
$action?``string
$outputTypestring
$methodstring
$parametersarray``<``string``, ``mixed``>
$matchedRoutesarray``<``int``, ``mixed``>

Returns mixed

MethodDescription
getActionName(): ?stringReturns the matched action name, or null when routing did not resolve one.
getMatchedRoutes(): array<int, mixed>
getModuleName(): ?stringReturns the matched module name, or null when routing did not resolve one.
getOutputType(): stringReturns the output type the matched route renders with.
getParameters(): array<string, mixed>
getRequestMethod(): stringReturns the HTTP method the routed request was made with.

public function getActionName(): ?string

Returns the matched action name, or null when routing did not resolve one.

Returns ?``string

public function getMatchedRoutes(): array<int, mixed>

Returns array``<``int``, ``mixed``>

public function getModuleName(): ?string

Returns the matched module name, or null when routing did not resolve one.

Returns ?``string

public function getOutputType(): string

Returns the output type the matched route renders with.

Returns string

public function getParameters(): array<string, mixed>

Returns array``<``string``, ``mixed``>

public function getRequestMethod(): string

Returns the HTTP method the routed request was made with.

Returns string