Plugin class locator interface

package Default

 Methods

Constructor

__construct(null|array|\Traversable $map = null

Parameters

$map

nullarray\Traversable

If provided, seeds the loader with a map

Add a static map of plugins

addStaticMap(null|array|\Traversable $map) : void
Static

A null value will clear the static map.

Parameters

$map

nullarray\Traversable

Exceptions

\Zend\Loader\Exception\InvalidArgumentException

Return full class name for a named helper

getClassName(string $name) : string | false

Parameters

$name

string

Returns

stringfalse

Defined by IteratorAggregate

getIterator() : \ArrayIterator

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

Returns

\ArrayIterator

Get a list of all registered plugins

getRegisteredPlugins() : array | \Traversable
inherited_from \Zend\Loader\PluginClassLocator::getRegisteredPlugins()

Returns

array\Traversable

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

isLoaded(string $name) : boolean

Parameters

$name

string

Returns

boolean

Load a helper via the name provided

load(string $name) : string | false

Parameters

$name

string

Returns

stringfalse

Register a class to a given short name

registerPlugin(string $shortName, string $className) : \Zend\Loader\PluginClassLoader
inherited_from \Zend\Loader\PluginClassLocator::registerPlugin()

Parameters

$shortName

string

$className

string

Returns

\Zend\Loader\PluginClassLoader

Register many plugins at once

registerPlugins(string|array|\Traversable $map) : \Zend\Loader\PluginClassLoader

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

$map

stringarray\Traversable

Exceptions

\Zend\Loader\Exception\InvalidArgumentException

Returns

\Zend\Loader\PluginClassLoader

Unregister a short name lookup

unregisterPlugin(mixed $shortName) : \Zend\Loader\PluginClassLoader
inherited_from \Zend\Loader\PluginClassLocator::unregisterPlugin()

Parameters

$shortName

mixed

Returns

\Zend\Loader\PluginClassLoader

 Properties

 

List of plugin name => class name pairs

$plugins : array

Default

array()
 

Static map allow global seeding of plugin loader

$staticMap : array

Default

array()
Static