Skip to content

Commit

Permalink
rollback use $this in createDelegatorFromFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Jan 13, 2015
1 parent 0befd64 commit 68a626a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions library/Zend/ServiceManager/ServiceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1142,9 +1142,10 @@ protected function checkNestedContextStop($force = false)
*/
protected function createDelegatorFromFactory($canonicalName, $requestedName)
{
$serviceManager = $this;
$delegatorsCount = count($this->delegators[$canonicalName]);
$creationCallback = function () use ($requestedName, $canonicalName) {
return $this->doCreate($requestedName, $canonicalName);
$creationCallback = function () use ($serviceManager, $requestedName, $canonicalName) {
return $serviceManager->doCreate($requestedName, $canonicalName);
};

for ($i = 0; $i < $delegatorsCount; $i += 1) {
Expand Down

0 comments on commit 68a626a

Please sign in to comment.