Skip to content
PHP Ecosystem
Explore

AssetFallback

API reference › Foxy › Fallback › AssetFallback

final classFoxy\Fallback\AssetFallback
ImplementsFallbackInterface
Sourcesrc/Fallback/AssetFallback.php

Restores an asset manifest to the state captured before dependency solving.

MethodDescriptionDefined 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
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

ParameterTypeDescription
$ioComposer\IO\IOInterfaceComposer I/O used to report restoration.
$configFoxy\Config\ConfigFoxy configuration controlling asset fallback.
$pathstringAsset manifest path to snapshot.
$fsComposer\Util\Filesystem|nullFilesystem implementation, or null to create the Composer default.
public function restore(): void

Restores the captured manifest, or removes it when Foxy created it.

public function save(): self

Captures the current manifest state when asset fallback is enabled.

Returns

self