Persister/PersisterRegistry.php 1 location
|
@@ 41-48 (lines=8) @@
|
| 38 |
|
/** |
| 39 |
|
* @return ObjectPersisterInterface |
| 40 |
|
*/ |
| 41 |
|
public function getPersister($index, $type) |
| 42 |
|
{ |
| 43 |
|
if (!isset($this->persisters[$index][$type])) { |
| 44 |
|
throw new \InvalidArgumentException(sprintf('No persister was registered for index "%s" and type "%s".', $index, $type)); |
| 45 |
|
} |
| 46 |
|
|
| 47 |
|
return $this->container->get($this->persisters[$index][$type]); |
| 48 |
|
} |
| 49 |
|
} |
| 50 |
|
|
Provider/ProviderRegistry.php 1 location
|
@@ 99-106 (lines=8) @@
|
| 96 |
|
* |
| 97 |
|
* @throws \InvalidArgumentException if no provider was registered for the index and type |
| 98 |
|
*/ |
| 99 |
|
public function getProvider($index, $type) |
| 100 |
|
{ |
| 101 |
|
if (!isset($this->providers[$index][$type])) { |
| 102 |
|
throw new \InvalidArgumentException(sprintf('No provider was registered for index "%s" and type "%s".', $index, $type)); |
| 103 |
|
} |
| 104 |
|
|
| 105 |
|
return $this->container->get($this->providers[$index][$type]); |
| 106 |
|
} |
| 107 |
|
} |
| 108 |
|
|