Class-map autoloader
Utilizes class-map files to lookup classfile locations.
Constructor
Create a new instance, and optionally configure the autoloader.
Parameters: | null|array|Traversable – |
---|
Register an autoload map
An autoload map may be either an associative array, or a file returning an associative array.
An autoload map should be an associative array containing classname/file pairs.
Parameters: | string|array – |
---|---|
Throws ExceptionInvalidArgumentException: | |
Return type: | ClassMapAutoloader |
Register many autoload maps at once
Parameters: | array – |
---|---|
Throws ExceptionInvalidArgumentException: | |
Return type: | ClassMapAutoloader |
Register the autoloader with spl_autoload registry
Return type: | void |
---|
Load a map from a file
If the map has been previously loaded, returns the current instance; otherwise, returns whatever was returned by calling include() on the location.
Parameters: | string – |
---|---|
Return type: | ClassMapAutoloader|mixed |
Throws : | ExceptionInvalidArgumentException for nonexistent locations |