Zend Framework
3.0
|
Class-map autoloader. More...
Public Member Functions | |||
__construct ($options=null) | |||
Constructor. | |||
setOptions ($options) | |||
Configure the autoloader. | |||
registerAutoloadMap ($map) | |||
Register an autoload map. | |||
registerAutoloadMaps ($locations) | |||
Register many autoload maps at once. | |||
getAutoloadMap () | |||
Retrieve current autoload map. | |||
autoload ($class) | |||
Autoload a class.
| |||
register () | |||
Register the autoloader with spl_autoload registry. | |||
Static Public Member Functions | |
static | realPharPath ($path) |
Resolve the real_path() to a file within a phar. | |
Protected Member Functions | |
loadMapFromFile ($location) | |
Load a map from a file. | |
Protected Attributes | |
$mapsLoaded = array() | |
$map = array() | |
Class-map autoloader.
Utilizes class-map files to lookup classfile locations.
__construct | ( | $options = null | ) |
Constructor.
Create a new instance, and optionally configure the autoloader.
null | array | Traversable | $options |
Implements SplAutoloader.
autoload | ( | $class | ) |
Autoload a class.
$class |
Implements SplAutoloader.
getAutoloadMap | ( | ) |
Retrieve current autoload map.
|
protected |
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.
string | $location |
Exception\InvalidArgumentException | for nonexistent locations |
|
static |
Resolve the real_path() to a file within a phar.
string | $path |
register | ( | ) |
registerAutoloadMap | ( | $map | ) |
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.
string | array | $map |
Exception\InvalidArgumentException |
registerAutoloadMaps | ( | $locations | ) |
Register many autoload maps at once.
array | $locations |
Exception\InvalidArgumentException |
setOptions | ( | $options | ) |
Configure the autoloader.
Proxies to registerAutoloadMaps().
array | Traversable | $options |
Implements SplAutoloader.
|
protected |
|
protected |