Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Remove double injection in Plugin Controller Manager #3662

Closed
wants to merge 2 commits into from

3 participants

Blanchon Vincent Matthew Weier O'Phinney Abdul Malik Ikhsan
Blanchon Vincent

Injection is in the constructor with the initializer

Blanchon Vincent blanchonvincent Remove double injection
Injection is in the constructor with the initializer
ef777e7
Matthew Weier O'Phinney
Blanchon Vincent

@weierophinney I remove the initializer in the constructor

Abdul Malik Ikhsan samsonasik commented on the diff
library/Zend/Mvc/Controller/PluginManager.php
@@ -60,7 +60,7 @@ class PluginManager extends AbstractPluginManager
* After invoking parent constructor, add an initializer to inject the
* attached controller, if any, to the currently requested plugin.
*
- * @param null|ConfigInterface $configuration
+ * @param null|ConfigInterface $configuration

double space after @param , already correct before .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Matthew Weier O'Phinney weierophinney was assigned
Matthew Weier O'Phinney weierophinney referenced this pull request from a commit
Matthew Weier O'Phinney weierophinney Merge branch 'hotfix/3662' into develop
Forward port #3662
748747b
Deleted user Unknown referenced this pull request from a commit
Matthew Weier O'Phinney weierophinney Merge branch 'hotfix/3662'
Close #3662
7f2e338
Deleted user Unknown referenced this pull request from a commit
Matthew Weier O'Phinney weierophinney Merge branch 'hotfix/3662' into develop
Forward port #3662
8875fae
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 4, 2013
  1. Blanchon Vincent

    Remove double injection

    blanchonvincent authored
    Injection is in the constructor with the initializer
  2. Blanchon Vincent
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 4 deletions.
  1. +5 −4 library/Zend/Mvc/Controller/PluginManager.php
9 library/Zend/Mvc/Controller/PluginManager.php
View
@@ -60,7 +60,7 @@ class PluginManager extends AbstractPluginManager
* After invoking parent constructor, add an initializer to inject the
* attached controller, if any, to the currently requested plugin.
*
- * @param null|ConfigInterface $configuration
+ * @param null|ConfigInterface $configuration

double space after @param , already correct before .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
*/
public function __construct(ConfigInterface $configuration = null)
{
@@ -73,10 +73,9 @@ public function __construct(ConfigInterface $configuration = null)
return $plugin;
}
$plugin->setAuthenticationService($services->get('Zend\Authentication\AuthenticationService'));
+
return $plugin;
});
-
- $this->addInitializer(array($this, 'injectController'));
}
/**
@@ -98,6 +97,7 @@ public function get($name, $options = array(), $usePeeringServiceManagers = true
{
$plugin = parent::get($name, $options, $usePeeringServiceManagers);
$this->injectController($plugin);
+
return $plugin;
}
@@ -110,6 +110,7 @@ public function get($name, $options = array(), $usePeeringServiceManagers = true
public function setController(DispatchableInterface $controller)
{
$this->controller = $controller;
+
return $this;
}
@@ -151,7 +152,7 @@ public function injectController($plugin)
*
* Any plugin is considered valid in this context.
*
- * @param mixed $plugin
+ * @param mixed $plugin
* @return void
* @throws Exception\InvalidPluginException
*/
Something went wrong with that request. Please try again.