1 | <?php |
||
28 | class ORMInvalidArgumentException extends \InvalidArgumentException |
||
29 | { |
||
30 | /** |
||
31 | * @param object $entity |
||
32 | * |
||
33 | * @return ORMInvalidArgumentException |
||
34 | */ |
||
35 | 1 | static public function scheduleInsertForManagedEntity($entity) |
|
39 | |||
40 | /** |
||
41 | * @param object $entity |
||
42 | * |
||
43 | * @return ORMInvalidArgumentException |
||
44 | */ |
||
45 | 1 | static public function scheduleInsertForRemovedEntity($entity) |
|
49 | |||
50 | /** |
||
51 | * @param object $entity |
||
52 | * |
||
53 | * @return ORMInvalidArgumentException |
||
54 | */ |
||
55 | 1 | static public function scheduleInsertTwice($entity) |
|
59 | |||
60 | /** |
||
61 | * @param string $className |
||
62 | * @param object $entity |
||
63 | * |
||
64 | * @return ORMInvalidArgumentException |
||
65 | */ |
||
66 | 6 | static public function entityWithoutIdentity($className, $entity) |
|
73 | |||
74 | /** |
||
75 | * @param object $entity |
||
76 | * |
||
77 | * @return ORMInvalidArgumentException |
||
78 | */ |
||
79 | 1 | static public function readOnlyRequiresManagedEntity($entity) |
|
83 | |||
84 | /** |
||
85 | * @param array[][]|object[][] $newEntitiesWithAssociations non-empty an array |
||
86 | * of [array $associationMapping, object $entity] pairs |
||
87 | * |
||
88 | * @return ORMInvalidArgumentException |
||
89 | */ |
||
90 | 8 | static public function newEntitiesFoundThroughRelationships($newEntitiesWithAssociations) |
|
111 | |||
112 | /** |
||
113 | * @param array $associationMapping |
||
114 | * @param object $entry |
||
115 | * |
||
116 | * @return ORMInvalidArgumentException |
||
117 | */ |
||
118 | static public function newEntityFoundThroughRelationship(array $associationMapping, $entry) |
||
122 | |||
123 | /** |
||
124 | * @param array $assoc |
||
125 | * @param object $entry |
||
126 | * |
||
127 | * @return ORMInvalidArgumentException |
||
128 | */ |
||
129 | static public function detachedEntityFoundThroughRelationship(array $assoc, $entry) |
||
135 | |||
136 | /** |
||
137 | * @param object $entity |
||
138 | * |
||
139 | * @return ORMInvalidArgumentException |
||
140 | */ |
||
141 | 1 | static public function entityNotManaged($entity) |
|
146 | |||
147 | /** |
||
148 | * @param object $entity |
||
149 | * @param string $operation |
||
150 | * |
||
151 | * @return ORMInvalidArgumentException |
||
152 | */ |
||
153 | static public function entityHasNoIdentity($entity, $operation) |
||
157 | |||
158 | /** |
||
159 | * @param object $entity |
||
160 | * @param string $operation |
||
161 | * |
||
162 | * @return ORMInvalidArgumentException |
||
163 | */ |
||
164 | static public function entityIsRemoved($entity, $operation) |
||
168 | |||
169 | /** |
||
170 | * @param object $entity |
||
171 | * @param string $operation |
||
172 | * |
||
173 | * @return ORMInvalidArgumentException |
||
174 | */ |
||
175 | static public function detachedEntityCannot($entity, $operation) |
||
179 | |||
180 | /** |
||
181 | * @param string $context |
||
182 | * @param mixed $given |
||
183 | * @param int $parameterIndex |
||
184 | * |
||
185 | * @return ORMInvalidArgumentException |
||
186 | */ |
||
187 | 5 | public static function invalidObject($context, $given, $parameterIndex = 1) |
|
192 | |||
193 | /** |
||
194 | * @return ORMInvalidArgumentException |
||
195 | */ |
||
196 | public static function invalidCompositeIdentifier() |
||
201 | |||
202 | /** |
||
203 | * @return ORMInvalidArgumentException |
||
204 | */ |
||
205 | 1 | public static function invalidIdentifierBindingEntity() |
|
209 | |||
210 | /** |
||
211 | * @param ClassMetadata $targetClass |
||
212 | * @param array $assoc |
||
213 | * @param mixed $actualValue |
||
214 | * |
||
215 | * @return self |
||
216 | */ |
||
217 | 13 | public static function invalidAssociation(ClassMetadata $targetClass, $assoc, $actualValue) |
|
233 | |||
234 | /** |
||
235 | * Used when a given entityName hasn't the good type |
||
236 | * |
||
237 | * @param mixed $entityName The given entity (which shouldn't be a string) |
||
238 | * |
||
239 | * @return self |
||
240 | */ |
||
241 | 6 | public static function invalidEntityName($entityName) |
|
245 | |||
246 | /** |
||
247 | * Helper method to show an object as string. |
||
248 | * |
||
249 | * @param object $obj |
||
250 | * |
||
251 | * @return string |
||
252 | */ |
||
253 | 19 | private static function objToStr($obj) : string |
|
257 | |||
258 | /** |
||
259 | * @param array $associationMapping |
||
260 | * @param object $entity |
||
261 | */ |
||
262 | 8 | private static function newEntityFoundThroughRelationshipMessage(array $associationMapping, $entity) : string |
|
276 | } |
||
277 |