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.

getResolver()

Gets the loader resolver.

setResolver(LoaderResolverInterface $resolver)

Sets the loader resolver.

Details

at line line 29
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

at line line 39
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

at line line 46
LoaderResolverInterface getResolver()

Gets the loader resolver.

Return Value

LoaderResolverInterface A LoaderResolverInterface instance

at line line 53
setResolver(LoaderResolverInterface $resolver)

Sets the loader resolver.

Parameters

LoaderResolverInterface $resolver A LoaderResolverInterface instance