# FallbackInterface

> Captures and restores state around asset dependency solving.

[API reference](/docs/api/index.md) › [Foxy](/docs/extensions/foxy/reference/index.md) › [Fallback](/docs/extensions/foxy/reference/fallback/index.md) › FallbackInterface

| interface | `Foxy\Fallback\FallbackInterface` |
| --- | --- |
| Source | [`src/Fallback/FallbackInterface.php`](https://github.com/php-forge/foxy/blob/main/src/Fallback/FallbackInterface.php#L10) |

Implemented by 2 types:

- [`AssetFallback`](/docs/extensions/foxy/reference/fallback/assetfallback/index.md)
- [`ComposerFallback`](/docs/extensions/foxy/reference/fallback/composerfallback/index.md)

Captures and restores state around asset dependency solving.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`restore()`](#method-restore) abstract | Restore the state. | `FallbackInterface` |
| [`save()`](#method-save) abstract | Save the state. | `FallbackInterface` |

## Method details

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

```php
abstract public function restore(): void
```

Restore the state.

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

```php
abstract public function save(): self
```

Save the state.

**Returns**

`self`