Loader/ClassMapAutoloader.php

Show: inherited
Table of Contents

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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Loader  

\Zend_Loader_ClassMapAutoloader

Package: Zend\Loader

Class-map autoloader

Utilizes class-map files to lookup classfile locations.

Implements
\Zend_Loader_SplAutoloader
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD {@link http://framework.zend.com/license/new-bsd}  

Properties

Propertyprotectedarray $map = array()

Class name/filename map

Default valuearray()Details
Type
array
Propertyprotectedarray $mapsLoaded = array()

Registry of map files that have already been loaded

Default valuearray()Details
Type
array

Methods

methodpublic__construct(null | array | \Traversable $options = null) : void

Constructor

Create a new instance, and optionally configure the autoloader.

Parameters
Name Type Description
$options null | array | \Traversable
methodpublicautoload(string $class) : void

Defined by Autoloadable

Parameters
Name Type Description
$class string
methodpublicconcatPharParts(string $part) : bool
static

Helper callback for filtering phar paths

Parameters
Name Type Description
$part string
Returns
Type Description
bool
methodpublicgetAutoloadMap() : array

Retrieve current autoload map

Returns
Type Description
array
methodprotectedloadMapFromFile(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.

Parameters
Name Type Description
$location string
Returns
Type Description
\Zend_Loader_ClassMapAutoloader | mixed
Throws
Exception Description
\Zend_Loader_Exception_InvalidArgumentException for nonexistent locations
methodpublicrealPharPath(string $path) : string
static

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

Parameters
Name Type Description
$path string
Returns
Type Description
string
Details
See
\global\https://bugs.php.net/bug.php?id=52769  
methodpublicregister() : void

Register the autoloader with spl_autoload registry

Typically, the body of this will simply be:

spl_autoload_register(array($this, 'autoload'));
methodpublicregisterAutoloadMap( $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.

Parameters
Name Type Description
$map
Returns
Type Description
\Zend_Loader_ClassMapAutoloader
methodpublicregisterAutoloadMaps(array $locations) : \Zend_Loader_ClassMapAutoloader

Register many autoload maps at once

Parameters
Name Type Description
$locations array
Returns
Type Description
\Zend_Loader_ClassMapAutoloader
methodpublicresolvePharParentPath(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
methodpublicsetOptions(array | \Traversable $options) : \Zend_Loader_ClassMapAutoloader

Configure the autoloader

Parameters
Name Type Description
$options array | \Traversable
Returns
Type Description
\Zend_Loader_ClassMapAutoloader
Documentation was generated by phpDocumentor 2.0.0a8.