class ExecutableFinder

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.

Hierarchy

Expanded class hierarchy of ExecutableFinder

2 files declare their use of ExecutableFinder
ExecutableFinderTest.php in core/modules/package_manager/tests/src/Unit/ExecutableFinderTest.php
ServicesTest.php in core/modules/package_manager/tests/src/Kernel/ServicesTest.php

File

core/modules/package_manager/src/ExecutableFinder.php, line 18

Namespace

Drupal\package_manager
View source
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);
    }

}

Members

Title Sort descending Modifiers Object type Summary
ExecutableFinder::find public function
ExecutableFinder::__construct public function

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.