original_string: 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();
      }
code: 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();
      }
code_tokens: 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 ( ) ; }
docstring: 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
docstring_tokens: Replaces the list of form s data sources with a completely new one