1 | <?php |
||
18 | abstract class Criterion implements CriterionInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var Query |
||
22 | */ |
||
23 | protected $query; |
||
24 | |||
25 | /** |
||
26 | * Criterion constructor. |
||
27 | * @param Query $query |
||
28 | */ |
||
29 | 61 | public function __construct(Query $query) |
|
33 | |||
34 | /** |
||
35 | * @param string $name |
||
36 | * @return Field |
||
37 | */ |
||
38 | 61 | protected function field(string $name): Field |
|
42 | |||
43 | /** |
||
44 | * @param Query $query |
||
45 | * @return CriterionInterface |
||
46 | */ |
||
47 | public function attach(Query $query): CriterionInterface |
||
53 | |||
54 | /** |
||
55 | * @param Query $query |
||
56 | * @return bool |
||
57 | */ |
||
58 | public function isAttachedTo(Query $query): bool |
||
62 | |||
63 | /** |
||
64 | * @return bool |
||
65 | */ |
||
66 | 61 | public function isAttached(): bool |
|
70 | |||
71 | /** |
||
72 | * @return Query |
||
73 | */ |
||
74 | public function getQuery(): Query |
||
78 | |||
79 | /** |
||
80 | * @return string |
||
81 | */ |
||
82 | 26 | public function getQueryAlias(): string |
|
86 | } |
||
87 |