1 | <?php |
||
30 | class MappingException extends BaseMappingException |
||
31 | { |
||
32 | /** |
||
33 | * @param string $name |
||
34 | * @return MappingException |
||
35 | */ |
||
36 | public static function typeExists($name) |
||
40 | |||
41 | /** |
||
42 | * @param string $name |
||
43 | * @return MappingException |
||
44 | */ |
||
45 | public static function typeNotFound($name) |
||
49 | |||
50 | /** |
||
51 | * @param string $className |
||
52 | * @param string $fieldName |
||
53 | * @return MappingException |
||
54 | */ |
||
55 | 6 | public static function mappingNotFound($className, $fieldName) |
|
59 | |||
60 | /** |
||
61 | * @param string $className |
||
62 | * @param string $fieldName |
||
63 | * @return MappingException |
||
64 | */ |
||
65 | 2 | public static function mappingNotFoundInClassNorDescendants($className, $fieldName) |
|
69 | |||
70 | /** |
||
71 | * @param $fieldName |
||
72 | * @param $className |
||
73 | * @param $className2 |
||
74 | * @return MappingException |
||
75 | */ |
||
76 | 2 | public static function referenceFieldConflict($fieldName, $className, $className2) |
|
80 | |||
81 | /** |
||
82 | * @param string $document |
||
83 | * @param string $fieldName |
||
84 | * @return MappingException |
||
85 | */ |
||
86 | public static function duplicateFieldMapping($document, $fieldName) |
||
90 | |||
91 | /** |
||
92 | * @param string $document |
||
93 | * @param string $fieldName |
||
94 | * @return MappingException |
||
95 | */ |
||
96 | 2 | public static function discriminatorFieldConflict($document, $fieldName) |
|
100 | |||
101 | /** |
||
102 | * Throws an exception that indicates that a class used in a discriminator map does not exist. |
||
103 | * An example would be an outdated (maybe renamed) classname. |
||
104 | * |
||
105 | * @param string $className The class that could not be found |
||
106 | * @param string $owningClass The class that declares the discriminator map. |
||
107 | * @return MappingException |
||
108 | */ |
||
109 | public static function invalidClassInDiscriminatorMap($className, $owningClass) |
||
116 | |||
117 | /** |
||
118 | * Throws an exception that indicates a discriminator value does not exist in a map |
||
119 | * |
||
120 | * @param string $value The discriminator value that could not be found |
||
121 | * @param string $owningClass The class that declares the discriminator map |
||
122 | * @return MappingException |
||
123 | */ |
||
124 | public static function invalidDiscriminatorValue($value, $owningClass) |
||
128 | |||
129 | /** |
||
130 | * @param string $className |
||
131 | * @return MappingException |
||
132 | */ |
||
133 | public static function missingFieldName($className) |
||
137 | |||
138 | /** |
||
139 | * @param string $className |
||
140 | * @return MappingException |
||
141 | */ |
||
142 | 2 | public static function classIsNotAValidDocument($className) |
|
146 | |||
147 | /** |
||
148 | * Exception for reflection exceptions - adds the document name, |
||
149 | * because there might be long classnames that will be shortened |
||
150 | * within the stacktrace |
||
151 | * |
||
152 | * @param string $document The document's name |
||
153 | * @param \ReflectionException $previousException |
||
154 | * @return \Doctrine\ODM\MongoDB\Mapping\MappingException |
||
155 | */ |
||
156 | public static function reflectionFailure($document, \ReflectionException $previousException) |
||
160 | |||
161 | /** |
||
162 | * @param string $documentName |
||
163 | * @return MappingException |
||
164 | */ |
||
165 | public static function identifierRequired($documentName) |
||
170 | |||
171 | /** |
||
172 | * @param string $className |
||
173 | * @param string $fieldName |
||
174 | * @return MappingException |
||
175 | */ |
||
176 | public static function missingIdentifierField($className, $fieldName) |
||
180 | |||
181 | /** |
||
182 | * @param string $className |
||
183 | * @return MappingException |
||
184 | */ |
||
185 | public static function missingIdGeneratorClass($className) |
||
189 | |||
190 | /** |
||
191 | * @param string $className |
||
192 | * @return MappingException |
||
193 | */ |
||
194 | public static function classIsNotAValidGenerator($className) |
||
198 | |||
199 | /** |
||
200 | * @param string $className |
||
201 | * @param string $optionName |
||
202 | * @return MappingException |
||
203 | */ |
||
204 | public static function missingGeneratorSetter($className, $optionName) |
||
208 | |||
209 | /** |
||
210 | * @param string $className |
||
211 | * @param string $fieldName |
||
212 | * @return MappingException |
||
213 | */ |
||
214 | 1 | public static function cascadeOnEmbeddedNotAllowed($className, $fieldName) |
|
218 | |||
219 | /** |
||
220 | * @param string $className |
||
221 | * @param string $fieldName |
||
222 | * @return MappingException |
||
223 | */ |
||
224 | 1 | public static function simpleReferenceRequiresTargetDocument($className, $fieldName) |
|
228 | |||
229 | /** |
||
230 | * @param string $targetDocument |
||
231 | * @return MappingException |
||
232 | */ |
||
233 | 1 | public static function simpleReferenceMustNotTargetDiscriminatedDocument($targetDocument) |
|
237 | |||
238 | /** |
||
239 | * @param string $strategy |
||
240 | * @param string $className |
||
241 | * @param string $fieldName |
||
242 | * @return MappingException |
||
243 | */ |
||
244 | 1 | public static function atomicCollectionStrategyNotAllowed($strategy, $className, $fieldName) |
|
248 | |||
249 | /** |
||
250 | * @param string $className |
||
251 | * @param string $fieldName |
||
252 | * @return MappingException |
||
253 | */ |
||
254 | 4 | public static function owningAndInverseReferencesRequireTargetDocument($className, $fieldName) |
|
258 | |||
259 | /** |
||
260 | * @param string $className |
||
261 | * @param string $fieldName |
||
262 | * @return MappingException |
||
263 | */ |
||
264 | 1 | public static function mustNotChangeIdentifierFieldsType($className, $fieldName) |
|
268 | |||
269 | /** |
||
270 | * @param string $className |
||
271 | * @param string $fieldName |
||
272 | * @param string $strategy |
||
273 | * @return MappingException |
||
274 | */ |
||
275 | 1 | public static function referenceManySortMustNotBeUsedWithNonSetCollectionStrategy($className, $fieldName, $strategy) |
|
279 | } |
||
280 |