Factory for autoloaders
Options should be an array or Traversable object of the following structure: <code> array(
‘<autoloader class name>’ => $autoloaderOptions,
) </code>
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: | array|Traversable – (optional) options to use. Defaults to ZendLoaderStandardAutoloader |
---|---|
Return type: | void |
Throws : | ExceptionInvalidArgumentException for invalid options |
Throws : | ExceptionInvalidArgumentException for unloadable autoloader classes |
Throws : | ExceptionDomainException for autoloader classes not implementing SplAutoloader |
Get an list of all autoloaders registered with the factory
Returns an array of autoloader instances.
Return type: | array |
---|
Retrieves an autoloader by class name
Parameters: | string – |
---|---|
Return type: | SplAutoloader |
Throws : | ExceptionInvalidArgumentException for non-registered class |
Unregisters all autoloaders that have been registered via the factory. This will NOT unregister autoloaders registered outside of the fctory.
Return type: | void |
---|
Unregister a single autoloader by class name
Parameters: | string – |
---|---|
Return type: | bool |
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” namespace.
Return type: | SplAutoloader |
---|