| @@ 28-42 (lines=15) @@ | ||
| 25 | * |
|
| 26 | * @return MappingException |
|
| 27 | */ |
|
| 28 | public static function identifierRequired($entityName) |
|
| 29 | { |
|
| 30 | if (false !== ($parent = get_parent_class($entityName))) { |
|
| 31 | return new self(sprintf( |
|
| 32 | 'No identifier/primary key specified for Entity "%s" sub class of "%s". Every Entity must have an identifier/primary key.', |
|
| 33 | $entityName, $parent |
|
| 34 | )); |
|
| 35 | } |
|
| 36 | ||
| 37 | return new self(sprintf( |
|
| 38 | 'No identifier/primary key specified for Entity "%s". Every Entity must have an identifier/primary key.', |
|
| 39 | $entityName |
|
| 40 | )); |
|
| 41 | ||
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @param string $entityName |
|
| @@ 327-340 (lines=14) @@ | ||
| 324 | * |
|
| 325 | * @return MappingException |
|
| 326 | */ |
|
| 327 | public static function classIsNotAValidEntityOrMappedSuperClass($className) |
|
| 328 | { |
|
| 329 | if (false !== ($parent = get_parent_class($className))) { |
|
| 330 | return new self(sprintf( |
|
| 331 | 'Class "%s" sub class of "%s" is not a valid entity or mapped super class.', |
|
| 332 | $className, $parent |
|
| 333 | )); |
|
| 334 | } |
|
| 335 | ||
| 336 | return new self(sprintf( |
|
| 337 | 'Class "%s" is not a valid entity or mapped super class.', |
|
| 338 | $className |
|
| 339 | )); |
|
| 340 | } |
|
| 341 | ||
| 342 | /** |
|
| 343 | * @param string $className |
|