1 | <?php |
||
16 | class PersisterRegistry |
||
17 | { |
||
18 | /** |
||
19 | * @var ServiceLocator |
||
20 | */ |
||
21 | private $persisters = []; |
||
22 | |||
23 | 1 | public function __construct(ServiceLocator $persisters) |
|
27 | |||
28 | /** |
||
29 | * Gets the persister for an index. |
||
30 | * |
||
31 | * @throws \InvalidArgumentException if no persister was registered for the index |
||
32 | */ |
||
33 | 1 | public function getPersister(string $index): ObjectPersisterInterface |
|
41 | } |
||
42 |