# CaptureLabel

> Formats unescaped capture-selection labels without shortening their unique identifiers.

[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) › CaptureLabel

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

Formats unescaped capture-selection labels without shortening their unique identifiers.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`fromSummary()`](#method-fromSummary) static | Builds the label identifying one capture in a selection control. | `CaptureLabel` |

## Method details

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

```php
public static function fromSummary(PHPForge\Debug\Storage\RequestSummary $summary): string
```

Builds the label identifying one capture in a selection control.

Joins the time, HTTP method, URL, and tag with a middot. The URL is trimmed to 72 columns, while the tag is
never shortened, so two captures of the same request stay distinguishable. Missing time or method fall back to
a placeholder instead of collapsing the label.

The result is unescaped, so the caller encodes it.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$summary` | [`PHPForge\Debug\Storage\RequestSummary`](/docs/extensions/debug-core/reference/storage/requestsummary/index.md) | Capture the label describes. |

**Returns**

`string`: Unescaped label for a capture-selection control.