| @@ 30-37 (lines=8) @@ | ||
| 27 | /** |
|
| 28 | * Retrieve a configuration object for a pool. |
|
| 29 | */ |
|
| 30 | public function pool($poolId) |
|
| 31 | { |
|
| 32 | if (!in_array($poolId, $this->pools())) { |
|
| 33 | throw new InstanceException(sprintf('pool "%s" not found', $poolId)); |
|
| 34 | } |
|
| 35 | ||
| 36 | return new PoolConfig($this->configData['vpnPools'][$poolId]); |
|
| 37 | } |
|
| 38 | ||
| 39 | /** |
|
| 40 | * Retrieve a list of all pools. |
|
| @@ 52-59 (lines=8) @@ | ||
| 49 | return array_keys($this->v('groupProviders', [])); |
|
| 50 | } |
|
| 51 | ||
| 52 | public function groupProvider($groupProviderId) |
|
| 53 | { |
|
| 54 | if (!in_array($groupProviderId, $this->groupProviders())) { |
|
| 55 | throw new InstanceException(sprintf('group provider "%s" not found', $groupProviderId)); |
|
| 56 | } |
|
| 57 | ||
| 58 | return $this->configData['groupProviders'][$groupProviderId]; |
|
| 59 | } |
|
| 60 | ||
| 61 | public function apiConsumers() |
|
| 62 | { |
|