LoaderInterface
interface LoaderInterface
LoaderInterface is the interface implemented by all loader classes.
Methods
load(mixed $resource, string|null $type = null) Loads a resource. | ||
bool | supports(mixed $resource, string|null $type = null) Returns whether this class supports the given resource. | |
LoaderResolverInterface | getResolver() Gets the loader resolver. | |
setResolver(LoaderResolverInterface $resolver) Sets the loader resolver. |
Details
load(mixed $resource, string|null $type = null)
Loads a resource.
Parameters
mixed | $resource | The resource |
string|null | $type | The resource type or null if unknown |
Exceptions
Exception | If something went wrong |
bool supports(mixed $resource, string|null $type = null)
Returns whether this class supports the given resource.
Parameters
mixed | $resource | A resource |
string|null | $type | The resource type or null if unknown |
Return Value
bool | True if this class supports the given resource, false otherwise |
LoaderResolverInterface getResolver()
Gets the loader resolver.
Return Value
LoaderResolverInterface | A LoaderResolverInterface instance |
setResolver(LoaderResolverInterface $resolver)
Sets the loader resolver.
Parameters
LoaderResolverInterface | $resolver |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Config/Loader/LoaderInterface.html