Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 12 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| PostQuery | |
0.00% |
0 / 12 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 12 |
|
0.00% |
0 / 1 |
6 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Cosray\Controller; |
| 6 | |
| 7 | use Celemas\Core\Request; |
| 8 | |
| 9 | class PostQuery implements Query |
| 10 | { |
| 11 | use HasQueryProperties; |
| 12 | |
| 13 | public function __construct(Request $request) |
| 14 | { |
| 15 | $json = $request->json(); |
| 16 | $this->_map = $json['map'] ?? null; |
| 17 | $this->_query = $json['query'] ?? null; |
| 18 | $this->_published = $json['published'] ?? null; |
| 19 | $this->_hidden = $json['hidden'] ?? false; |
| 20 | $this->_deleted = $json['deleted'] ?? false; |
| 21 | $this->_content = $json['content'] ?? false; |
| 22 | $this->_uids = $json['uids'] ?? []; |
| 23 | $this->_order = $json['order'] ?? 'changed'; |
| 24 | $this->_fields = is_array($json['fields'] ?? '') |
| 25 | ? $json['fields'] |
| 26 | : explode(',', $json['fields'] ?? ''); |
| 27 | } |
| 28 | } |