AliasLoader
class AliasLoader (View source)
Properties
protected array | $aliases | The array of class aliases. |
|
protected bool | $registered | Indicates if a loader has been registered. |
|
static protected AliasLoader | $instance | The singleton instance of the loader. |
Methods
Create a new class alias loader instance.
Get or create the singleton alias loader instance.
Load a class alias if it is registered.
Add an alias to the loader.
Register the loader on the auto-loader stack.
Prepend the load method to the auto-loader stack.
Get the registered aliases.
Set the registered aliases.
Indicates if the loader has been registered.
Set the "registered" state of the loader.
Details
void
__construct(array $aliases = array())
Create a new class alias loader instance.
static AliasLoader
getInstance(array $aliases = array())
Get or create the singleton alias loader instance.
void
load(string $alias)
Load a class alias if it is registered.
void
alias(string $class, string $alias)
Add an alias to the loader.
void
register()
Register the loader on the auto-loader stack.
protected void
prependToLoaderStack()
Prepend the load method to the auto-loader stack.
array
getAliases()
Get the registered aliases.
void
setAliases(array $aliases)
Set the registered aliases.
bool
isRegistered()
Indicates if the loader has been registered.
void
setRegistered(bool $value)
Set the "registered" state of the loader.
static void
setInstance(AliasLoader $loader)
Set the value of the singleton alias loader.