1108. Class

1108.1. Zend\Loader\AutoloaderFactory

1108.1.1. Methods

1108.1.1.1. factory

factory()

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

1108.1.1.2. getRegisteredAutoloaders

getRegisteredAutoloaders()

Get an list of all autoloaders registered with the factory

Returns an array of autoloader instances.

Return type:array

1108.1.1.3. getRegisteredAutoloader

getRegisteredAutoloader()

Retrieves an autoloader by class name

Parameters:string
Return type:SplAutoloader
Throws :ExceptionInvalidArgumentException for non-registered class

1108.1.1.4. unregisterAutoloaders

unregisterAutoloaders()

Unregisters all autoloaders that have been registered via the factory. This will NOT unregister autoloaders registered outside of the fctory.

Return type:void

1108.1.1.5. unregisterAutoloader

unregisterAutoloader()

Unregister a single autoloader by class name

Parameters:string
Return type:bool

1108.1.1.6. getStandardAutoloader

getStandardAutoloader()

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

1108.1.1.7. isSubclassOf

isSubclassOf()

Checks if the object has this class as one of its parents

Parameters:
  • string
  • string
Return type:

bool

1108.1.2. Constants

1108.1.2.1. STANDARD_AUTOLOADER