Add: invalidDiscriminatorValue method
This commit is contained in:
parent
2ae245db30
commit
ab87dd6325
1 changed files with 14 additions and 0 deletions
|
@ -88,4 +88,18 @@ class HydrationException extends \Doctrine\ORM\ORMException
|
||||||
$discrColumnName, $entityName, $dqlAlias
|
$discrColumnName, $entityName, $dqlAlias
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $discrValue
|
||||||
|
* @param array $discrMap
|
||||||
|
*
|
||||||
|
* @return HydrationException
|
||||||
|
*/
|
||||||
|
public static function invalidDiscriminatorValue($discrValue, $discrMap)
|
||||||
|
{
|
||||||
|
return new self(sprintf(
|
||||||
|
'The discriminator value "%s" is invalid. It must be one of "%s".',
|
||||||
|
$discrValue, implode('", "', $discrMap)
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue