Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
resolveStack example
return
;
}
$resolvedDefinitions
=
[
]
;
foreach
(
$container
->
getDefinitions
(
)
as
$id
=>
$definition
)
{
if
(
!
isset
(
$stacks
[
$id
]
)
)
{
$resolvedDefinitions
[
$id
]
=
$definition
;
continue
;
}
foreach
(
array_reverse
(
$this
->
resolveStack
(
$stacks
,
[
$id
]
)
, true
)
as
$k
=>
$v
)
{
$resolvedDefinitions
[
$k
]
=
$v
;
}
$alias
=
$container
->
setAlias
(
$id
,
$k
)
;
if
(
$definition
->
getChanges
(
)
[
'public'
]
?? false
)
{
$alias
->
setPublic
(
$definition
->
isPublic
(
)
)
;
}
if
(
$definition
->
isDeprecated
(
)
)
{
$alias
->
setDeprecated
(
...
array_values
(
$definition
->
getDeprecation
(
'%alias_id%'
)
)
)
;
}
return
;
}
$resolvedDefinitions
=
[
]
;
foreach
(
$container
->
getDefinitions
(
)
as
$id
=>
$definition
)
{
if
(
!
isset
(
$stacks
[
$id
]
)
)
{
$resolvedDefinitions
[
$id
]
=
$definition
;
continue
;
}
foreach
(
array_reverse
(
$this
->
resolveStack
(
$stacks
,
[
$id
]
)
, true
)
as
$k
=>
$v
)
{
$resolvedDefinitions
[
$k
]
=
$v
;
}
$alias
=
$container
->
setAlias
(
$id
,
$k
)
;
if
(
$definition
->
getChanges
(
)
[
'public'
]
?? false
)
{
$alias
->
setPublic
(
$definition
->
isPublic
(
)
)
;
}
if
(
$definition
->
isDeprecated
(
)
)
{
$alias
->
setDeprecated
(
...
array_values
(
$definition
->
getDeprecation
(
'%alias_id%'
)
)
)
;
}