diff options
author | polo <ordipolo@gmx.fr> | 2024-08-13 23:45:21 +0200 |
---|---|---|
committer | polo <ordipolo@gmx.fr> | 2024-08-13 23:45:21 +0200 |
commit | bf6655a534a6775d30cafa67bd801276bda1d98d (patch) | |
tree | c6381e3f6c81c33eab72508f410b165ba05f7e9c /vendor/doctrine/orm/src/Cache/CacheFactory.php | |
parent | 94d67a4b51f8e62e7d518cce26a526ae1ec48278 (diff) | |
download | AppliGestionPHP-bf6655a534a6775d30cafa67bd801276bda1d98d.zip |
VERSION 0.2 doctrine ORM et entités
Diffstat (limited to 'vendor/doctrine/orm/src/Cache/CacheFactory.php')
-rw-r--r-- | vendor/doctrine/orm/src/Cache/CacheFactory.php | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/vendor/doctrine/orm/src/Cache/CacheFactory.php b/vendor/doctrine/orm/src/Cache/CacheFactory.php new file mode 100644 index 0000000..b15c23e --- /dev/null +++ b/vendor/doctrine/orm/src/Cache/CacheFactory.php | |||
@@ -0,0 +1,64 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\ORM\Cache; | ||
6 | |||
7 | use Doctrine\ORM\Cache; | ||
8 | use Doctrine\ORM\Cache\Persister\Collection\CachedCollectionPersister; | ||
9 | use Doctrine\ORM\Cache\Persister\Entity\CachedEntityPersister; | ||
10 | use Doctrine\ORM\EntityManagerInterface; | ||
11 | use Doctrine\ORM\Mapping\AssociationMapping; | ||
12 | use Doctrine\ORM\Mapping\ClassMetadata; | ||
13 | use Doctrine\ORM\Persisters\Collection\CollectionPersister; | ||
14 | use Doctrine\ORM\Persisters\Entity\EntityPersister; | ||
15 | |||
16 | /** | ||
17 | * Contract for building second level cache regions components. | ||
18 | */ | ||
19 | interface CacheFactory | ||
20 | { | ||
21 | /** | ||
22 | * Build an entity persister for the given entity metadata. | ||
23 | */ | ||
24 | public function buildCachedEntityPersister(EntityManagerInterface $em, EntityPersister $persister, ClassMetadata $metadata): CachedEntityPersister; | ||
25 | |||
26 | /** Build a collection persister for the given relation mapping. */ | ||
27 | public function buildCachedCollectionPersister( | ||
28 | EntityManagerInterface $em, | ||
29 | CollectionPersister $persister, | ||
30 | AssociationMapping $mapping, | ||
31 | ): CachedCollectionPersister; | ||
32 | |||
33 | /** | ||
34 | * Build a query cache based on the given region name | ||
35 | */ | ||
36 | public function buildQueryCache(EntityManagerInterface $em, string|null $regionName = null): QueryCache; | ||
37 | |||
38 | /** | ||
39 | * Build an entity hydrator | ||
40 | */ | ||
41 | public function buildEntityHydrator(EntityManagerInterface $em, ClassMetadata $metadata): EntityHydrator; | ||
42 | |||
43 | /** | ||
44 | * Build a collection hydrator | ||
45 | */ | ||
46 | public function buildCollectionHydrator(EntityManagerInterface $em, AssociationMapping $mapping): CollectionHydrator; | ||
47 | |||
48 | /** | ||
49 | * Build a cache region | ||
50 | * | ||
51 | * @param array<string,mixed> $cache The cache configuration. | ||
52 | */ | ||
53 | public function getRegion(array $cache): Region; | ||
54 | |||
55 | /** | ||
56 | * Build timestamp cache region | ||
57 | */ | ||
58 | public function getTimestampRegion(): TimestampRegion; | ||
59 | |||
60 | /** | ||
61 | * Build \Doctrine\ORM\Cache | ||
62 | */ | ||
63 | public function createCache(EntityManagerInterface $entityManager): Cache; | ||
64 | } | ||