| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 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 |
||
| 34 | {
|
||
| 35 | $config = []; |
||
| 36 | foreach ($this->getParameters($path) as $parameter) {
|
||
| 37 | $name = $parameter['Name']; |
||
| 38 | $name = str_replace(["{$path}/", '/'], ['', '.'], $name);
|
||
| 39 | $value = $parameter['Value']; |
||
| 40 | $config[$name] = $value; |
||
| 86 | } |