| 1 | <?php |
||
| 21 | abstract class AbstractJoin implements QueryModifier |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | private $field; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | private $newAlias; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @var string|null |
||
| 35 | */ |
||
| 36 | private $dqlAlias; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @param string $field |
||
| 40 | * @param string $newAlias |
||
| 41 | * @param string|null $dqlAlias |
||
| 42 | */ |
||
| 43 | public function __construct($field, $newAlias, $dqlAlias = null) |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @param QueryBuilder $qb |
||
| 52 | * @param string $dqlAlias |
||
| 53 | */ |
||
| 54 | public function modify(QueryBuilder $qb, $dqlAlias) |
||
| 63 | |||
| 64 | /** |
||
| 65 | * Return a join type (ie a function of QueryBuilder) like: "join", "innerJoin", "leftJoin". |
||
| 66 | * |
||
| 67 | * @return string |
||
| 68 | */ |
||
| 69 | abstract protected function getJoinType(); |
||
| 70 | } |
||
| 71 |