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

Commit

Permalink
Merge pull request zendframework/zendframework#2013 from weierophinne…
Browse files Browse the repository at this point in the history
…y/hotfix/servicemanager-awareinterface

[zen-92] cleanup ServiceManager vs ServiceLocator aware
  • Loading branch information
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/AbstractPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ public function __construct(ConfigInterface $configuration = null)
parent::__construct($configuration);
$self = $this;
$this->addInitializer(function ($instance) use ($self) {
if ($instance instanceof ServiceLocatorAwareInterface) {
$instance->setServiceLocator($self);
}
if ($instance instanceof ServiceManagerAwareInterface) {
$instance->setServiceManager($self);
}
Expand Down

0 comments on commit a5cb2da

Please sign in to comment.