public function setDataSources(array $datasources)
    {
        foreach ($datasources as $ds) {
            if (!$ds instanceof HTML_QuickForm2_DataSource) {
                throw new HTML_QuickForm2_InvalidArgumentException(
                    'Array should contain only DataSource instances'
                );
            }
        }
        $this->datasources = $datasources;
        $this->updateValue();
    }
public function setDataSources(array $datasources)
    {
        foreach ($datasources as $ds) {
            if (!$ds instanceof HTML_QuickForm2_DataSource) {
                throw new HTML_QuickForm2_InvalidArgumentException(
                    'Array should contain only DataSource instances'
                );
            }
        }
        $this->datasources = $datasources;
        $this->updateValue();
    }
public function setDataSources ( array $ datasources ) { foreach ( $ datasources as $ ds ) { if ( ! $ ds instanceof HTML_QuickForm2_DataSource ) { throw new HTML_QuickForm2_InvalidArgumentException ( 'Array should contain only DataSource instances' ) ; } } $ this -> datasources = $ datasources ; $ this -> updateValue ( ) ; }
Replaces the list of form's data sources with a completely new one

@param    array   A new data source list
@throws   HTML_QuickForm2_InvalidArgumentException    if given array
contains something that is not a valid data source
Replaces the list of form s data sources with a completely new one