protected function flatten(array &$parameters, array $subnode = null, $path = null)
    {
        if (null === $subnode) {
            $subnode = & $parameters;
        }
        foreach ($subnode as $key => $value) {
            if (is_array($value)) {
                $nodePath = $path ? $path . '.' . $key : $key;
                $this->flatten($parameters, $value, $nodePath);
                if (null === $path) {
                    unset($parameters[$key]);
                }
            } elseif (null !== $path) {
                $parameters[$path . '.' . $key] = $value;
            }
        }
    }
protected function flatten(array &$parameters, array $subnode = null, $path = null)
    {
        if (null === $subnode) {
            $subnode = & $parameters;
        }
        foreach ($subnode as $key => $value) {
            if (is_array($value)) {
                $nodePath = $path ? $path . '.' . $key : $key;
                $this->flatten($parameters, $value, $nodePath);
                if (null === $path) {
                    unset($parameters[$key]);
                }
            } elseif (null !== $path) {
                $parameters[$path . '.' . $key] = $value;
            }
        }
    }
protected function flatten ( array & $ parameters , array $ subnode = null , $ path = null ) { if ( null === $ subnode ) { $ subnode = & $ parameters ; } foreach ( $ subnode as $ key => $ value ) { if ( is_array ( $ value ) ) { $ nodePath = $ path ? $ path . '.' . $ key : $ key ; $ this -> flatten ( $ parameters , $ value , $ nodePath ) ; if ( null === $ path ) { unset ( $ parameters [ $ key ] ) ; } } elseif ( null !== $ path ) { $ parameters [ $ path . '.' . $ key ] = $ value ; } } }
Flattens an nested array of parameters.

The scheme used is:
'key' => array('key2' => array('key3' => 'value'))
Becomes:
'key.key2.key3' => 'value'

This function takes an array by reference and will modify it

@param array  &$parameters The array that will be flattened
@param array  $subnode     Current subnode being parsed, used internally for recursive calls
@param string $path        Current path being parsed, used internally for recursive calls
Flattens an nested array of parameters .