| @@ 13-28 (lines=16) @@ | ||
| 10 | * |
|
| 11 | * @package Mikemirten\Component\JsonApi\Document\Exception |
|
| 12 | */ |
|
| 13 | class MetadataAttributeNotFoundException extends DocumentException |
|
| 14 | { |
|
| 15 | /** |
|
| 16 | * MetadataAttributeNotFoundException constructor. |
|
| 17 | * |
|
| 18 | * @param MetadataAwareInterface $container |
|
| 19 | * @param string $name |
|
| 20 | * @param \Exception | null $previous |
|
| 21 | */ |
|
| 22 | public function __construct(MetadataAwareInterface $container, string $name, \Exception $previous = null) |
|
| 23 | { |
|
| 24 | $message = sprintf('Attribute "%s" of metadata not found inside of [%s].', $name, $container); |
|
| 25 | ||
| 26 | parent::__construct($message, 0, $previous); |
|
| 27 | } |
|
| 28 | } |
|
| @@ 13-28 (lines=16) @@ | ||
| 10 | * |
|
| 11 | * @package Mikemirten\Component\JsonApi\Document\Exception |
|
| 12 | */ |
|
| 13 | class MetadataAttributeOverrideException extends DocumentException |
|
| 14 | { |
|
| 15 | /** |
|
| 16 | * MetadataAttributeOverrideException constructor. |
|
| 17 | * |
|
| 18 | * @param MetadataAwareInterface $container |
|
| 19 | * @param string $name |
|
| 20 | * @param \Exception | null $previous |
|
| 21 | */ |
|
| 22 | public function __construct(MetadataAwareInterface $container, string $name, \Exception $previous = null) |
|
| 23 | { |
|
| 24 | $message = sprintf('Attribute "%s" of metadata already exists inside of [%s]. To set new one, the old one must be removed.', $name, $container); |
|
| 25 | ||
| 26 | parent::__construct($message, 0, $previous); |
|
| 27 | } |
|
| 28 | } |
|