class Illuminate / Foundation / AliasLoader

AliasLoader

Properties

protected

$aliases array

The array of class aliases.

Default: null
protected

$registered bool

Indicates if a loader has been registered.

Default: false
protected static

$facadeNamespace string

The namespace for all real-time facades.

Default: 'Facades\'
protected static

$instance AliasLoader

The singleton instance of the loader.

Default: null

Methods

private

__construct ( $aliases ) : void

Create a new AliasLoader instance.

Parameters

  • $aliases array
public static

getInstance ( array $aliases ) : AliasLoader

Get or create the singleton alias loader instance.

Parameters

  • $aliases array
public

load ( $alias ) : bool|null

Load a class alias if it is registered.

Parameters

  • $alias string
protected

loadFacade ( $alias ) : void

Load a real-time facade for the given alias.

Parameters

  • $alias string
protected

ensureFacadeExists ( $alias ) : string

Ensure that the given alias has an existing real-time facade class.

Parameters

  • $alias string
protected

formatFacadeStub ( $alias , $stub ) : string

Format the facade stub with the proper namespace and class.

Parameters

  • $alias string
  • $stub string
public

alias ( $alias , $class ) : void

Add an alias to the loader.

Parameters

  • $alias string
  • $class string
public

register ( ) : void

Register the loader on the auto-loader stack.

protected

prependToLoaderStack ( ) : void

Prepend the load method to the auto-loader stack.

public

getAliases ( ) : array

Get the registered aliases.

public

setAliases ( array $aliases ) : void

Set the registered aliases.

Parameters

  • $aliases array
public

isRegistered ( ) : bool

Indicates if the loader has been registered.

public

setRegistered ( $value ) : void

Set the "registered" state of the loader.

Parameters

  • $value bool
public static

setFacadeNamespace ( $namespace ) : void

Set the real-time facade namespace.

Parameters

  • $namespace string
public static

setInstance ( $loader ) : void

Set the value of the singleton alias loader.

Parameters

private

__clone ( ) : void

Clone method.