ExecutableFinder.php
Namespace
Drupal\package_managerFile
-
core/
modules/ package_manager/ src/ ExecutableFinder.php
View source
<?php
declare (strict_types=1);
namespace Drupal\package_manager;
use Drupal\Core\Config\ConfigFactoryInterface;
use PhpTuf\ComposerStager\API\Finder\Service\ExecutableFinderInterface;
/**
* An executable finder which looks for executable paths in configuration.
*
* @internal
* This is an internal part of Package Manager and may be changed or removed
* at any time without warning. External code should not interact with this
* class.
*/
final class ExecutableFinder implements ExecutableFinderInterface {
public function __construct(ExecutableFinderInterface $decorated, ConfigFactoryInterface $configFactory) {
}
/**
* {@inheritdoc}
*/
public function find(string $name) : string {
$executables = $this->configFactory
->get('package_manager.settings')
->get('executables');
return $executables[$name] ?? $this->decorated
->find($name);
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
ExecutableFinder | An executable finder which looks for executable paths in configuration. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.