1 | <?php |
||
9 | abstract class ManagerRegistryEndpointFactory extends LoggingEndpointFactory |
||
10 | { |
||
11 | /** |
||
12 | * @var ManagerRegistry |
||
13 | */ |
||
14 | protected $managerRegistry; |
||
15 | |||
16 | public function __construct(ManagerRegistry $managerRegistry, LoggerInterface $logger) |
||
17 | { |
||
18 | $this->managerRegistry = $managerRegistry; |
||
19 | parent::__construct($logger); |
||
20 | } |
||
21 | |||
22 | protected function getLoggingEndpoint(string $name, string $version): LoggingEndpoint |
||
23 | { |
||
24 | $endpoint = $this->getManagerRegistryEndpoint($name, $version); |
||
25 | $endpoint->setManagerRegistry($this->managerRegistry); |
||
26 | return $endpoint; |
||
27 | } |
||
28 | |||
29 | protected abstract function getManagerRegistryEndpoint(string $name, string $version): ManagerRegistryEndpoint; |
||
30 | } |
||
31 |