package Zend_Loader
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Factory for autoloaders

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

Options should be an array or Traversable object of the following structure: array( '' => $autoloaderOptions, )

The factory will then loop through and instantiate each autoloader with the specified options, and register each with the spl_autoloader.

You may retrieve the concrete autoloader instances later using \getRegisteredAutoloaders().

Note that the class names must be resolvable on the include_path or via the Zend library, using PSR-0 rules (unless the class has already been loaded).

Parameters

$options

array\Traversable

(optional) options to use. Defaults to Zend_Loader_StandardAutoloader

Exceptions

\Zend_Loader_Exception_InvalidArgumentException for invalid options
\Zend_Loader_Exception_InvalidArgumentException for unloadable autoloader classes

Retrieves an autoloader by class name

getRegisteredAutoloader(string $class) : \Zend_Loader_SplAutoloader
Static

Parameters

$class

string

Exceptions

\Zend_Loader_Exception_InvalidArgumentException for non-registered class

Returns

\Zend_Loader_SplAutoloader

Get an list of all autoloaders registered with the factory

getRegisteredAutoloaders() : array
Static

Returns an array of autoloader instances.

Returns

array

Unregister a single autoloader by class name

unregisterAutoloader(string $autoloaderClass) : boolean
Static

Parameters

$autoloaderClass

string

Returns

boolean

Unregisters all autoloaders that have been registered via the factory.

unregisterAutoloaders() : void
Static

This will NOT unregister autoloaders registered outside of the fctory.

Get an instance of the standard autoloader

getStandardAutoloader() : \Zend_Loader_SplAutoloader
Static

Used to attempt to resolve autoloader classes, using the StandardAutoloader. The instance is marked as a fallback autoloader, to allow resolving autoloaders not under the "Zend" or "Zend" namespaces.

Returns

\Zend_Loader_SplAutoloader

 Properties

 

All autoloaders registered using the factory

$loaders : array

Default

array()
Static
 

StandardAutoloader instance for resolving autoloader classes via the include_path

$standardAutoloader : \Zend_Loader_StandardAutoloader

Default

Static

 Constants

 

CLASS_MAP_AUTOLOADER

CLASS_MAP_AUTOLOADER = 'Zend_Loader_ClassMapAutoloader' 
 

STANDARD_AUTOLOADER

STANDARD_AUTOLOADER = 'Zend_Loader_StandardAutoloader'