1 | <?php |
||
17 | class LogicalOperator extends Criterion |
||
18 | { |
||
19 | /** |
||
20 | * Parses input structure to a Criterion object. |
||
21 | * |
||
22 | * @param array $data |
||
23 | * @param \eZ\Publish\Core\REST\Common\Input\ParsingDispatcher $parsingDispatcher |
||
24 | * |
||
25 | * @throws \eZ\Publish\Core\REST\Common\Exceptions\Parser |
||
26 | * |
||
27 | * @return \eZ\Publish\API\Repository\Values\Content\Query\Criterion\LogicalOperator |
||
28 | */ |
||
29 | public function parse(array $data, ParsingDispatcher $parsingDispatcher) |
||
33 | |||
34 | /** |
||
35 | * @param array $criteriaByType |
||
36 | * @return array |
||
37 | */ |
||
38 | protected function getFlattenedCriteriaData(array $criteriaByType) |
||
69 | |||
70 | /** |
||
71 | * Checks if the given $value is zero based. |
||
72 | * |
||
73 | * @param array $value |
||
74 | * |
||
75 | * @return bool |
||
76 | */ |
||
77 | protected function isZeroBasedArray(array $value) |
||
83 | |||
84 | /** |
||
85 | * Normalize list of criteria to be provided as the expected criterion type to its value map. |
||
86 | * |
||
87 | * Changes: |
||
88 | * <code> |
||
89 | * [ |
||
90 | * 0 => "CriterionType1" => "<value1>", |
||
91 | * 1 => "CriterionType1" => "<value2>", |
||
92 | * 2 => "CriterionType2" => "<value3>", |
||
93 | * ] |
||
94 | * </code> |
||
95 | * into: |
||
96 | * <code> |
||
97 | * [ |
||
98 | * "CriterionType1" => ["<value1>", "<value2>"], |
||
99 | * "CriterionType2" => ["<value3>"], |
||
100 | * ] |
||
101 | * </code> |
||
102 | * |
||
103 | * @param array $criterionList zero-based list of criteria |
||
104 | * |
||
105 | * @return array map of criterion types to their values |
||
106 | */ |
||
107 | private function normalizeCriteriaByType(array $criterionList) |
||
125 | } |
||
126 |
If you suppress an error, we recommend checking for the error condition explicitly: