protected function _processExtends(array $data, $section, array $config = array())
    {
        if (!isset($data[$section])) {

            throw new Zend_Config_Exception(sprintf('Section "%s" cannot be found', $section));
        }

        $thisSection  = $data[$section];

        if (is_array($thisSection) && isset($thisSection[self::EXTENDS_NAME])) {
            if (is_array($thisSection[self::EXTENDS_NAME])) {

                throw new Zend_Config_Exception('Invalid extends clause: must be a string; array received');
            }
            $this->_assertValidExtend($section, $thisSection[self::EXTENDS_NAME]);

            if (!$this->_skipExtends) {
                $config = $this->_processExtends($data, $thisSection[self::EXTENDS_NAME], $config);
            }
            unset($thisSection[self::EXTENDS_NAME]);
        }

        $config = $this->_arrayMergeRecursive($config, $thisSection);

        return $config;
    }
protected function _processExtends(array $data, $section, array $config = array())
    {
        if (!isset($data[$section])) {

            throw new Zend_Config_Exception(sprintf('Section "%s" cannot be found', $section));
        }

        $thisSection  = $data[$section];

        if (is_array($thisSection) && isset($thisSection[self::EXTENDS_NAME])) {
            if (is_array($thisSection[self::EXTENDS_NAME])) {

                throw new Zend_Config_Exception('Invalid extends clause: must be a string; array received');
            }
            $this->_assertValidExtend($section, $thisSection[self::EXTENDS_NAME]);

            if (!$this->_skipExtends) {
                $config = $this->_processExtends($data, $thisSection[self::EXTENDS_NAME], $config);
            }
            unset($thisSection[self::EXTENDS_NAME]);
        }

        $config = $this->_arrayMergeRecursive($config, $thisSection);

        return $config;
    }
protected function _processExtends ( array $ data , $ section , array $ config = array ( ) ) { if ( ! isset ( $ data [ $ section ] ) ) { throw new Zend_Config_Exception ( sprintf ( 'Section "%s" cannot be found' , $ section ) ) ; } $ thisSection = $ data [ $ section ] ; if ( is_array ( $ thisSection ) && isset ( $ thisSection [ self :: EXTENDS_NAME ] ) ) { if ( is_array ( $ thisSection [ self :: EXTENDS_NAME ] ) ) { throw new Zend_Config_Exception ( 'Invalid extends clause: must be a string; array received' ) ; } $ this -> _assertValidExtend ( $ section , $ thisSection [ self :: EXTENDS_NAME ] ) ; if ( ! $ this -> _skipExtends ) { $ config = $ this -> _processExtends ( $ data , $ thisSection [ self :: EXTENDS_NAME ] , $ config ) ; } unset ( $ thisSection [ self :: EXTENDS_NAME ] ) ; } $ config = $ this -> _arrayMergeRecursive ( $ config , $ thisSection ) ; return $ config ; }
Helper function to process each element in the section and handle
the "_extends" inheritance attribute.

@param  array            $data Data array to process
@param  string           $section Section to process
@param  array            $config  Configuration which was parsed yet
@throws Zend_Config_Exception When $section cannot be found
@return array
Helper function to process each element in the section and handle the _extends inheritance attribute .