*/ private array $configs = []; /** * @param Configuration[] $configs */ public function __construct(array $configs) { foreach ($configs as $config) { $this->configs[$config->getName()] = $config->getValue(); } } /** * @return array */ public function getConfigurations(): array { return $this->configs; } }