AssetFallback
API reference › Foxy › Fallback › AssetFallback
Restores an asset manifest to the state captured before dependency solving.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates a fallback for one asset manifest path. | AssetFallback |
restore() | Restores the captured manifest, or removes it when Foxy created it. | AssetFallback |
save() | Captures the current manifest state when asset fallback is enabled. | AssetFallback |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(Composer\IO\IOInterface $io, Foxy\Config\Config $config, string $path, Composer\Util\Filesystem|null $fs = null)Creates a fallback for one asset manifest path.
Parameters
| Parameter | Type | Description |
|---|---|---|
$io | Composer\ | Composer I/O used to report restoration. |
$config | Foxy\ | Foxy configuration controlling asset fallback. |
$path | string | Asset manifest path to snapshot. |
$fs | Composer\ | Filesystem implementation, or null to create the Composer default. |
restore()
Section titled “restore() ”public function restore(): voidRestores the captured manifest, or removes it when Foxy created it.
save()
Section titled “save() ”public function save(): selfCaptures the current manifest state when asset fallback is enabled.
Returns
self