original_string: function setDatasource(&$datasource, $defaultsFilter = null, $constantsFilter = null)
      {
          if (is_object($datasource)) {
              $this->_datasource =& $datasource;
              if (is_callable(array($datasource, 'defaultValues'))) {
                  $this->setDefaults($datasource->defaultValues($this), $defaultsFilter);
              }
              if (is_callable(array($datasource, 'constantValues'))) {
                  $this->setConstants($datasource->constantValues($this), $constantsFilter);
              }
          } else {
              return self::raiseError(null, QUICKFORM_INVALID_DATASOURCE, null, E_USER_WARNING, "Datasource is not an object in QuickForm::setDatasource()", 'HTML_QuickForm_Error', true);
          }
      }
code: function setDatasource(&$datasource, $defaultsFilter = null, $constantsFilter = null)
      {
          if (is_object($datasource)) {
              $this->_datasource =& $datasource;
              if (is_callable(array($datasource, 'defaultValues'))) {
                  $this->setDefaults($datasource->defaultValues($this), $defaultsFilter);
              }
              if (is_callable(array($datasource, 'constantValues'))) {
                  $this->setConstants($datasource->constantValues($this), $constantsFilter);
              }
          } else {
              return self::raiseError(null, QUICKFORM_INVALID_DATASOURCE, null, E_USER_WARNING, "Datasource is not an object in QuickForm::setDatasource()", 'HTML_QuickForm_Error', true);
          }
      }
code_tokens: function setDatasource ( & $ datasource , $ defaultsFilter = null , $ constantsFilter = null ) { if ( is_object ( $ datasource ) ) { $ this -> _datasource = & $ datasource ; if ( is_callable ( array ( $ datasource , 'defaultValues' ) ) ) { $ this -> setDefaults ( $ datasource -> defaultValues ( $ this ) , $ defaultsFilter ) ; } if ( is_callable ( array ( $ datasource , 'constantValues' ) ) ) { $ this -> setConstants ( $ datasource -> constantValues ( $ this ) , $ constantsFilter ) ; } } else { return self :: raiseError ( null , QUICKFORM_INVALID_DATASOURCE , null , E_USER_WARNING , "Datasource is not an object in QuickForm::setDatasource()" , 'HTML_QuickForm_Error' , true ) ; } }
docstring: Sets a datasource object for this form object
  
  Datasource default and constant values will feed the QuickForm object if
  the datasource implements defaultValues() and constantValues() methods.
  
  @param     object   $datasource          datasource object implementing the informal datasource protocol
  @param     mixed    $defaultsFilter      string or array of filter(s) to apply to default values
  @param     mixed    $constantsFilter     string or array of filter(s) to apply to constants values
  @since     3.3
  @access    public
  @return    void
docstring_tokens: Sets a datasource object for this form object