AssetManagerInterface
API reference › Foxy › Asset › AssetManagerInterface
Implemented by 1 type
Defines frontend dependency manager operations used by the Foxy solver.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
addDependencies() abstract | Add the asset dependencies in asset package file. | AssetManagerInterface |
audit() abstract | Runs the security audit of the locked dependencies. | AssetManagerInterface |
getAuditParser() abstract | Returns the parser of this manager’s audit report. | AssetManagerInterface |
getLockPackageName() abstract | Get the filename of the lock file. | AssetManagerInterface |
getName() abstract | Get the name of asset manager. | AssetManagerInterface |
getPackageName() abstract | Get the filename of the asset package. | AssetManagerInterface |
getVersionConstraint() abstract | Get the supported version constraint of the asset manager. | AssetManagerInterface |
hasLockFile() abstract | Check if the lock file is present or not. | AssetManagerInterface |
isAvailable() abstract | Check if the asset manager is available. | AssetManagerInterface |
isInstalled() abstract | Check if the asset dependencies are installed or not. | AssetManagerInterface |
isUpdatable() abstract | Check if the asset manager can be use the update command or not. | AssetManagerInterface |
run() abstract | Run the asset manager to install/update the asset dependencies. | AssetManagerInterface |
setUpdatable() abstract | Define if the asset manager can be use the update command. | AssetManagerInterface |
validate() abstract | Validate the version of asset manager. | AssetManagerInterface |
Method details
Section titled “Method details”addDependencies()
Section titled “addDependencies() ”abstract public function addDependencies(Composer\Package\RootPackageInterface $rootPackage, array $dependencies): Foxy\Asset\AssetPackageInterfaceAdd the asset dependencies in asset package file.
Parameters
| Parameter | Type | Description |
|---|---|---|
$rootPackage | Composer\ | The composer root package |
$dependencies | array | The asset local dependencies |
Returns
audit()
Section titled “audit() ”abstract public function audit(bool $noDev): Foxy\Audit\AuditProcessResultRuns the security audit of the locked dependencies.
Parameters
| Parameter | Type | Description |
|---|---|---|
$noDev | bool | Whether to exclude development dependencies; managers that cannot exclude them throw. |
Returns
Throws
Foxy\Exception\RuntimeException: if the lock file is missing, the manager cannot honor$noDev, or the audit cannot run.
getAuditParser()
Section titled “getAuditParser() ”abstract public function getAuditParser(): Foxy\Audit\AuditParserInterfaceReturns the parser of this manager’s audit report.
Returns
getLockPackageName()
Section titled “getLockPackageName() ”abstract public function getLockPackageName(): stringGet the filename of the lock file.
Returns
string
getName()
Section titled “getName() ”abstract public function getName(): stringGet the name of asset manager.
Returns
string
getPackageName()
Section titled “getPackageName() ”abstract public function getPackageName(): stringGet the filename of the asset package.
Returns
string
getVersionConstraint()
Section titled “getVersionConstraint() ”abstract public function getVersionConstraint(): stringGet the supported version constraint of the asset manager.
Returns
string
hasLockFile()
Section titled “hasLockFile() ”abstract public function hasLockFile(): boolCheck if the lock file is present or not.
Returns
bool
isAvailable()
Section titled “isAvailable() ”abstract public function isAvailable(): boolCheck if the asset manager is available.
Returns
bool
isInstalled()
Section titled “isInstalled() ”abstract public function isInstalled(): boolCheck if the asset dependencies are installed or not.
Returns
bool
isUpdatable()
Section titled “isUpdatable() ”abstract public function isUpdatable(): boolCheck if the asset manager can be use the update command or not.
Returns
bool
run()
Section titled “run() ”abstract public function run(): intRun the asset manager to install/update the asset dependencies.
Returns
int
setUpdatable()
Section titled “setUpdatable() ”abstract public function setUpdatable(bool $updatable): selfDefine if the asset manager can be use the update command.
Parameters
| Parameter | Type | Description |
|---|---|---|
$updatable | bool | The value |
Returns
self
validate()
Section titled “validate() ”abstract public function validate(): voidValidate the version of asset manager.
Throws
Foxy\Exception\RuntimeException: When the binary isn’t installedFoxy\Exception\RuntimeException: When the version doesn’t match