| 1 | <?php |
||
| 18 | class Join extends Criterion |
||
| 19 | { |
||
| 20 | public const TYPE_JOIN = 0x01; |
||
| 21 | public const TYPE_INNER_JOIN = 0x02; |
||
| 22 | public const TYPE_LEFT_JOIN = 0x03; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var \Closure |
||
| 26 | */ |
||
| 27 | private $inner; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var Query |
||
| 31 | */ |
||
| 32 | private $parent; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @var int |
||
| 36 | */ |
||
| 37 | private $type; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Relation constructor. |
||
| 41 | * @param string $relation |
||
| 42 | * @param Query $parent |
||
| 43 | * @param int $type |
||
| 44 | * @param \Closure|null $inner |
||
| 45 | */ |
||
| 46 | 2 | public function __construct(string $relation, Query $parent, int $type = self::TYPE_JOIN, \Closure $inner = null) |
|
| 54 | |||
| 55 | /** |
||
| 56 | * @return int |
||
| 57 | */ |
||
| 58 | 2 | public function getType(): int |
|
| 62 | |||
| 63 | /** |
||
| 64 | * @return string |
||
| 65 | */ |
||
| 66 | 2 | public function getAlias(): string |
|
| 70 | |||
| 71 | /** |
||
| 72 | * @return Field |
||
| 73 | */ |
||
| 74 | public function getRelation(): Field |
||
| 78 | |||
| 79 | /** |
||
| 80 | * @return Query |
||
| 81 | */ |
||
| 82 | 2 | public function getQuery(): Query |
|
| 92 | } |
||
| 93 |