factory()
getRegisteredAutoloader()
getRegisteredAutoloaders()
unregisterAutoloader()
unregisterAutoloaders()
getStandardAutoloader()
isSubclassOf()
$loaders
$standardAutoloader
STANDARD_AUTOLOADER
factory(array | \Traversable $options) : void
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).
array\Traversable
(optional) options to use. Defaults to Zend\Loader\StandardAutoloader
\Zend\Loader\Exception\InvalidArgumentException |
for invalid options |
---|---|
\Zend\Loader\Exception\InvalidArgumentException |
for unloadable autoloader classes |
\Zend\Loader\Exception\DomainException |
for autoloader classes not implementing SplAutoloader |
getRegisteredAutoloader(string $class) : \Zend\Loader\SplAutoloader
string
\Zend\Loader\Exception\InvalidArgumentException |
for non-registered class |
---|
getRegisteredAutoloaders() : array
Returns an array of autoloader instances.
array
unregisterAutoloader(string $autoloaderClass) : bool
string
bool
unregisterAutoloaders() : void
This will NOT unregister autoloaders registered outside of the fctory.
getStandardAutoloader() : \Zend\Loader\SplAutoloader
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.
isSubclassOf(string $className, string $type) : bool
see | \Zend\Loader\https://bugs.php.net/bug.php?id=53727 |
---|---|
see | \Zend\Loader\https://github.com/zendframework/zf2/pull/1807 |
deprecated | since zf 2.3 requires PHP >= 5.3.23 |
string
string
bool
$loaders : array
$standardAutoloader : \Zend\Loader\StandardAutoloader
STANDARD_AUTOLOADER