Constructor
Allow configuration of the autoloader via the constructor.
Parameters: | null|array|Traversable – |
---|
Configure the autoloader
In most cases, $options should be either an associative array or Traversable object.
Parameters: | array|Traversable – |
---|---|
Return type: | ModuleAutoloader |
Retrieves the class map for all loaded modules.
Return type: | array |
---|
Sets the class map used to speed up the module autoloading.
Parameters: | array – |
---|---|
Return type: | ModuleLoader |
Autoload a class
Parameters: | $class – |
---|---|
Return type: | mixed False [if unable to load $class] get_class($class) [if $class is successfully loaded] |
loadModuleFromDir
Parameters: |
|
---|---|
Return type: | mixed False [if unable to load $class] get_class($class) [if $class is successfully loaded] |
loadModuleFromPhar
Parameters: |
|
---|---|
Return type: | mixed False [if unable to load $class] get_class($class) [if $class is successfully loaded] |
Register the autoloader with spl_autoload registry
Return type: | void |
---|
Unregister the autoloader with spl_autoload registry
Return type: | void |
---|
registerPaths
Parameters: | array|Traversable – |
---|---|
Throws InvalidArgumentException: | |
Return type: | ModuleAutoloader |
registerPath
Parameters: |
|
---|---|
Throws InvalidArgumentException: | |
Return type: | ModuleAutoloader |
getPaths
This is primarily for unit testing, but could have other uses.
Return type: | array |
---|