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 A LoaderResolverInterface instance
doc_Symfony
2016-10-28 06:22:47
Comments
Leave a Comment

Please login to continue.