315. Class

315.1. Zend\Mvc\Controller\PluginManager

Plugin manager implementation for controllers

Registers a number of default plugins, and contains an initializer for injecting plugins with the current controller.

315.1.1. Methods

315.1.1.1. __construct

__construct()

Constructor

After invoking parent constructor, add an initializer to inject the attached controller, if any, to the currently requested plugin.

Parameters:null|ConfigInterface

315.1.1.2. get

get()

Retrieve a registered instance

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.

Parameters:
  • string
  • mixed
  • bool
Return type:

mixed

315.1.1.3. setController

setController()

Set controller

Parameters:DispatchableInterface
Return type:PluginManager

315.1.1.4. getController

getController()

Retrieve controller instance

Return type:null|DispatchableInterface

315.1.1.5. injectController

injectController()

Inject a helper instance with the registered controller

Parameters:object
Return type:void

315.1.1.6. validatePlugin

validatePlugin()

Validate the plugin

Any plugin is considered valid in this context.

Parameters:mixed
Return type:void
Throws :ExceptionInvalidPluginException

Project Versions

Table Of Contents

Previous topic

314. Class

Next topic

316. Class

This Page