1115. Class

1115.1. Zend\Loader\PluginClassLoader

Plugin class locator interface

1115.1.1. Methods

1115.1.1.1. __construct

__construct()

Constructor

Parameters:null|array|Traversable – If provided, seeds the loader with a map

1115.1.1.2. addStaticMap

addStaticMap()

Add a static map of plugins

A null value will clear the static map.

Parameters:null|array|Traversable
Throws ExceptionInvalidArgumentException:
 
Return type:void

1115.1.1.3. registerPlugin

registerPlugin()

Register a class to a given short name

Parameters:
  • string
  • string
Return type:

PluginClassLoader

1115.1.1.4. registerPlugins

registerPlugins()

Register many plugins at once

If $map is a string, assumes that the map is the class name of a Traversable object (likely a ShortNameLocator); it will then instantiate this class and use it to register plugins.

If $map is an array or Traversable object, it will iterate it to register plugin names/classes.

For all other arguments, or if the string $map is not a class or not a Traversable class, an exception will be raised.

Parameters:string|array|Traversable
Return type:PluginClassLoader
Throws :ExceptionInvalidArgumentException

1115.1.1.5. unregisterPlugin

unregisterPlugin()

Unregister a short name lookup

Parameters:mixed
Return type:PluginClassLoader

1115.1.1.6. getRegisteredPlugins

getRegisteredPlugins()

Get a list of all registered plugins

Return type:array|Traversable

1115.1.1.7. isLoaded

isLoaded()

Whether or not a plugin by a specific name has been registered

Parameters:string
Return type:bool

1115.1.1.8. getClassName

getClassName()

Return full class name for a named helper

Parameters:string
Return type:string|false

1115.1.1.9. load

load()

Load a helper via the name provided

Parameters:string
Return type:string|false

1115.1.1.10. getIterator

getIterator()

Defined by IteratorAggregate

Returns an instance of ArrayIterator, containing a map of all plugins

Return type:ArrayIterator