# YiiLogo

> Serves the Yii mark as a data URI, reading the shared frontend asset once and caching the result.

[API reference](/docs/api/index.md) › [Debug](/docs/extensions/debug/reference/index.md) › [service](/docs/extensions/debug/reference/service/index.md) › YiiLogo

| final class | `yii\debug\service\YiiLogo` |
| --- | --- |
| Source | [`src/service/YiiLogo.php`](https://github.com/yii2-extensions/debug/blob/main/src/service/YiiLogo.php#L16) |

Serves the Yii mark as a data URI, reading the shared frontend asset once and caching the result.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`dataUri()`](#method-dataUri) static | Returns the Yii logo as a data URI ready to drop into `<img src="…">` or `<link rel="icon">`. | `YiiLogo` |
| [`reset()`](#method-reset) static | Drops the cached URI, so the next read composes it from the packaged asset again. | `YiiLogo` |
| [`set()`](#method-set) static | Sets the logo data URI returned by [`dataUri()`](/docs/extensions/debug/reference/service/yiilogo/index.md#method-dataUri). | `YiiLogo` |

## Method details

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

```php
public static function dataUri(): string
```

Returns the Yii logo as a data URI ready to drop into `<img src="…">` or `<link rel="icon">`.

Reads the shared frontend file so every framework adapter renders the same Yii mark.

**Returns**

`string`: Logo as a data URI.

**Throws**

- [`RuntimeException`](https://www.php.net/manual/en/class.runtimeexception.php): when the packaged logo cannot be read.

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

```php
public static function reset(): void
```

Drops the cached URI, so the next read composes it from the packaged asset again.

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

```php
public static function set(string $logo): void
```

Sets the logo data URI returned by [`dataUri()`](/docs/extensions/debug/reference/service/yiilogo/index.md#method-dataUri).

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$logo` | `string` | Logo as a data URI. |