AbstractHydrator.php
9 months ago
ArrayHydrator.php
9 months ago
HydrationException.php
9 months ago
IterableResult.php
9 months ago
ObjectHydrator.php
9 months ago
ScalarColumnHydrator.php
9 months ago
ScalarHydrator.php
9 months ago
SimpleObjectHydrator.php
9 months ago
SingleScalarHydrator.php
9 months ago
index.php
9 months ago
HydrationException.php
35 lines
| 1 | <?php |
| 2 | declare (strict_types=1); |
| 3 | namespace MailPoetVendor\Doctrine\ORM\Internal\Hydration; |
| 4 | if (!defined('ABSPATH')) exit; |
| 5 | use MailPoetVendor\Doctrine\ORM\Exception\ORMException; |
| 6 | use function implode; |
| 7 | use function sprintf; |
| 8 | class HydrationException extends ORMException |
| 9 | { |
| 10 | public static function nonUniqueResult() |
| 11 | { |
| 12 | return new self('The result returned by the query was not unique.'); |
| 13 | } |
| 14 | public static function parentObjectOfRelationNotFound($alias, $parentAlias) |
| 15 | { |
| 16 | return new self(sprintf("The parent object of entity result with alias '%s' was not found." . " The parent alias is '%s'.", $alias, $parentAlias)); |
| 17 | } |
| 18 | public static function emptyDiscriminatorValue($dqlAlias) |
| 19 | { |
| 20 | return new self("The DQL alias '" . $dqlAlias . "' contains an entity " . 'of an inheritance hierarchy with an empty discriminator value. This means ' . 'that the database contains inconsistent data with an empty ' . 'discriminator value in a table row.'); |
| 21 | } |
| 22 | public static function missingDiscriminatorColumn($entityName, $discrColumnName, $dqlAlias) |
| 23 | { |
| 24 | return new self(sprintf('The discriminator column "%s" is missing for "%s" using the DQL alias "%s".', $discrColumnName, $entityName, $dqlAlias)); |
| 25 | } |
| 26 | public static function missingDiscriminatorMetaMappingColumn($entityName, $discrColumnName, $dqlAlias) |
| 27 | { |
| 28 | return new self(sprintf('The meta mapping for the discriminator column "%s" is missing for "%s" using the DQL alias "%s".', $discrColumnName, $entityName, $dqlAlias)); |
| 29 | } |
| 30 | public static function invalidDiscriminatorValue($discrValue, $discrValues) |
| 31 | { |
| 32 | return new self(sprintf('The discriminator value "%s" is invalid. It must be one of "%s".', $discrValue, implode('", "', $discrValues))); |
| 33 | } |
| 34 | } |
| 35 |