class LoaderResolver implements LoaderResolverInterface
LoaderResolver selects a loader for a given resource.
A resource can be anything (e.g. a full path to a config file or a Closure). Each loader determines whether it can load a resource and how.
__construct(array $loaders = array()) | ||
LoaderInterface|false | resolve(mixed $resource, string|null $type = null) Returns a loader able to load the resource. | |
addLoader(LoaderInterface $loader) | ||
LoaderInterface[] | getLoaders() Returns the registered loaders. |
array | $loaders | An array of loaders |
Returns a loader able to load the resource.
mixed | $resource | A resource |
string|null | $type | The resource type or null if unknown |
LoaderInterface|false | The loader or false if none is able to load the resource |
LoaderInterface | $loader |
Returns the registered loaders.
LoaderInterface[] | An array of LoaderInterface instances |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Config/Loader/LoaderResolver.html