Below, please find a guide to the methods available in
Zend_Loader_Autoloader.
Table 103. Zend_Loader_Autoloader Methods
| Method | Return Value | Parameters | Description |
|---|---|---|---|
getInstance() |
Zend_Loader_Autoloader |
N/A |
Retrieve the |
resetInstance() |
void |
N/A |
Resets the state of the
|
autoload($class) |
string| |
|
Attempt to resolve a class name to a file and load it. |
setDefaultAutoloader($callback) |
Zend_Loader_Autoloader |
|
Specify an alternate PHP callback to use for the default autoloader implementation. |
getDefaultAutoloader() |
callback |
N/A |
Retrieve the default autoloader implementation; by default, this is
|
setAutoloaders(array $autoloaders) |
Zend_Loader_Autoloader |
|
Set a list of concrete autoloaders to use in the autoloader stack. Each item in the autoloaders array must be a PHP callback. |
getAutoloaders() |
Array | N/A | Retrieve the internal autoloader stack. |
getNamespaceAutoloaders($namespace) |
Array |
|
Fetch all autoloaders that have registered to load a specific namespace. |
registerNamespace($namespace) |
Zend_Loader_Autoloader |
|
Register one or more namespaces with the default
autoloader. If |
unregisterNamespace($namespace) |
Zend_Loader_Autoloader |
|
Unregister one or more namespaces from the default
autoloader. If |
getRegisteredNamespaces() |
Array | N/A |
Returns an array of all namespaces registered with the default autoloader. |
suppressNotFoundWarnings($flag = null)
|
boolean|Zend_Loader_Autoloader |
|
Set or retrieve the value of the flag used to
indicate whether the default autoloader
implementation should suppress "file not found"
warnings. If no arguments or a |
setFallbackAutoloader($flag) |
Zend_Loader_Autoloader |
|
Set the value of the flag used to indicate whether or not the default autoloader should be used as a fallback or catch-all autoloader for all namespaces. |
isFallbackAutoloader() |
Boolean | N/A |
Retrieve the value of the flag used to indicate whether
or not the default autoloader should be used as a
fallback or catch-all autoloader for all namespaces.
By default, this is |
getClassAutoloaders($class) |
Array |
|
Get the list of namespaced autoloaders that could potentially match the provided class. If none match, all global (non-namespaced) autoloaders are returned. |
unshiftAutoloader($callback, $namespace = '')
|
Zend_Loader_Autoloader |
|
Add a concrete autoloader implementation to the beginning of the internal autoloader stack. If a namespace is provided, that namespace will be used to match optimistically; otherwise, the autoloader will be considered a global autoloader. |
pushAutoloader($callback, $namespace = '')
|
Zend_Loader_Autoloader |
|
Add a concrete autoloader implementation to the end of the internal autoloader stack. If a namespace is provided, that namespace will be used to match optimistically; otherwise, the autoloader will be considered a global autoloader. |
removeAutoloader($callback, $namespace = '')
|
Zend_Loader_Autoloader |
|
Remove a concrete autoloader implementation from the internal autoloader stack. If a namespace or namespaces are provided, the callback will be removed from that namespace or namespaces only. |




