Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getReferenceCall example
protected
function
dumpValue
(
$value
)
{
if
(
is_array
(
$value
)
)
{
$code
=
[
]
;
foreach
(
$value
as
$k
=>
$v
)
{
$code
[
$k
]
=
$this
->
dumpValue
(
$v
)
;
}
return
$code
;
}
elseif
(
$value
instanceof Reference
)
{
return
$this
->
getReferenceCall
(
(string)
$value
,
$value
)
;
}
elseif
(
$value
instanceof Definition
)
{
return
$this
->
getPrivateServiceCall
(
NULL,
$value
)
;
}
elseif
(
$value
instanceof Parameter
)
{
return
$this
->
getParameterCall
(
(string)
$value
)
;
}
elseif
(
is_string
(
$value
)
&&
str_contains
(
$value
, '%'
)
)
{
if
(
preg_match
(
'/^%([^%]+)%$/',
$value
,
$matches
)
)
{
return
$this
->
getParameterCall
(
$matches
[
1
]
)
;
}