containerFactory = $containerFactory; } /** * @inheritDoc */ public function createContainerFromArray(array $structure): ContainerInterface { $map = []; foreach ($structure as $key => $value) { if (is_object($value)) { $value = get_object_vars($value); } if (is_array($value)) { $value = $this->createContainerFromArray($value); } $map[$key] = $value; } $container = $this->containerFactory->createContainerFromArray($map); return $container; } }