1 | <?php |
||
20 | final class DQLContextResolver |
||
21 | { |
||
22 | /** |
||
23 | * @var bool |
||
24 | */ |
||
25 | private static $deadJoinsProtection = true; |
||
26 | |||
27 | /** |
||
28 | * @var bool |
||
29 | */ |
||
30 | private static $conflictProtection = true; |
||
31 | |||
32 | /** |
||
33 | * @var bool |
||
34 | */ |
||
35 | private static $autoJoining = true; |
||
36 | |||
37 | /** |
||
38 | * @param QueryBuilder $qb |
||
39 | * @param string $context |
||
40 | * |
||
41 | * @return string |
||
42 | */ |
||
43 | public static function resolveAlias(QueryBuilder $qb, string $context): string |
||
86 | |||
87 | /** |
||
88 | * @return bool |
||
89 | */ |
||
90 | public static function isDeadJoinsProtectionEnabled(): bool |
||
94 | |||
95 | public static function enableDeadJoinsProtection(): void |
||
99 | |||
100 | public static function disableDeadJoinsProtection(): void |
||
104 | |||
105 | /** |
||
106 | * @return bool |
||
107 | */ |
||
108 | public static function isConflictProtectionEnabled(): bool |
||
112 | |||
113 | public static function enableConflictProtection(): void |
||
117 | |||
118 | public static function disableConflictProtection(): void |
||
122 | |||
123 | /** |
||
124 | * @return bool |
||
125 | */ |
||
126 | public static function isAutoJoiningEnabled(): bool |
||
130 | |||
131 | public static function enableAutoJoining(): void |
||
135 | |||
136 | public static function disableAutoJoining(): void |
||
140 | |||
141 | /** |
||
142 | * Find configured relationship. |
||
143 | * |
||
144 | * @param QueryBuilder $qb |
||
145 | * @param string $rootAlias |
||
146 | * @param string $join |
||
147 | * |
||
148 | * @return Join|null |
||
149 | */ |
||
150 | private static function findJoin(QueryBuilder $qb, string $rootAlias, string $join): ?Join |
||
166 | |||
167 | /** |
||
168 | * @param QueryBuilder $qb |
||
169 | * @param string $dqlAlias |
||
170 | * |
||
171 | * @return string |
||
172 | */ |
||
173 | private static function getUniqueAlias(QueryBuilder $qb, string $dqlAlias): string |
||
183 | } |
||
184 |