private function flattenParametersFromConfig(ContainerBuilder $container, $configs, $root)
    {
        $parameters = [];

        foreach ($configs as $key => $value) {
            $parameterKey = sprintf('%s_%s', $root, $key);
            if (is_array($value)) {
                $parameters = array_merge(
                    $parameters,
                    $this->flattenParametersFromConfig($container, $value, $parameterKey)
                );

                continue;
            }

            $parameters[$parameterKey] = $value;
        }

        return $parameters;
    }
private function flattenParametersFromConfig(ContainerBuilder $container, $configs, $root)
    {
        $parameters = [];

        foreach ($configs as $key => $value) {
            $parameterKey = sprintf('%s_%s', $root, $key);
            if (is_array($value)) {
                $parameters = array_merge(
                    $parameters,
                    $this->flattenParametersFromConfig($container, $value, $parameterKey)
                );

                continue;
            }

            $parameters[$parameterKey] = $value;
        }

        return $parameters;
    }
private function flattenParametersFromConfig ( ContainerBuilder $ container , $ configs , $ root ) { $ parameters = [ ] ; foreach ( $ configs as $ key => $ value ) { $ parameterKey = sprintf ( '%s_%s' , $ root , $ key ) ; if ( is_array ( $ value ) ) { $ parameters = array_merge ( $ parameters , $ this -> flattenParametersFromConfig ( $ container , $ value , $ parameterKey ) ) ; continue ; } $ parameters [ $ parameterKey ] = $ value ; } return $ parameters ; }
Flatten multi-dimensional Symfony configuration array into a
one-dimensional parameters array.

@param ContainerBuilder $container
@param array            $configs
@param string           $root

@return array
Flatten multi - dimensional Symfony configuration array into a one - dimensional parameters array .