# PhpInfoTile

> Typed view-model for one tile in a phpinfo Overview section.

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [PhpInfo](/docs/extensions/debug-core/reference/phpinfo/index.md) › PhpInfoTile

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

Typed view-model for one tile in a phpinfo Overview section.

The `$kind` discriminator drives the renderer's branch: enabled/disabled pill, comma-separated path or token list,
single shortened path, or plain code text.

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-displayValue"></span>`$displayValue` readonly constructor | `string` | Display value already prepared for the rendering branch indicated by `$kind`. | `PhpInfoTile` |
| <span id="property-kind"></span>`$kind` readonly constructor | `string` | Rendering kind. See the `KIND_*` constants. | `PhpInfoTile` |
| <span id="property-label"></span>`$label` readonly constructor | `string` | Tile label rendered in the `<dt>` cell ('SAPI', 'Memory limit', ...). | `PhpInfoTile` |
| <span id="property-rawValue"></span>`$rawValue` readonly constructor | `string` | Full original value (used as the title tooltip when the display value was shortened). | `PhpInfoTile` |
| <span id="property-tokens"></span>`$tokens` readonly constructor | `list<`[`PhpInfoToken`](/docs/extensions/debug-core/reference/phpinfo/phpinfotoken/index.md)`>` | Path tokens for [`KIND_PATH_LIST`](/docs/extensions/debug-core/reference/phpinfo/phpinfotile/index.md#const-KIND_PATH_LIST) (already with [`basename()`](https://www.php.net/manual/en/function.basename.php) applied for display) or short tokens for [`KIND_TOKEN_LIST`](/docs/extensions/debug-core/reference/phpinfo/phpinfotile/index.md#const-KIND_TOKEN_LIST). Empty list for the other kinds. Default: `[]`. | `PhpInfoTile` |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`__construct()`](#method-__construct) | Creates a typed tile for a phpinfo overview section. | `PhpInfoTile` |

## Constants

| Constant | Value | Description | Defined by |
| --- | --- | --- | --- |
| <span id="const-KIND_PATH"></span>`KIND_PATH` | `'path'` | Renders a single shortened path as `<code>`, with the full value as its hover title. | `PhpInfoTile` |
| <span id="const-KIND_PATH_LIST"></span>`KIND_PATH_LIST` | `'path-list'` | Renders every entry of [`$tokens`](/docs/extensions/debug-core/reference/phpinfo/phpinfotile/index.md#property-tokens) as a `<code>` chip, each carrying its full path as a hover title. | `PhpInfoTile` |
| <span id="const-KIND_PILL_MUTED"></span>`KIND_PILL_MUTED` | `'pill-muted'` | Renders a pill in its muted variant, used for an off or unavailable status. | `PhpInfoTile` |
| <span id="const-KIND_PILL_SUCCESS"></span>`KIND_PILL_SUCCESS` | `'pill-success'` | Renders a pill in its success variant, used for an on or available status. | `PhpInfoTile` |
| <span id="const-KIND_TEXT"></span>`KIND_TEXT` | `'text'` | Renders the display value as plain `<code>` text, without a hover title. | `PhpInfoTile` |
| <span id="const-KIND_TOKEN_LIST"></span>`KIND_TOKEN_LIST` | `'token-list'` | Renders every entry of [`$tokens`](/docs/extensions/debug-core/reference/phpinfo/phpinfotile/index.md#property-tokens) as a `<code>` chip; unlike [`KIND_PATH_LIST`](/docs/extensions/debug-core/reference/phpinfo/phpinfotile/index.md#const-KIND_PATH_LIST), the tokens are not paths. | `PhpInfoTile` |

## Method details

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

```php
public function __construct(string $label, string $displayValue, string $rawValue, string $kind, array $tokens = [])
```

Creates a typed tile for a phpinfo overview section.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$label` | `string` |  |
| `$displayValue` | `string` |  |
| `$rawValue` | `string` |  |
| `$kind` | `string` |  |
| `$tokens` | `array` |  |