__construct()
autoload()
getModuleClassMap()
getPaths()
normalizePath()
register()
registerPath()
registerPaths()
setModuleClassMap()
setOptions()
unregister()
loadModuleFromDir()
loadModuleFromPhar()
pharFileToModuleName()
$explicitPaths
$moduleClassMap
$namespacedPaths
$paths
$pharBasePath
$pharExtensions
__construct(null | array | \Traversable $options)
Allow configuration of the autoloader via the constructor.
nullarray\Traversable
autoload($class) : mixed
mixed
False [if unable to load $class] get_class($class) [if $class is successfully loaded]getModuleClassMap() : array
array
getPaths() : array
This is primarily for unit testing, but could have other uses.
array
normalizePath(string $path, bool $trailingSlash) : string
string
bool
Whether trailing slash should be included
string
register() : void
Typically, the body of this will simply be:
spl_autoload_register(array($this, 'autoload'));
registerPath(string $path, bool | string $moduleName) : \Zend\Loader\ModuleAutoloader
registerPaths(array | \Traversable $paths) : \Zend\Loader\ModuleAutoloader
setModuleClassMap(array $classmap) : \Zend\Loader\ModuleAutoloader
setOptions(array | \Traversable $options) : \Zend\Loader\ModuleAutoloader
In most cases, $options should be either an associative array or Traversable object.
array\Traversable
unregister() : void
loadModuleFromDir(string $dirPath, string $class) : mixed
string
string
mixed
False [if unable to load $class] get_class($class) [if $class is successfully loaded]loadModuleFromPhar(string $pharPath, string $class) : mixed
string
string
mixed
False [if unable to load $class] get_class($class) [if $class is successfully loaded]pharFileToModuleName(string $pharPath) : string
string
string
$explicitPaths : array
$moduleClassMap : array
$namespacedPaths : array
$paths : array
$pharBasePath : string
$pharExtensions : array