diff options
Diffstat (limited to 'vendor/doctrine/orm/src/Cache/AssociationCacheEntry.php')
-rw-r--r-- | vendor/doctrine/orm/src/Cache/AssociationCacheEntry.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/vendor/doctrine/orm/src/Cache/AssociationCacheEntry.php b/vendor/doctrine/orm/src/Cache/AssociationCacheEntry.php new file mode 100644 index 0000000..7dc1fbe --- /dev/null +++ b/vendor/doctrine/orm/src/Cache/AssociationCacheEntry.php | |||
@@ -0,0 +1,30 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Cache; | ||
6 | |||
7 | class AssociationCacheEntry implements CacheEntry | ||
8 | { | ||
9 | /** | ||
10 | * @param array<string, mixed> $identifier The entity identifier. | ||
11 | * @param class-string $class The entity class name | ||
12 | */ | ||
13 | public function __construct( | ||
14 | public readonly string $class, | ||
15 | public readonly array $identifier, | ||
16 | ) { | ||
17 | } | ||
18 | |||
19 | /** | ||
20 | * Creates a new AssociationCacheEntry | ||
21 | * | ||
22 | * This method allow Doctrine\Common\Cache\PhpFileCache compatibility | ||
23 | * | ||
24 | * @param array<string, mixed> $values array containing property values | ||
25 | */ | ||
26 | public static function __set_state(array $values): self | ||
27 | { | ||
28 | return new self($values['class'], $values['identifier']); | ||
29 | } | ||
30 | } | ||