EventRow
API reference › Debug Core › Panel › Event › EventRow
Typed event row recorded by the wildcard listener and persisted in that form.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$class readonly constructor | string | Fully qualified class name of the event object. | EventRow |
$isStatic readonly constructor | string | '1' when the event was triggered statically (no sender), '0' otherwise. | EventRow |
$name readonly constructor | string | Event name (for example, EVENT_AFTER_REQUEST). | EventRow |
$senderClass readonly constructor | string | Fully qualified class name of the sender, or '' when the event was triggered statically. | EventRow |
$time readonly constructor | float | Capture timestamp in seconds since the Unix epoch. | EventRow |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates an event row from captured listener data. | EventRow |
distinctClassCount() static | Returns how many distinct event classes the given rows cover. | EventRow |
fromArray() static | Hydrates 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() static | Returns 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 |
Property details
Section titled “Property details”$isStatic
Section titled “$isStatic ”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.
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(float $time, string $name, string $class, string $isStatic, string $senderClass)Creates an event row from captured listener data.
Parameters
| Parameter | Type | Description |
|---|---|---|
$time | float | |
$name | string | |
$class | string | |
$isStatic | string | |
$senderClass | string |
distinctClassCount()
Section titled “distinctClassCount() ”public static function distinctClassCount(list<self> $rows): intReturns how many distinct event classes the given rows cover.
Parameters
| Parameter | Type | Description |
|---|---|---|
$rows | list<self> | Captured event rows. |
Returns
int: Number of distinct event classes across the given rows.
fromArray()
Section titled “fromArray() ”public static function fromArray(mixed $data, string $path): selfHydrates an event row from decoded JSON data.
Parameters
| Parameter | Type | Description |
|---|---|---|
$data | mixed | Decoded event row payload. |
$path | string | Payload path used in hydration errors. |
Returns
self: Hydrated row, enriched with diagnostics when the payload carried them.
inspection()
Section titled “inspection() ”public function inspection(): PHPForge\Debug\Panel\Event\EventInspection|nullReturns the optional diagnostics attached to the row.
Returns
EventInspection|null: Attached diagnostics, or null when the row was captured without them.
jsonSerialize()
Section titled “jsonSerialize() ”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.
staticCount()
Section titled “staticCount() ”public static function staticCount(list<self> $rows): intReturns how many of the given rows were triggered statically.
Parameters
| Parameter | Type | Description |
|---|---|---|
$rows | list<self> | Captured event rows. |
Returns
int: Number of statically triggered rows.
withInspection()
Section titled “withInspection() ”public function withInspection(PHPForge\Debug\Panel\Event\EventInspection $inspection): selfReturns an enriched copy without changing the constructor or the original captured row.
Parameters
| Parameter | Type | Description |
|---|---|---|
$inspection | EventInspection | Optional diagnostics to attach. |
Returns
self: Row carrying the diagnostics.