class FileLocator
FileLocator uses the KernelInterface to locate resources in bundles.
@author Fabien Potencier <fabien@symfony.com>
Hierarchy
- class \Symfony\Component\HttpKernel\Config\FileLocator extends \Symfony\Component\Config\FileLocator
Expanded class hierarchy of FileLocator
1 file declares its use of FileLocator
- Kernel.php in vendor/
symfony/ http-kernel/ Kernel.php
File
-
vendor/
symfony/ http-kernel/ Config/ FileLocator.php, line 22
Namespace
Symfony\Component\HttpKernel\ConfigView source
class FileLocator extends BaseFileLocator {
public function __construct(KernelInterface $kernel) {
parent::__construct();
}
public function locate(string $file, ?string $currentPath = null, bool $first = true) : string|array {
if (isset($file[0]) && '@' === $file[0]) {
$resource = $this->kernel
->locateResource($file);
return $first ? $resource : [
$resource,
];
}
return parent::locate($file, $currentPath, $first);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
FileLocator::locate | public | function | |
FileLocator::__construct | public | function |