eZ/Publish/Core/REST/Server/Input/Parser/SortClause/DataKeyValueObjectClass.php 1 location
|
@@ 58-60 (lines=3) @@
|
| 55 |
|
|
| 56 |
|
$direction = $data[$this->dataKey]; |
| 57 |
|
|
| 58 |
|
if (!in_array($direction, [Query::SORT_ASC, Query::SORT_DESC])) { |
| 59 |
|
throw new Exceptions\Parser("Invalid direction format in <{$this->dataKey}> sort clause"); |
| 60 |
|
} |
| 61 |
|
|
| 62 |
|
return new $this->valueObjectClass($direction); |
| 63 |
|
} |
eZ/Publish/Core/REST/Server/Input/Parser/SortClause/Field.php 1 location
|
@@ 39-41 (lines=3) @@
|
| 36 |
|
|
| 37 |
|
$direction = isset($data['Field']['direction']) ? $data['Field']['direction'] : null; |
| 38 |
|
|
| 39 |
|
if (!in_array($direction, [Query::SORT_ASC, Query::SORT_DESC])) { |
| 40 |
|
throw new Exceptions\Parser('Invalid direction format in <Field> sort clause'); |
| 41 |
|
} |
| 42 |
|
|
| 43 |
|
if (isset($data['Field']['identifier'])) { |
| 44 |
|
if (false === strpos($data['Field']['identifier'], '/')) { |