@@ 43-57 (lines=15) @@ | ||
40 | * |
|
41 | * @return MappingException |
|
42 | */ |
|
43 | public static function identifierRequired($entityName) |
|
44 | { |
|
45 | if (false !== ($parent = get_parent_class($entityName))) { |
|
46 | return new self(sprintf( |
|
47 | 'No identifier/primary key specified for Entity "%s" sub class of "%s". Every Entity must have an identifier/primary key.', |
|
48 | $entityName, $parent |
|
49 | )); |
|
50 | } |
|
51 | ||
52 | return new self(sprintf( |
|
53 | 'No identifier/primary key specified for Entity "%s". Every Entity must have an identifier/primary key.', |
|
54 | $entityName |
|
55 | )); |
|
56 | ||
57 | } |
|
58 | ||
59 | /** |
|
60 | * @param string $entityName |
|
@@ 337-350 (lines=14) @@ | ||
334 | * |
|
335 | * @return MappingException |
|
336 | */ |
|
337 | public static function classIsNotAValidEntityOrMappedSuperClass($className) |
|
338 | { |
|
339 | if (false !== ($parent = get_parent_class($className))) { |
|
340 | return new self(sprintf( |
|
341 | 'Class "%s" sub class of "%s" is not a valid entity or mapped super class.', |
|
342 | $className, $parent |
|
343 | )); |
|
344 | } |
|
345 | ||
346 | return new self(sprintf( |
|
347 | 'Class "%s" is not a valid entity or mapped super class.', |
|
348 | $className |
|
349 | )); |
|
350 | } |
|
351 | ||
352 | /** |
|
353 | * @param string $className |