3 * @see https://github.com/zendframework/zend-mvc for the canonical source repository
4 * @copyright Copyright (c) 2018 Zend Technologies USA Inc. (https://www.zend.com)
5 * @license https://github.com/zendframework/zend-mvc/blob/master/LICENSE.md New BSD License
8 namespace Zend\Mvc\Controller
;
10 use Zend\Stdlib\DispatchableInterface
;
12 class PluginManagerSM3
extends AbstractPluginManager
15 * Retrieve a registered instance
17 * After the plugin is retrieved from the service locator, inject the
18 * controller in the plugin every time it is requested. This is required
19 * because a controller can use a plugin and another controller can be
20 * dispatched afterwards. If this second controller uses the same plugin
21 * as the first controller, the reference to the controller inside the
25 * @param null|array $options
26 * @return DispatchableInterface
28 public function get($name, array $options = null)
30 $plugin = parent
::get($name, $options);
31 $this->injectController($plugin);