PHP Class Zend\Mvc\Controller\PluginManager

Registers a number of default plugins, and contains an initializer for injecting plugins with the current controller.
Inheritance: extends Zend\ServiceManager\AbstractPluginManager
Afficher le fichier Open project: zendframework/zend-mvc Class Usage Examples

Protected Properties

Свойство Type Description
$aliases Default aliases
$controller Zend\Stdlib\DispatchableInterface
$factories Default factories
$instanceOf string Plugins must be of this type.

Méthodes publiques

Méthode Description
get ( string $name, array $options = null ) : Zend\Stdlib\DispatchableInterface Retrieve a registered instance
getController ( ) : null | Zend\Stdlib\DispatchableInterface Retrieve controller instance
injectController ( object $plugin ) : void Inject a helper instance with the registered controller
setController ( Zend\Stdlib\DispatchableInterface $controller ) : PluginManager Set controller
validate ( $plugin ) Validate a plugin (v3)
validatePlugin ( $plugin ) Validate a plugin (v2)

Method Details

get() public méthode

After the plugin is retrieved from the service locator, inject the controller in the plugin every time it is requested. This is required because a controller can use a plugin and another controller can be dispatched afterwards. If this second controller uses the same plugin as the first controller, the reference to the controller inside the plugin is lost.
public get ( string $name, array $options = null ) : Zend\Stdlib\DispatchableInterface
$name string
$options array
Résultat Zend\Stdlib\DispatchableInterface

getController() public méthode

Retrieve controller instance
public getController ( ) : null | Zend\Stdlib\DispatchableInterface
Résultat null | Zend\Stdlib\DispatchableInterface

injectController() public méthode

Inject a helper instance with the registered controller
public injectController ( object $plugin ) : void
$plugin object
Résultat void

setController() public méthode

Set controller
public setController ( Zend\Stdlib\DispatchableInterface $controller ) : PluginManager
$controller Zend\Stdlib\DispatchableInterface
Résultat PluginManager

validate() public méthode

{@inheritDoc}
public validate ( $plugin )

validatePlugin() public méthode

{@inheritDoc}
public validatePlugin ( $plugin )

Property Details

$aliases protected_oe property

Default aliases
protected $aliases

$controller protected_oe property

protected DispatchableInterface,Zend\Stdlib $controller
Résultat Zend\Stdlib\DispatchableInterface

$factories protected_oe property

Default factories
protected $factories

$instanceOf protected_oe property

Plugins must be of this type.
protected string $instanceOf
Résultat string