Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
validateIds example
public
function
__construct
(
?array
$ids
= null
)
{
if
(
$ids
=== null
)
{
return
;
}
$ids
=
array_filter
(
$ids
)
;
if
(
empty
(
$ids
)
)
{
throw
DataAbstractionLayerException::
invalidCriteriaIds
(
$ids
, 'Ids should not be empty'
)
;
}
$this
->
validateIds
(
$ids
)
;
$this
->ids =
$ids
;
}
public
function
__toString
(
)
: string
{
$parsed
=
(
new
CriteriaArrayConverter
(
new
AggregationParser
(
)
)
)
->
convert
(
$this
)
;
return
Json::
encode
(
$parsed
)
;
}