SourceResolver
class SourceResolver implements SourceResolverInterface
Properties
protected array | $sources | All of the registered sources. |
|
protected string | $default | The default source name. |
Methods
__construct(array $sources = [])
Create a new source resolver instance.
source(string $name = null)
Get a source instance.
void
bool
hasSource(string $name)
Check if a source has been registered.
string
getDefaultSourceName()
Get the default source name.
void
setDefaultSourceName(string $name)
Set the default source name.
Details
at line 26
__construct(array $sources = [])
Create a new source resolver instance.
at line 40
SourceInterface
source(string $name = null)
Get a source instance.
at line 57
void
addSource(string $name, SourceInterface $source)
Add a source to the resolver.
at line 69
bool
hasSource(string $name)
Check if a source has been registered.
at line 78
string
getDefaultSourceName()
Get the default source name.
at line 90
void
setDefaultSourceName(string $name)
Set the default source name.