Skip to content
PHP Ecosystem
Explore

AssetPackageInterface

API reference › Foxy › Asset › AssetPackageInterface

interfaceFoxy\Asset\AssetPackageInterface
Sourcesrc/Asset/AssetPackageInterface.php
Implemented by 1 type

Defines mutable access to a frontend package manifest and its Composer-managed dependencies.

MethodDescriptionDefined by
addNewDependencies() abstractAdd the new asset dependencies and return the names of already installed asset dependencies.AssetPackageInterface
getInstalledDependencies() abstractGet the installed asset dependencies.AssetPackageInterface
getPackage() abstractGet the asset package.AssetPackageInterface
removeUnusedDependencies() abstractRemove the unused asset dependencies.AssetPackageInterface
setPackage() abstractSet the asset package.AssetPackageInterface
write() abstractWrite the asset package in file.AssetPackageInterface
abstract public function addNewDependencies(array $dependencies): array

Add the new asset dependencies and return the names of already installed asset dependencies.

Parameters

ParameterTypeDescription
$dependenciesarrayThe asset dependencies

Returns

array: The asset package name of the already asset dependencies

abstract public function getInstalledDependencies(): array

Get the installed asset dependencies.

Returns

array: The installed asset dependencies

abstract public function getPackage(): array

Get the asset package.

Returns

array

abstract public function removeUnusedDependencies(array $dependencies): self

Remove the unused asset dependencies.

Parameters

ParameterTypeDescription
$dependenciesarrayAll asset dependencies

Returns

self

abstract public function setPackage(array $package): self

Set the asset package.

Parameters

ParameterTypeDescription
$packagearrayThe asset package

Returns

self

abstract public function write(): self

Write the asset package in file.

Returns

self