1 | <?php |
||
31 | class ORMException extends Exception |
||
32 | { |
||
33 | /** |
||
34 | * @return ORMException |
||
35 | */ |
||
36 | public static function missingMappingDriverImpl() |
||
41 | |||
42 | /** |
||
43 | * @param string $queryName |
||
44 | * |
||
45 | * @return ORMException |
||
46 | */ |
||
47 | 1 | public static function namedQueryNotFound($queryName) |
|
51 | |||
52 | /** |
||
53 | * @param string $nativeQueryName |
||
54 | * |
||
55 | * @return ORMException |
||
56 | */ |
||
57 | 1 | public static function namedNativeQueryNotFound($nativeQueryName) |
|
58 | { |
||
59 | 1 | return new self('Could not find a named native query by the name "' . $nativeQueryName . '"'); |
|
60 | } |
||
61 | |||
62 | /** |
||
63 | * @param object $entity |
||
64 | * @param object $relatedEntity |
||
65 | * |
||
66 | * @return ORMException |
||
67 | */ |
||
68 | public static function entityMissingForeignAssignedId($entity, $relatedEntity) |
||
78 | |||
79 | /** |
||
80 | * @param object $entity |
||
81 | * @param string $field |
||
82 | * |
||
83 | * @return ORMException |
||
84 | */ |
||
85 | 2 | public static function entityMissingAssignedIdForField($entity, $field) |
|
93 | |||
94 | /** |
||
95 | * @param string $field |
||
96 | * |
||
97 | * @return ORMException |
||
98 | */ |
||
99 | 3 | public static function unrecognizedField($field) |
|
103 | |||
104 | /** |
||
105 | * |
||
106 | * @param string $class |
||
107 | * @param string $association |
||
108 | * @param string $given |
||
109 | * @param string $expected |
||
110 | * |
||
111 | * @return \Doctrine\ORM\ORMInvalidArgumentException |
||
112 | */ |
||
113 | public static function unexpectedAssociationValue($class, $association, $given, $expected) |
||
117 | |||
118 | /** |
||
119 | * @param string $className |
||
120 | * @param string $field |
||
121 | * |
||
122 | * @return ORMException |
||
123 | */ |
||
124 | 1 | public static function invalidOrientation($className, $field) |
|
128 | |||
129 | /** |
||
130 | * @param string $mode |
||
131 | * |
||
132 | * @return ORMException |
||
133 | */ |
||
134 | public static function invalidFlushMode($mode) |
||
138 | |||
139 | /** |
||
140 | * @return ORMException |
||
141 | */ |
||
142 | 5 | public static function entityManagerClosed() |
|
146 | |||
147 | /** |
||
148 | * @param string $mode |
||
149 | * |
||
150 | * @return ORMException |
||
151 | */ |
||
152 | public static function invalidHydrationMode($mode) |
||
156 | |||
157 | /** |
||
158 | * @return ORMException |
||
159 | */ |
||
160 | public static function mismatchedEventManager() |
||
164 | |||
165 | /** |
||
166 | * @param string $methodName |
||
167 | * |
||
168 | * @return ORMException |
||
169 | */ |
||
170 | 1 | public static function findByRequiresParameter($methodName) |
|
174 | |||
175 | /** |
||
176 | * @param string $entityName |
||
177 | * @param string $fieldName |
||
178 | * @param string $method |
||
179 | * |
||
180 | * @return ORMException |
||
181 | */ |
||
182 | public static function invalidFindByCall($entityName, $fieldName, $method) |
||
189 | |||
190 | /** |
||
191 | * @param string $entityName |
||
192 | * @param string $fieldName |
||
193 | * @param string $method |
||
194 | * |
||
195 | * @return ORMException |
||
196 | */ |
||
197 | 1 | public static function invalidMagicCall($entityName, $fieldName, $method) |
|
198 | { |
||
199 | 1 | return new self( |
|
200 | 1 | "Entity '".$entityName."' has no field '".$fieldName."'. ". |
|
201 | 1 | "You can therefore not call '".$method."' on the entities' repository" |
|
202 | ); |
||
203 | } |
||
204 | |||
205 | /** |
||
206 | * @param string $entityName |
||
207 | * @param string $associationFieldName |
||
208 | * |
||
209 | * @return ORMException |
||
210 | */ |
||
211 | 2 | public static function invalidFindByInverseAssociation($entityName, $associationFieldName) |
|
218 | |||
219 | /** |
||
220 | * @return ORMException |
||
221 | */ |
||
222 | public static function invalidResultCacheDriver() |
||
226 | |||
227 | /** |
||
228 | * @return ORMException |
||
229 | */ |
||
230 | public static function notSupported() |
||
234 | |||
235 | /** |
||
236 | * @return ORMException |
||
237 | */ |
||
238 | 1 | public static function queryCacheNotConfigured() |
|
242 | |||
243 | /** |
||
244 | * @return ORMException |
||
245 | */ |
||
246 | 1 | public static function metadataCacheNotConfigured() |
|
250 | |||
251 | /** |
||
252 | * @param \Doctrine\Common\Cache\Cache $cache |
||
253 | * |
||
254 | * @return ORMException |
||
255 | */ |
||
256 | 1 | public static function queryCacheUsesNonPersistentCache(CacheDriver $cache) |
|
260 | |||
261 | /** |
||
262 | * @param \Doctrine\Common\Cache\Cache $cache |
||
263 | * |
||
264 | * @return ORMException |
||
265 | */ |
||
266 | 1 | public static function metadataCacheUsesNonPersistentCache(CacheDriver $cache) |
|
270 | |||
271 | /** |
||
272 | * @return ORMException |
||
273 | */ |
||
274 | 3 | public static function proxyClassesAlwaysRegenerating() |
|
278 | |||
279 | /** |
||
280 | * @param string $entityNamespaceAlias |
||
281 | * |
||
282 | * @return ORMException |
||
283 | */ |
||
284 | 1 | public static function unknownEntityNamespace($entityNamespaceAlias) |
|
290 | |||
291 | /** |
||
292 | * @param string $className |
||
293 | * |
||
294 | * @return ORMException |
||
295 | */ |
||
296 | 1 | public static function invalidEntityRepository($className) |
|
300 | |||
301 | /** |
||
302 | * @param string $className |
||
303 | * @param string $fieldName |
||
304 | * |
||
305 | * @return ORMException |
||
306 | */ |
||
307 | 1 | public static function missingIdentifierField($className, $fieldName) |
|
311 | |||
312 | /** |
||
313 | * @param string $className |
||
314 | * @param string[] $fieldNames |
||
315 | * |
||
316 | * @return ORMException |
||
317 | */ |
||
318 | 2 | public static function unrecognizedIdentifierFields($className, $fieldNames) |
|
325 | |||
326 | /** |
||
327 | * @return ORMException |
||
328 | */ |
||
329 | 1 | public static function cantUseInOperatorOnCompositeKeys() |
|
333 | } |
||
334 |