private function _setOptions(array $aOptions, $sPrefix = '', $nDepth = 0)
    {
        $sPrefix = trim((string)$sPrefix);
        $nDepth = intval($nDepth);
        // Check the max depth
        if($nDepth < 0 || $nDepth > 9)
        {
            throw new \Jaxon\Config\Exception\Data(jaxon_trans('config.errors.data.depth',
                array('key' => $sPrefix, 'depth' => $nDepth)));
        }
        foreach($aOptions as $sName => $xOption)
        {
            if(is_int($sName))
            {
                continue;
            }

            $sName = trim($sName);
            $sFullName = ($sPrefix) ? $sPrefix . '.' . $sName : $sName;
            // Save the value of this option
            $this->aOptions[$sFullName] = $xOption;
            // Save the values of its sub-options
            if(is_array($xOption))
            {
                // Recursively read the options in the array
                $this->_setOptions($xOption, $sFullName, $nDepth + 1);
            }
        }
    }
private function _setOptions(array $aOptions, $sPrefix = '', $nDepth = 0)
    {
        $sPrefix = trim((string)$sPrefix);
        $nDepth = intval($nDepth);
        // Check the max depth
        if($nDepth < 0 || $nDepth > 9)
        {
            throw new \Jaxon\Config\Exception\Data(jaxon_trans('config.errors.data.depth',
                array('key' => $sPrefix, 'depth' => $nDepth)));
        }
        foreach($aOptions as $sName => $xOption)
        {
            if(is_int($sName))
            {
                continue;
            }

            $sName = trim($sName);
            $sFullName = ($sPrefix) ? $sPrefix . '.' . $sName : $sName;
            // Save the value of this option
            $this->aOptions[$sFullName] = $xOption;
            // Save the values of its sub-options
            if(is_array($xOption))
            {
                // Recursively read the options in the array
                $this->_setOptions($xOption, $sFullName, $nDepth + 1);
            }
        }
    }
private function _setOptions ( array $ aOptions , $ sPrefix = '' , $ nDepth = 0 ) { $ sPrefix = trim ( ( string ) $ sPrefix ) ; $ nDepth = intval ( $ nDepth ) ; // Check the max depth if ( $ nDepth < 0 || $ nDepth > 9 ) { throw new \ Jaxon \ Config \ Exception \ Data ( jaxon_trans ( 'config.errors.data.depth' , array ( 'key' => $ sPrefix , 'depth' => $ nDepth ) ) ) ; } foreach ( $ aOptions as $ sName => $ xOption ) { if ( is_int ( $ sName ) ) { continue ; } $ sName = trim ( $ sName ) ; $ sFullName = ( $ sPrefix ) ? $ sPrefix . '.' . $ sName : $ sName ; // Save the value of this option $ this -> aOptions [ $ sFullName ] = $ xOption ; // Save the values of its sub-options if ( is_array ( $ xOption ) ) { // Recursively read the options in the array $ this -> _setOptions ( $ xOption , $ sFullName , $ nDepth + 1 ) ; } } }
Recursively set Jaxon options from a data array

@param array             $aOptions           The options array
@param string            $sPrefix            The prefix for option names
@param integer           $nDepth             The depth from the first call

@return void
Recursively set Jaxon options from a data array