PHP Class Pop\Loader\Autoloader

Author: Nick Sagona, III ([email protected])
Afficher le fichier Open project: nicksagona/PopPHP Class Usage Examples

Protected Properties

Свойство Type Description
$classmap array Class map array.
$fallback boolean Flag to make the autoloader the fallback autoloader or not
$prefixes array Array of available namespaces prefixes.
$suppress boolean Flag to suppress warnings

Méthodes publiques

Méthode Description
__construct ( boolean $self = true ) : Autoloader Constructor
__invoke ( string $class ) : void Invoke the class
factory ( boolean $self = true ) : Autoloader Static method to instantiate the autoloader object
loadClassMap ( string $classmap ) : Autoloader Load a class map file
register ( string $namespace, string $directory ) : Autoloader Register a namespace and directory location with the autoloader
splAutoloadRegister ( boolean $suppress = true, boolean $fallback = false ) : Autoloader Register the autoloader instance with the SPL

Method Details

__construct() public méthode

Instantiate the archive object
public __construct ( boolean $self = true ) : Autoloader
$self boolean
Résultat Autoloader

__invoke() public méthode

Credit to Andreas Schipplock for helping to improve this method: https://github.com/schipplock
public __invoke ( string $class ) : void
$class string
Résultat void

factory() public static méthode

Static method to instantiate the autoloader object
public static factory ( boolean $self = true ) : Autoloader
$self boolean
Résultat Autoloader

loadClassMap() public méthode

Load a class map file
public loadClassMap ( string $classmap ) : Autoloader
$classmap string
Résultat Autoloader

register() public méthode

Register a namespace and directory location with the autoloader
public register ( string $namespace, string $directory ) : Autoloader
$namespace string
$directory string
Résultat Autoloader

splAutoloadRegister() public méthode

Register the autoloader instance with the SPL
public splAutoloadRegister ( boolean $suppress = true, boolean $fallback = false ) : Autoloader
$suppress boolean
$fallback boolean
Résultat Autoloader

Property Details

$classmap protected_oe property

Class map array.
protected array $classmap
Résultat array

$fallback protected_oe property

Flag to make the autoloader the fallback autoloader or not
protected bool $fallback
Résultat boolean

$prefixes protected_oe property

Array of available namespaces prefixes.
protected array $prefixes
Résultat array

$suppress protected_oe property

Flag to suppress warnings
protected bool $suppress
Résultat boolean