Skip to content
PHP Ecosystem
Explore

CurrentRouteLogRow

API reference › Debug Core › Panel › Router › CurrentRouteLogRow

final readonly classPHPForge\Debug\Panel\Router\CurrentRouteLogRow
ImplementsPHPForge\Debug\Storage\PanelRow
Sourcesrc/Panel/Router/CurrentRouteLogRow.php

Typed row of the Current Route rules-tested log, resolved once from the URL-manager trace.

PropertyTypeDescriptionDefined by
$match readonly constructorbooltrue when this rule produced the final match; the renderer surfaces the row with a success modifier.CurrentRouteLogRow
$parent readonly constructorstringParent rule (UrlRule for nested REST rules), or '' when there is no parent.CurrentRouteLogRow
$rule readonly constructorstringRule name or its class FQCN as captured by the route resolver.CurrentRouteLogRow
MethodDescriptionDefined by
__construct()Creates a row from the current-route rules-tested log.CurrentRouteLogRow
fromArray() staticNarrows one persisted rule of the routing payload into a typed row.CurrentRouteLogRow
fromLogMessage() staticNarrows one raw URL-manager trace payload, returning null when it does not carry a rule/match pair.CurrentRouteLogRow
jsonSerialize()Returns the typed row for JSON serialization.CurrentRouteLogRow
public function __construct(string $rule, string $parent, bool $match)

Creates a row from the current-route rules-tested log.

Parameters

ParameterTypeDescription
$rulestring
$parentstring
$matchbool
public static function fromArray(mixed $data, string $path): self

Narrows one persisted rule of the routing payload into a typed row.

Parameters

ParameterTypeDescription
$datamixedPersisted rule, expected to be an object carrying the declared shape.
$pathstringJSON path of the rule, used to report a malformed payload.

Returns

self: Row carrying the inspected rule, its parent, and the match flag.

public static function fromLogMessage(mixed $message): self|null

Narrows one raw URL-manager trace payload, returning null when it does not carry a rule/match pair.

Parameters

ParameterTypeDescription
$messagemixedRaw logger payload.

Returns

self|null

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

Returns the typed row for JSON serialization.

Returns

array<string, mixed>