fixed bug in ioc container singleton resolution.
This commit is contained in:
parent
2c2dcdc502
commit
f50a492510
|
@ -179,7 +179,12 @@ public function resolve($name, $parameters = array())
|
||||||
|
|
||||||
$object = call_user_func($this->registry[$name]['resolver'], $this, $parameters);
|
$object = call_user_func($this->registry[$name]['resolver'], $this, $parameters);
|
||||||
|
|
||||||
return (isset($this->registry[$name]['singleton'])) ? $this->singletons[$name] = $object : $object;
|
if (isset($this->registry[$name]['singleton']) and $this->registry[$name]['singleton'])
|
||||||
|
{
|
||||||
|
return $this->singletons[$name] = $object;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $object;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue