Zend Framework
3.0
|
Plugin class locator interface. More...
Public Member Functions | |
__construct ($map=null) | |
Constructor. | |
registerPlugin ($shortName, $className) | |
Register a class to a given short name. | |
registerPlugins ($map) | |
Register many plugins at once. | |
unregisterPlugin ($shortName) | |
Unregister a short name lookup. | |
getRegisteredPlugins () | |
Get a list of all registered plugins. | |
isLoaded ($name) | |
Whether or not a plugin by a specific name has been registered. | |
getClassName ($name) | |
Return full class name for a named helper. | |
load ($name) | |
Load a helper via the name provided. | |
getIterator () | |
Defined by IteratorAggregate. | |
Static Public Member Functions | |
static | addStaticMap ($map) |
Add a static map of plugins. | |
Protected Attributes | |
$plugins = array() | |
Static Protected Attributes | |
static | $staticMap = array() |
Plugin class locator interface.
__construct | ( | $map = null | ) |
Constructor.
null | array | Traversable | $map | If provided, seeds the loader with a map |
|
static |
Add a static map of plugins.
A null value will clear the static map.
null | array | Traversable | $map |
Exception\InvalidArgumentException |
getClassName | ( | $name | ) |
Return full class name for a named helper.
string | $name |
Implements ShortNameLocator.
getIterator | ( | ) |
Defined by IteratorAggregate.
Returns an instance of ArrayIterator, containing a map of all plugins
getRegisteredPlugins | ( | ) |
isLoaded | ( | $name | ) |
Whether or not a plugin by a specific name has been registered.
string | $name |
Implements ShortNameLocator.
load | ( | $name | ) |
Load a helper via the name provided.
string | $name |
Implements ShortNameLocator.
registerPlugin | ( | $shortName, | |
$className | |||
) |
Register a class to a given short name.
string | $shortName | |
string | $className |
Implements PluginClassLocator.
registerPlugins | ( | $map | ) |
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.
string | array | Traversable | $map |
Exception\InvalidArgumentException |
unregisterPlugin | ( | $shortName | ) |
Unregister a short name lookup.
mixed | $shortName |
Implements PluginClassLocator.
|
protected |
|
staticprotected |