| 1 | <?php |
||
| 19 | class PagerProviderRegistry |
||
| 20 | { |
||
| 21 | /** @var ServiceLocator */ |
||
| 22 | private $providers = []; |
||
| 23 | |||
| 24 | public function __construct(ServiceLocator $providers) |
||
| 28 | |||
| 29 | /** |
||
| 30 | 9 | * Gets all registered providers. |
|
| 31 | * |
||
| 32 | 9 | * Providers will be indexed by "index" strings in the returned array. |
|
| 33 | 9 | * |
|
| 34 | * @return PagerProviderInterface[] |
||
| 35 | */ |
||
| 36 | public function getProviders() |
||
| 42 | 1 | ||
| 43 | /** |
||
| 44 | 1 | * Gets the provider for an index. |
|
| 45 | * |
||
| 46 | 1 | * @throws \InvalidArgumentException if no provider was registered for the index and type |
|
| 47 | 1 | */ |
|
| 48 | 1 | public function getProvider(string $index): ?PagerProviderInterface |
|
| 56 | } |
||
| 57 |