Skip to content
PHP Ecosystem
Explore

EventRow

API reference › Debug Core › Panel › Event › EventRow

final classPHPForge\Debug\Panel\Event\EventRow
ImplementsPHPForge\Debug\Storage\PanelRow
Sourcesrc/Panel/Event/EventRow.php

Typed event row recorded by the wildcard listener and persisted in that form.

PropertyTypeDescriptionDefined by
$class readonly constructorstringFully qualified class name of the event object.EventRow
$isStatic readonly constructorstring'1' when the event was triggered statically (no sender), '0' otherwise.EventRow
$name readonly constructorstringEvent name (for example, EVENT_AFTER_REQUEST).EventRow
$senderClass readonly constructorstringFully qualified class name of the sender, or '' when the event was triggered statically.EventRow
$time readonly constructorfloatCapture timestamp in seconds since the Unix epoch.EventRow
MethodDescriptionDefined by
__construct()Creates an event row from captured listener data.EventRow
distinctClassCount() staticReturns how many distinct event classes the given rows cover.EventRow
fromArray() staticHydrates an event row from decoded JSON data.EventRow
inspection()Returns the optional diagnostics attached to the row.EventRow
jsonSerialize()Returns the row for JSON serialization.EventRow
staticCount() staticReturns how many of the given rows were triggered statically.EventRow
withInspection()Returns an enriched copy without changing the constructor or the original captured row.EventRow
public readonly string $isStatic

'1' when the event was triggered statically (no sender), '0' otherwise.

Stored as a string so the value round-trips through the search model’s boolean rule.

public function __construct(float $time, string $name, string $class, string $isStatic, string $senderClass)

Creates an event row from captured listener data.

Parameters

ParameterTypeDescription
$timefloat
$namestring
$classstring
$isStaticstring
$senderClassstring
public static function distinctClassCount(list<self> $rows): int

Returns how many distinct event classes the given rows cover.

Parameters

ParameterTypeDescription
$rowslist<self>Captured event rows.

Returns

int: Number of distinct event classes across the given rows.

public static function fromArray(mixed $data, string $path): self

Hydrates an event row from decoded JSON data.

Parameters

ParameterTypeDescription
$datamixedDecoded event row payload.
$pathstringPayload path used in hydration errors.

Returns

self: Hydrated row, enriched with diagnostics when the payload carried them.

public function inspection(): PHPForge\Debug\Panel\Event\EventInspection|null

Returns the optional diagnostics attached to the row.

Returns

EventInspection|null: Attached diagnostics, or null when the row was captured without them.

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

Returns the row for JSON serialization.

Returns

array<string, mixed>: Serialized row fields, including the diagnostics when the row carries them.

public static function staticCount(list<self> $rows): int

Returns how many of the given rows were triggered statically.

Parameters

ParameterTypeDescription
$rowslist<self>Captured event rows.

Returns

int: Number of statically triggered rows.

public function withInspection(PHPForge\Debug\Panel\Event\EventInspection $inspection): self

Returns an enriched copy without changing the constructor or the original captured row.

Parameters

ParameterTypeDescription
$inspectionEventInspectionOptional diagnostics to attach.

Returns

self: Row carrying the diagnostics.