Loader/AutoloaderFactory.php

Show: PublicProtectedPrivateinherited
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 license@zend.com 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_AutoloaderFactory

Package: Zend_Loader
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

>VConstant  STANDARD_AUTOLOADER = 'Zend_Loader_StandardAutoloader'

Properties

>VPropertyprotectedarray $loaders = array()
static

All autoloaders registered using the factory

Default valuearray()Details
Type
array
>VPropertyprotected\Zend_Loader_StandardAutoloader $standardAutoloader
static

StandardAutoloader instance for resolving autoloader classes via the include_path

Methods

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

Factory for autoloaders

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 {@link 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
NameTypeDescription
$optionsarray | \Traversable

(optional) options to use. Defaults to Zend_Loader_StandardAutoloader

Throws
ExceptionDescription
\Zend_Loader_Exception_InvalidArgumentExceptionfor invalid options
\Zend_Loader_Exception_InvalidArgumentExceptionfor unloadable autoloader classes
methodpublicgetRegisteredAutoloader(string $class) : \Zend_Loader_SplAutoloader
static

Retrieves an autoloader by class name

Parameters
NameTypeDescription
$classstring
Returns
TypeDescription
\Zend_Loader_SplAutoloader
Throws
ExceptionDescription
\Zend_Loader_Exception_InvalidArgumentExceptionfor non-registered class
methodpublicgetRegisteredAutoloaders() : array
static

Get an list of all autoloaders registered with the factory

Returns an array of autoloader instances.
Returns
TypeDescription
array
methodprotectedgetStandardAutoloader() : \Zend_Loader_SplAutoloader
static

Get an instance of the standard autoloader

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
TypeDescription
\Zend_Loader_SplAutoloader
methodpublicunregisterAutoloader(string $autoloaderClass) : bool
static

Unregister a single autoloader by class name

Parameters
NameTypeDescription
$autoloaderClassstring
Returns
TypeDescription
bool
methodpublicunregisterAutoloaders() : void
static

Unregisters all autoloaders that have been registered via the factory.

This will NOT unregister autoloaders registered outside of the fctory.
Documentation was generated by phpDocumentor 2.2.0 .