composer package updates
[openemr.git] / vendor / zendframework / zend-mvc / src / Controller / PluginManagerSM3.php
blob569d7117b07494e5231a9f551ab38d9c1c2c3dd0
1 <?php
2 /**
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
6 */
8 namespace Zend\Mvc\Controller;
10 use Zend\Stdlib\DispatchableInterface;
12 class PluginManagerSM3 extends AbstractPluginManager
14 /**
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
22 * plugin is lost.
24 * @param string $name
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);
33 return $plugin;