Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
MethodReflection example
&& !
str_starts_with
(
$method
->
getName
(
)
, '__'
)
&&
$this
->hookManager->
hasHooks
(
$class
->
getName
(
)
,
$method
->
getName
(
)
)
;
}
)
;
}
/** * @return MethodGenerator */
protected
function
createMethodGenerator
(
ReflectionMethod
$method
)
{
$originalMethod
=
new
MethodReflection
(
$method
->
getDeclaringClass
(
)
->
getName
(
)
,
$method
->
getName
(
)
)
;
// Prepare parameters for the hook manager
$params
=
array_map
(
function
D
$parameter
)
{
$value
= '$' .
$parameter
->
getName
(
)
;
if
(
$parameter
->
isPassedByReference
(
)
)
{
$value
= '&' .
$value
;
}