Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getFunctionNodeClass example
foreach
(
$this
->
parseArguments
(
)
as
$n
)
{
$arguments
->
addElement
(
$n
)
;
}
$node
=
new
MethodCallExpression
(
$alias
[
'node'
]
,
$alias
[
'name'
]
,
$arguments
,
$line
)
;
$node
->
setAttribute
(
'safe', true
)
;
return
$node
;
}
$args
=
$this
->
parseArguments
(
true
)
;
$class
=
$this
->
getFunctionNodeClass
(
$name
,
$line
)
;
return
new
$class
(
$name
,
$args
,
$line
)
;
}
}
public
function
parseSubscriptExpression
(
$node
)
{
$stream
=
$this
->parser->
getStream
(
)
;
$token
=
$stream
->
next
(
)
;
$lineno
=
$token
->
getLine
(
)
;
$arguments
=
new
ArrayExpression
(
[
]
,
$lineno
)
;