| Total Complexity | 9 |
| Total Lines | 76 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class Reader |
||
| 10 | {
|
||
| 11 | /** |
||
| 12 | * @var SsmClient |
||
| 13 | */ |
||
| 14 | private $client; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param SsmClient|array $client |
||
| 18 | */ |
||
| 19 | public function __construct($client) |
||
| 20 | {
|
||
| 21 | if (is_array($client)) {
|
||
| 22 | $client = new SsmClient($client); |
||
| 23 | } |
||
| 24 | |||
| 25 | $this->client = $client; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @see https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-ssm-2014-11-06.html#getparametersbypath |
||
| 30 | * @param string $path |
||
| 31 | * @return mixed[] |
||
| 32 | */ |
||
| 33 | public function fromPath(string $path): array |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param string $path |
||
| 48 | * @return Generator|string[][] |
||
| 49 | */ |
||
| 50 | private function getParameters(string $path) |
||
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @see https://docs.aws.amazon.com/de_de/systems-manager/latest/APIReference/API_GetParametersByPath.html#API_GetParametersByPath_RequestParameters |
||
| 67 | * |
||
| 68 | * @param string $path |
||
| 69 | * @param string|null $nextToken |
||
| 70 | * @return Result|mixed |
||
| 71 | */ |
||
| 72 | private function getParametersByPath(string $path, string $nextToken = null) |
||
| 85 | } |
||
| 86 | } |