RequestSummary
API reference › Debug Core › Storage › RequestSummary
Represents canonical metadata for one captured request and its manifest row.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$ajax readonly constructor | bool | Whether the request used AJAX. | RequestSummary |
$excessiveCallersCount readonly constructor | int | Number of excessive log callers. | RequestSummary |
$ip readonly constructor | string | Client IP address. | RequestSummary |
$mailCount readonly constructor | int | Number of captured mail messages. | RequestSummary |
$mailFiles readonly constructor | list<string> | Captured mail file paths. | RequestSummary |
$method readonly constructor | string | HTTP request method. | RequestSummary |
$peakMemory readonly constructor | int| | Peak memory in bytes or null when unavailable. | RequestSummary |
$processingTime readonly constructor | float| | Processing duration in seconds or null when unavailable. | RequestSummary |
$sqlCount readonly constructor | int | Number of SQL queries. | RequestSummary |
$statusCode readonly constructor | int | HTTP response status code. | RequestSummary |
$tag readonly constructor | string | Unique request tag. | RequestSummary |
$time readonly constructor | float | Request start timestamp. | RequestSummary |
$url readonly constructor | string | Requested URL. | RequestSummary |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
create() static | Creates an empty request summary ready for immutable enrichment. | RequestSummary |
fromArray() static | Hydrates request metadata from decoded JSON data. | RequestSummary |
jsonSerialize() | Returns the request metadata for JSON serialization. | RequestSummary |
withDatabase() | Returns a copy with database counters. | RequestSummary |
withMail() | Returns a copy with captured mail metadata. | RequestSummary |
withProfiling() | Returns a copy enriched with processing time and peak memory usage. | RequestSummary |
withRequest() | Returns a copy with HTTP request metadata. | RequestSummary |
withResponse() | Returns a copy with the HTTP response status. | RequestSummary |
Method details
Section titled “Method details”create()
Section titled “create() ”public static function create(string $tag): selfCreates an empty request summary ready for immutable enrichment.
Parameters
| Parameter | Type | Description |
|---|---|---|
$tag | string |
Returns
self
fromArray()
Section titled “fromArray() ”public static function fromArray(mixed $data, string $path = '$.summary'): selfHydrates request metadata from decoded JSON data.
Parameters
| Parameter | Type | Description |
|---|---|---|
$data | mixed | Decoded request metadata. |
$path | string | Payload path used in hydration errors. |
Returns
self: Hydrated request metadata.
jsonSerialize()
Section titled “jsonSerialize() ”public function jsonSerialize(): array<string, mixed>Returns the request metadata for JSON serialization.
Returns
array<string, mixed>: Serialized request metadata.
withDatabase()
Section titled “withDatabase() ”public function withDatabase(int $sqlCount, int $excessiveCallersCount = 0): selfReturns a copy with database counters.
Parameters
| Parameter | Type | Description |
|---|---|---|
$sqlCount | int | |
$excessiveCallersCount | int |
Returns
self
withMail()
Section titled “withMail() ”public function withMail(int $mailCount, list<string> $mailFiles): selfReturns a copy with captured mail metadata.
Parameters
| Parameter | Type | Description |
|---|---|---|
$mailCount | int | |
$mailFiles | list<string> |
Returns
self
withProfiling()
Section titled “withProfiling() ”public function withProfiling(float $processingTime, int $peakMemory): selfReturns a copy enriched with processing time and peak memory usage.
Parameters
| Parameter | Type | Description |
|---|---|---|
$processingTime | float | Processing duration in seconds. |
$peakMemory | int | Peak memory in bytes. |
Returns
self: Request metadata enriched with profiling values.
withRequest()
Section titled “withRequest() ”public function withRequest(string $url, string $method, string $ip, float $time, bool $ajax = false): selfReturns a copy with HTTP request metadata.
Parameters
| Parameter | Type | Description |
|---|---|---|
$url | string | |
$method | string | |
$ip | string | |
$time | float | |
$ajax | bool |
Returns
self
withResponse()
Section titled “withResponse() ”public function withResponse(int $statusCode): selfReturns a copy with the HTTP response status.
Parameters
| Parameter | Type | Description |
|---|---|---|
$statusCode | int |
Returns
self