1109. Class

1109.1. Zend\Loader\ClassMapAutoloader

Class-map autoloader

Utilizes class-map files to lookup classfile locations.

1109.1.1. Methods

1109.1.1.1. __construct

__construct()

Constructor

Create a new instance, and optionally configure the autoloader.

Parameters:null|array|Traversable

1109.1.1.2. setOptions

setOptions()

Configure the autoloader

Proxies to {@link registerAutoloadMaps()}.

Parameters:array|Traversable
Return type:ClassMapAutoloader

1109.1.1.3. registerAutoloadMap

registerAutoloadMap()

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

1109.1.1.4. registerAutoloadMaps

registerAutoloadMaps()

Register many autoload maps at once

Parameters:array
Throws ExceptionInvalidArgumentException:
 
Return type:ClassMapAutoloader

1109.1.1.5. getAutoloadMap

getAutoloadMap()

Retrieve current autoload map

Return type:array

1109.1.1.6. autoload

autoload()

{@inheritDoc}

1109.1.1.7. register

register()

Register the autoloader with spl_autoload registry

Return type:void

1109.1.1.8. loadMapFromFile

loadMapFromFile()

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

1109.1.1.9. realPharPath

realPharPath()

Resolve the real_path() to a file within a phar.

Parameters:string
Return type:string