Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
validateStruct example
$violations
=
array_merge_recursive
(
$violations
,
$this
->
checkEntityNameConstant
(
$definition
)
)
;
$struct
= ArrayEntity::
class
;
if
(
!
$definition
instanceof MappingEntityDefinition
)
{
$struct
=
$definition
->
getEntityClass
(
)
;
}
if
(
$struct
!== ArrayEntity::
class
)
{
$violations
[
$definition
->
getClass
(
)
]
=
array_merge
(
$violations
[
$definition
->
getClass
(
)
]
,
$this
->
validateStruct
(
$struct
,
$definition
)
)
;
$violations
[
$definition
->
getClass
(
)
]
=
array_merge
(
$violations
[
$definition
->
getClass
(
)
]
,
$this
->
findEntityNotices
(
$struct
,
$definition
)
)
;
}
$notices
[
$definition
->
getClass
(
)
]
=
array_merge_recursive
(
$violations
[
$definition
->
getClass
(
)
]
,
$this
->
validateDataFieldNotPrefixedByEntityName
(
$definition
)
)
;