Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
verifyClass example
/** @var string[] $folders */
$folders
=
Shopware
(
)
->
Container
(
)
->
getParameter
(
'shopware.plugin_directories'
)
;
$folders
[
]
=
Shopware
(
)
->
DocPath
(
'engine_Shopware'
)
;
$folders
[
]
=
Shopware
(
)
->
DocPath
(
'vendor_shopware_shopware'
)
;
foreach
(
$folders
as
$folder
)
{
$directories
[
]
=
substr
(
$folder
, \
strlen
(
$docPath
)
)
;
}
if
(
$secure
)
{
$this
->
verifyClass
(
$reflectionClass
,
$docPath
,
$directories
)
;
}
if
(
!
$reflectionClass
->
getConstructor
(
)
)
{
return
$reflectionClass
->
newInstance
(
)
;
}
$constructorParams
=
$reflectionClass
->
getConstructor
(
)
->
getParameters
(
)
;