Skip to content
PHP Ecosystem
Explore

AssetManagerInterface

API reference › Foxy › Asset › AssetManagerInterface

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

Defines frontend dependency manager operations used by the Foxy solver.

MethodDescriptionDefined by
addDependencies() abstractAdd the asset dependencies in asset package file.AssetManagerInterface
audit() abstractRuns the security audit of the locked dependencies.AssetManagerInterface
getAuditParser() abstractReturns the parser of this manager’s audit report.AssetManagerInterface
getLockPackageName() abstractGet the filename of the lock file.AssetManagerInterface
getName() abstractGet the name of asset manager.AssetManagerInterface
getPackageName() abstractGet the filename of the asset package.AssetManagerInterface
getVersionConstraint() abstractGet the supported version constraint of the asset manager.AssetManagerInterface
hasLockFile() abstractCheck if the lock file is present or not.AssetManagerInterface
isAvailable() abstractCheck if the asset manager is available.AssetManagerInterface
isInstalled() abstractCheck if the asset dependencies are installed or not.AssetManagerInterface
isUpdatable() abstractCheck if the asset manager can be use the update command or not.AssetManagerInterface
run() abstractRun the asset manager to install/update the asset dependencies.AssetManagerInterface
setUpdatable() abstractDefine if the asset manager can be use the update command.AssetManagerInterface
validate() abstractValidate the version of asset manager.AssetManagerInterface
abstract public function addDependencies(Composer\Package\RootPackageInterface $rootPackage, array $dependencies): Foxy\Asset\AssetPackageInterface

Add the asset dependencies in asset package file.

Parameters

ParameterTypeDescription
$rootPackageComposer\Package\RootPackageInterfaceThe composer root package
$dependenciesarrayThe asset local dependencies

Returns

AssetPackageInterface

abstract public function audit(bool $noDev): Foxy\Audit\AuditProcessResult

Runs the security audit of the locked dependencies.

Parameters

ParameterTypeDescription
$noDevboolWhether to exclude development dependencies; managers that cannot exclude them throw.

Returns

Foxy\Audit\AuditProcessResult

Throws

abstract public function getAuditParser(): Foxy\Audit\AuditParserInterface

Returns the parser of this manager’s audit report.

abstract public function getLockPackageName(): string

Get the filename of the lock file.

Returns

string

abstract public function getName(): string

Get the name of asset manager.

Returns

string

abstract public function getPackageName(): string

Get the filename of the asset package.

Returns

string

abstract public function getVersionConstraint(): string

Get the supported version constraint of the asset manager.

Returns

string

abstract public function hasLockFile(): bool

Check if the lock file is present or not.

Returns

bool

abstract public function isAvailable(): bool

Check if the asset manager is available.

Returns

bool

abstract public function isInstalled(): bool

Check if the asset dependencies are installed or not.

Returns

bool

abstract public function isUpdatable(): bool

Check if the asset manager can be use the update command or not.

Returns

bool

abstract public function run(): int

Run the asset manager to install/update the asset dependencies.

Returns

int

abstract public function setUpdatable(bool $updatable): self

Define if the asset manager can be use the update command.

Parameters

ParameterTypeDescription
$updatableboolThe value

Returns

self

abstract public function validate(): void

Validate the version of asset manager.

Throws