protected function _mergeConfig($current, $successor)
    {
        if (is_array($current) and is_array($successor)) {
            foreach ($successor as $key => $value) {
                if (isset($current[$key])
                    and is_array($value)
                    and is_array($current[$key])) {

                    $current[$key] = $this->_mergeConfig($current[$key], $value);
                } else {
                    $current[$key] = $successor[$key];
                }
            }
        }
        return $current;
    }
protected function _mergeConfig($current, $successor)
    {
        if (is_array($current) and is_array($successor)) {
            foreach ($successor as $key => $value) {
                if (isset($current[$key])
                    and is_array($value)
                    and is_array($current[$key])) {

                    $current[$key] = $this->_mergeConfig($current[$key], $value);
                } else {
                    $current[$key] = $successor[$key];
                }
            }
        }
        return $current;
    }
protected function _mergeConfig ( $ current , $ successor ) { if ( is_array ( $ current ) and is_array ( $ successor ) ) { foreach ( $ successor as $ key => $ value ) { if ( isset ( $ current [ $ key ] ) and is_array ( $ value ) and is_array ( $ current [ $ key ] ) ) { $ current [ $ key ] = $ this -> _mergeConfig ( $ current [ $ key ] , $ value ) ; } else { $ current [ $ key ] = $ successor [ $ key ] ; } } } return $ current ; }
Merge config hashes recursivly

The algorithm merges configuration arrays recursively. If an element is
an array in both, the values will be appended. If it is a scalar in both,
the value will be replaced.

@param  array $current The legacy hash
@param  array $successor The hash which values count more when in doubt
@return array Merged hash
Merge config hashes recursivly