AssetManagerFinder
API reference › Foxy › Asset › AssetManagerFinder
Selects a configured asset manager by name, lock file, or executable availability.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Registers the asset managers available for selection. | AssetManagerFinder |
addManager() | Registers an asset manager by its unique name. | AssetManagerFinder |
findManager() | Find the asset manager. | AssetManagerFinder |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(Foxy\Asset\AssetManagerInterface[] $managers = [])Registers the asset managers available for selection.
Parameters
| Parameter | Type | Description |
|---|---|---|
$managers | AssetManagerInterface[] | The asset managers |
addManager()
Section titled “addManager() ”public function addManager(Foxy\Asset\AssetManagerInterface $manager): voidRegisters an asset manager by its unique name.
Parameters
| Parameter | Type | Description |
|---|---|---|
$manager | AssetManagerInterface |
findManager()
Section titled “findManager() ”public function findManager(string|null $manager = null, bool $checkAvailability = true): Foxy\Asset\AssetManagerInterfaceFind the asset manager.
Parameters
| Parameter | Type | Description |
|---|---|---|
$manager | string| | The name of the asset manager |
$checkAvailability | bool | Whether to check automatically selected manager availability |
Returns
Throws
Foxy\Exception\RuntimeException: When the asset manager does not existFoxy\Exception\RuntimeException: When the asset manager is not found