[Container] Tweak code
This commit is contained in:
parent
132e5805b3
commit
cb445b9ca0
@ -57,6 +57,10 @@ class Container implements ContainerInterface
|
|||||||
{
|
{
|
||||||
protected $parameterBag;
|
protected $parameterBag;
|
||||||
protected $services;
|
protected $services;
|
||||||
|
protected $scopes;
|
||||||
|
protected $scopeChildren;
|
||||||
|
protected $scopedServices;
|
||||||
|
protected $scopeStacks;
|
||||||
protected $loading = array();
|
protected $loading = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -350,14 +354,9 @@ class Container implements ContainerInterface
|
|||||||
$this->scopeChildren[$name] = array();
|
$this->scopeChildren[$name] = array();
|
||||||
|
|
||||||
// normalize the child relations
|
// normalize the child relations
|
||||||
if ($parentScope !== self::SCOPE_CONTAINER) {
|
while ($parentScope !== self::SCOPE_CONTAINER) {
|
||||||
$this->scopeChildren[$parentScope][] = $name;
|
$this->scopeChildren[$parentScope][] = $name;
|
||||||
|
$parentScope = $this->scopes[$parentScope];
|
||||||
foreach ($this->scopeChildren as $pName => $childScopes) {
|
|
||||||
if (in_array($parentScope, $childScopes, true)) {
|
|
||||||
$this->scopeChildren[$pName][] = $name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user