Skip to content
PHP Ecosystem
Explore

AssetManagerFinder

API reference › Foxy › Asset › AssetManagerFinder

final classFoxy\Asset\AssetManagerFinder
Sourcesrc/Asset/AssetManagerFinder.php

Selects a configured asset manager by name, lock file, or executable availability.

MethodDescriptionDefined 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
public function __construct(Foxy\Asset\AssetManagerInterface[] $managers = [])

Registers the asset managers available for selection.

Parameters

ParameterTypeDescription
$managersAssetManagerInterface[]The asset managers
public function addManager(Foxy\Asset\AssetManagerInterface $manager): void

Registers an asset manager by its unique name.

Parameters

ParameterTypeDescription
$managerAssetManagerInterface
public function findManager(string|null $manager = null, bool $checkAvailability = true): Foxy\Asset\AssetManagerInterface

Find the asset manager.

Parameters

ParameterTypeDescription
$managerstring|nullThe name of the asset manager
$checkAvailabilityboolWhether to check automatically selected manager availability

Returns

AssetManagerInterface

Throws