1 | <?php |
||
10 | abstract class ManagerRegistryCachingEndpointFactory extends CachingEndpointFactory |
||
11 | { |
||
12 | /** |
||
13 | * @var ManagerRegistry |
||
14 | */ |
||
15 | protected $managerRegistry; |
||
16 | |||
17 | public function __construct(ManagerRegistry $managerRegistry, CacheItemPoolInterface $cachePool, LoggerInterface $logger) |
||
18 | { |
||
19 | $this->managerRegistry = $managerRegistry; |
||
20 | parent::__construct($cachePool,$logger); |
||
21 | } |
||
22 | |||
23 | protected function getCachingEndpoint(string $name, string $version): CachingEndpoint |
||
24 | { |
||
25 | $endpoint = $this->getManagerRegistryCachingEndpoint($name, $version); |
||
26 | $endpoint->setManagerRegistry($this->managerRegistry); |
||
27 | return $endpoint; |
||
28 | } |
||
29 | |||
30 | protected abstract function getManagerRegistryCachingEndpoint(string $name, string $version): ManagerRegistryCachingEndpoint; |
||
31 | } |
||
32 |