Loader/ClassMapAutoloader.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Loader
\Zend_Loader_ClassMapAutoloader
Package: Zend_Loader
Returns
Throws
Returns
Returns
Class-map autoloader
Utilizes class-map files to lookup classfile locations.
- Implements
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD {@link http://framework.zend.com/license/new-bsd}
Properties
Methods
__construct(null | array | \Traversable $options = null) : void
Constructor
Create a new instance, and optionally configure the autoloader.
ParametersName | Type | Description |
---|---|---|
$options | null | array | \Traversable |
concatPharParts(string $part) : bool
static
Helper callback for filtering phar paths
Parameters
Returns
Name | Type | Description |
---|---|---|
$part | string |
Type | Description |
---|---|
bool |
loadMapFromFile(string $location) : \Zend_Loader_ClassMapAutoloader | mixed
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.
ParametersName | Type | Description |
---|---|---|
$location | string |
Type | Description |
---|---|
\Zend_Loader_ClassMapAutoloader | mixed |
Exception | Description |
---|---|
\Zend_Loader_Exception_InvalidArgumentException | for nonexistent locations |
registerAutoloadMap( $map) : \Zend_Loader_ClassMapAutoloader
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.
ParametersName | Type | Description |
---|---|---|
$map |
Type | Description |
---|---|
\Zend_Loader_ClassMapAutoloader |
registerAutoloadMaps(array $locations) : \Zend_Loader_ClassMapAutoloader
Register many autoload maps at once
Parameters
Returns
Name | Type | Description |
---|---|---|
$locations | array |
Type | Description |
---|---|
\Zend_Loader_ClassMapAutoloader |
resolvePharParentPath(string $value, int $key, array $parts) : void
static
Helper callback to resolve a parent path in a Phar archive
Parameters
Name | Type | Description |
---|---|---|
$value | string | |
$key | int | |
$parts | array |
setOptions(array | \Traversable $options) : \Zend_Loader_ClassMapAutoloader
Configure the autoloader
Proxies to {@link registerAutoloadMaps()}.
ParametersName | Type | Description |
---|---|---|
$options | array | \Traversable |
Type | Description |
---|---|
\Zend_Loader_ClassMapAutoloader |