summaryrefslogtreecommitdiff
path: root/vendor/doctrine/orm/src/EntityNotFoundException.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2026-10-18 00:08:23 +0200
committerpolo <ordipolo@gmx.fr>2026-10-18 00:10:03 +0200
commit05e38eadbeb3de19e5b26003c2b401e00bb71df4 (patch)
treecf48350b69cfce92de6f3a0e03eb0876931c7077 /vendor/doctrine/orm/src/EntityNotFoundException.php
parent32843e50aa981f190bdb4fbc9adbeacc06fdf775 (diff)
downloadAppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.tar.gz
AppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.tar.bz2
AppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.zip
sortie de vendor du dépôt, oubli dans config-template.ini
Diffstat (limited to 'vendor/doctrine/orm/src/EntityNotFoundException.php')
-rw-r--r--vendor/doctrine/orm/src/EntityNotFoundException.php46
1 files changed, 0 insertions, 46 deletions
diff --git a/vendor/doctrine/orm/src/EntityNotFoundException.php b/vendor/doctrine/orm/src/EntityNotFoundException.php
deleted file mode 100644
index 142dc8a..0000000
--- a/vendor/doctrine/orm/src/EntityNotFoundException.php
+++ /dev/null
@@ -1,46 +0,0 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\ORM;
6
7use Doctrine\ORM\Exception\ORMException;
8use RuntimeException;
9
10use function implode;
11use function sprintf;
12
13/**
14 * Exception thrown when a Proxy fails to retrieve an Entity result.
15 */
16class EntityNotFoundException extends RuntimeException implements ORMException
17{
18 /**
19 * Static constructor.
20 *
21 * @param string[] $id
22 */
23 public static function fromClassNameAndIdentifier(string $className, array $id): self
24 {
25 $ids = [];
26
27 foreach ($id as $key => $value) {
28 $ids[] = $key . '(' . $value . ')';
29 }
30
31 return new self(
32 'Entity of type \'' . $className . '\'' . ($ids ? ' for IDs ' . implode(', ', $ids) : '') . ' was not found',
33 );
34 }
35
36 /**
37 * Instance for which no identifier can be found
38 */
39 public static function noIdentifierFound(string $className): self
40 {
41 return new self(sprintf(
42 'Unable to find "%s" entity identifier associated with the UnitOfWork',
43 $className,
44 ));
45 }
46}