PSR-0 compliant autoloader
Allows autoloading both namespaced and vendor-prefixed classes. Class lookups are performed on the filesystem. If a class file for the referenced class is not found, a PHP warning will be raised by include().
package | Zend_Loader |
---|---|
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD {@link http://framework.zend.com/license/new-bsd} |
__construct(null|array|\Traversable $options = null
) : void
Allow configuration of the autoloader via the constructor.
inherited_from | \Zend_Loader_SplAutoloader::__construct() |
---|
null
array
\Traversable
autoload(string $class) : false | string
inherited_from | \Zend_Loader_SplAutoloader::autoload() |
---|
string
false
string
handleError(mixed $errno, mixed $errstr) : void
Used by \loadClass during fallback autoloading in PHP versions prior to 5.3.0.
mixed
mixed
isFallbackAutoloader() : boolean
boolean
register() : void
Typically, the body of this will simply be:
spl_autoload_register(array($this, 'autoload'));
inherited_from | \Zend_Loader_SplAutoloader::register() |
---|
registerNamespace(string $namespace, string $directory) : \Zend_Loader_StandardAutoloader
string
string
\Zend_Loader_StandardAutoloader
registerNamespaces(array $namespaces) : \Zend_Loader_StandardAutoloader
array
\Zend_Loader_StandardAutoloader
registerPrefix(string $prefix, string $directory) : \Zend_Loader_StandardAutoloader
string
string
\Zend_Loader_StandardAutoloader
registerPrefixes(array $prefixes) : \Zend_Loader_StandardAutoloader
array
\Zend_Loader_StandardAutoloader
setFallbackAutoloader(boolean $flag) : \Zend_Loader_StandardAutoloader
boolean
\Zend_Loader_StandardAutoloader
setOptions(array|\Traversable $options) : \Zend_Loader_StandardAutoloader
Allows specifying both "namespace" and "prefix" pairs, using the
following structure:
array(
'namespaces' => array(
'Zend' => '/path/to/Zend/library',
'Doctrine' => '/path/to/Doctrine/library',
),
'prefixes' => array(
'Phly_' => '/path/to/Phly/library',
),
'fallback_autoloader' => true,
)
inherited_from | \Zend_Loader_SplAutoloader::setOptions() |
---|
array
\Traversable
\Zend_Loader_StandardAutoloader
loadClass(string $class, string $type) : void
string
string
normalizeDirectory(string $directory) : string
string
string
transformClassNameToFilename(string $class, string $directory) : string
string
string
string
$error : boolean
$fallbackAutoloaderFlag : boolean
false
$namespaces : array
array()
$prefixes : array
array()
ACT_AS_FALLBACK = 'fallback_autoloader'
AUTOREGISTER_ZF = 'autoregister_zf'
LOAD_NS = 'namespaces'
LOAD_PREFIX = 'prefixes'
NS_SEPARATOR = '\\'
PREFIX_SEPARATOR = '_'