| 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 | 65 | public function __construct(Query $query) |
|
| 33 | |||
| 34 | /** |
||
| 35 | * @param string $name |
||
| 36 | * @return Field |
||
| 37 | */ |
||
| 38 | 65 | protected function field(string $name): Field |
|
| 42 | |||
| 43 | /** |
||
| 44 | * @param Query $query |
||
| 45 | * @return CriterionInterface |
||
| 46 | */ |
||
| 47 | 4 | public function attach(Query $query): CriterionInterface |
|
| 53 | |||
| 54 | /** |
||
| 55 | * @return bool |
||
| 56 | */ |
||
| 57 | 65 | public function isAttached(): bool |
|
| 61 | |||
| 62 | /** |
||
| 63 | * @return Query |
||
| 64 | */ |
||
| 65 | public function getQuery(): Query |
||
| 69 | |||
| 70 | /** |
||
| 71 | * @return string |
||
| 72 | */ |
||
| 73 | 30 | public function getQueryAlias(): string |
|
| 77 | } |
||
| 78 |