Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

create controller via Zend\Mvc\Controller\ControllerManager #3085

Merged
merged 1 commit into from
Feb 15, 2013

Conversation

weierophinney
Copy link
Member

when create controller via Zend\Mvc\Controller\ControllerManager,
ControllerManager injecting into public PluginManager new controller instance.
If I have another controller (early createt), and try to use plugin, such as params() - this plugin is linked to second controller, and not work correctly.

workarround :

class AbstractActionController extends \Zend\Mvc\Controller\AbstractActionController {
    public function getPluginManager() {
        return parent::getPluginManager()->setController($this);
    }
}

@ghost ghost assigned weierophinney Feb 13, 2013
@weierophinney
Copy link
Member

I've verified the issue, and am working on a fix.

- When fetching the plugin manager, inject the current controller
  *always*; this ensures that if a plugin is retrieved, it receives the
  controller that actually requested it.
@ralphschindler ralphschindler merged commit bb2e97b into zendframework:master Feb 15, 2013
ralphschindler added a commit that referenced this pull request Feb 15, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants