original_string: public function storeDatasources(array $datasources)
      {
          foreach ($datasources as $ds) {
              if (!$ds instanceof HTML_QuickForm2_DataSource) {
                  throw new HTML_QuickForm2_InvalidArgumentException(
                      'Array should contain only DataSource instances'
                  );
              }
          }
          $this->data['datasources'] = $datasources;
      }
code: public function storeDatasources(array $datasources)
      {
          foreach ($datasources as $ds) {
              if (!$ds instanceof HTML_QuickForm2_DataSource) {
                  throw new HTML_QuickForm2_InvalidArgumentException(
                      'Array should contain only DataSource instances'
                  );
              }
          }
          $this->data['datasources'] = $datasources;
      }
code_tokens: public function storeDatasources ( array $ datasources ) { foreach ( $ datasources as $ ds ) { if ( ! $ ds instanceof HTML_QuickForm2_DataSource ) { throw new HTML_QuickForm2_InvalidArgumentException ( 'Array should contain only DataSource instances' ) ; } } $ this -> data [ 'datasources' ] = $ datasources ; }
docstring: Stores the controller data sources
  
  @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: Stores the controller data sources