1 | <?php |
||
13 | final class AggregationDefinition |
||
14 | { |
||
15 | /** |
||
16 | * Aggregation type, see Document::ONE and Document::MANY. |
||
17 | * |
||
18 | * @var int |
||
19 | */ |
||
20 | private $type; |
||
21 | |||
22 | /** |
||
23 | * Linked class. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | private $class; |
||
28 | |||
29 | /** |
||
30 | * Query template. |
||
31 | * |
||
32 | * @var array |
||
33 | */ |
||
34 | private $query = []; |
||
35 | |||
36 | /** |
||
37 | * @param int $type |
||
38 | * @param string $class |
||
39 | * @param array $query |
||
40 | */ |
||
41 | public function __construct(int $type, string $class, array $query) |
||
47 | |||
48 | /** |
||
49 | * Aggregation type, see Document::ONE and Document::MANY. |
||
50 | * |
||
51 | * @return int |
||
52 | */ |
||
53 | public function getType(): int |
||
57 | |||
58 | /** |
||
59 | * Linked class. |
||
60 | * |
||
61 | * @return string |
||
62 | */ |
||
63 | public function getClass(): string |
||
67 | |||
68 | /** |
||
69 | * Query template. |
||
70 | * |
||
71 | * @return array |
||
72 | */ |
||
73 | public function getQuery(): array |
||
77 | |||
78 | /** |
||
79 | * @return array |
||
80 | */ |
||
81 | public function packSchema(): array |
||
85 | } |