# HistorySummary

> Typed aggregate view-model for the History index summary header.

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [View](/docs/extensions/debug-core/reference/view/index.md) › [History](/docs/extensions/debug-core/reference/view/history/index.md) › HistorySummary

| final readonly class | `PHPForge\Debug\View\History\HistorySummary` |
| --- | --- |
| Source | [`src/View/History/HistorySummary.php`](https://github.com/php-forge/debug-core/blob/main/src/View/History/HistorySummary.php#L14) |

Typed aggregate view-model for the History index summary header.

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-statusBuckets"></span>`$statusBuckets` readonly constructor | `list<`[`HistoryStatusBucket`](/docs/extensions/debug-core/reference/view/history/historystatusbucket/index.md)`>` | Non-empty status buckets in display order; empty when no captured request mapped into a known bucket. | `HistorySummary` |
| <span id="property-totalRequests"></span>`$totalRequests` readonly constructor | `int` | Total number of captured requests in the manifest. | `HistorySummary` |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`__construct()`](#method-__construct) | Creates aggregate metrics for the History summary. | `HistorySummary` |
| [`fromManifest()`](#method-fromManifest) static | Builds the typed summary from the request manifest. | `HistorySummary` |

## Method details

### __construct() <span id="method-__construct"></span>

```php
public function __construct(int $totalRequests, array $statusBuckets)
```

Creates aggregate metrics for the History summary.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$totalRequests` | `int` |  |
| `$statusBuckets` | `array` |  |

### fromManifest() <span id="method-fromManifest"></span>

```php
public static function fromManifest(array<array-key, PHPForge\Debug\Storage\RequestSummary> $manifest): self
```

Builds the typed summary from the request manifest.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$manifest` | `array<array-key,` [`PHPForge\Debug\Storage\RequestSummary`](/docs/extensions/debug-core/reference/storage/requestsummary/index.md)`>` | Manifest entries; only the values are read. |

**Returns**

`self`