Extensions/WordPress/Options/OptionsConfig.php
private function validate_config( $config )
    {
        $this->section_names  = array();
        
        foreach( $config['sections'] as $section )
        {
            
            if( in_array( $section->title, $this->section_names ) )
            {
                throw new DuplicateSectionException( $section->title );
            }
            
            // Component name uniqueness is validated by the from object, not here
            foreach( $section->get_fields() as $field )
            {
                $this->fields[] = $field;
            }
            
            $this->section_names[] = $section->title;
        }
        return $config;
    }
private function validate_config( $config )
    {
        $this->section_names  = array();
        
        foreach( $config['sections'] as $section )
        {
            
            if( in_array( $section->title, $this->section_names ) )
            {
                throw new DuplicateSectionException( $section->title );
            }
            
            // Component name uniqueness is validated by the from object, not here
            foreach( $section->get_fields() as $field )
            {
                $this->fields[] = $field;
            }
            
            $this->section_names[] = $section->title;
        }
        return $config;
    }
private function validate_config ( $ config ) { $ this -> section_names = array ( ) ; foreach ( $ config [ 'sections' ] as $ section ) { if ( in_array ( $ section -> title , $ this -> section_names ) ) { throw new DuplicateSectionException ( $ section -> title ) ; } // Component name uniqueness is validated by the from object, not here foreach ( $ section -> get_fields ( ) as $ field ) { $ this -> fields [ ] = $ field ; } $ this -> section_names [ ] = $ section -> title ; } return $ config ; }
Validate the integrity of the provided configuration array

@param array $config
@throws DuplicateNameException On duplicate field name
Validate the integrity of the provided configuration array