Cache
9 months ago
Decorator
9 months ago
Event
9 months ago
Exception
9 months ago
Id
9 months ago
Internal
9 months ago
Mapping
9 months ago
Persisters
8 months ago
Proxy
9 months ago
Query
9 months ago
Repository
9 months ago
Tools
9 months ago
Utility
9 months ago
AbstractQuery.php
9 months ago
Cache.php
9 months ago
Configuration.php
9 months ago
EntityManager.php
9 months ago
EntityManagerInterface.php
9 months ago
EntityNotFoundException.php
9 months ago
EntityRepository.php
9 months ago
Events.php
9 months ago
LazyCriteriaCollection.php
9 months ago
NativeQuery.php
9 months ago
NoResultException.php
9 months ago
NonUniqueResultException.php
9 months ago
ORMException.php
9 months ago
ORMInvalidArgumentException.php
9 months ago
ORMSetup.php
9 months ago
OptimisticLockException.php
9 months ago
PersistentCollection.php
9 months ago
PessimisticLockException.php
9 months ago
Query.php
9 months ago
QueryBuilder.php
9 months ago
TransactionRequiredException.php
9 months ago
UnexpectedResultException.php
9 months ago
UnitOfWork.php
9 months ago
Version.php
9 months ago
index.php
9 months ago
EntityNotFoundException.php
23 lines
| 1 | <?php |
| 2 | declare (strict_types=1); |
| 3 | namespace MailPoetVendor\Doctrine\ORM; |
| 4 | if (!defined('ABSPATH')) exit; |
| 5 | use MailPoetVendor\Doctrine\ORM\Exception\ORMException; |
| 6 | use function implode; |
| 7 | use function sprintf; |
| 8 | class EntityNotFoundException extends ORMException |
| 9 | { |
| 10 | public static function fromClassNameAndIdentifier($className, array $id) |
| 11 | { |
| 12 | $ids = []; |
| 13 | foreach ($id as $key => $value) { |
| 14 | $ids[] = $key . '(' . $value . ')'; |
| 15 | } |
| 16 | return new self('Entity of type \'' . $className . '\'' . ($ids ? ' for IDs ' . implode(', ', $ids) : '') . ' was not found'); |
| 17 | } |
| 18 | public static function noIdentifierFound(string $className) : self |
| 19 | { |
| 20 | return new self(sprintf('Unable to find "%s" entity identifier associated with the UnitOfWork', $className)); |
| 21 | } |
| 22 | } |
| 23 |