original_string: function setDefaults($defaultValues = null, $filter = null)
      {
          if (is_array($defaultValues)) {
              if (isset($filter)) {
                  if (is_array($filter) && (2 != count($filter) || !is_callable($filter))) {
                      foreach ($filter as $val) {
                          if (!is_callable($val)) {
                              return self::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::setDefaults()", 'HTML_QuickForm_Error', true);
                          } else {
                              $defaultValues = $this->_recursiveFilter($val, $defaultValues);
                          }
                      }
                  } elseif (!is_callable($filter)) {
                      return self::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::setDefaults()", 'HTML_QuickForm_Error', true);
                  } else {
                      $defaultValues = $this->_recursiveFilter($filter, $defaultValues);
                  }
              }
              $this->_defaultValues = HTML_QuickForm::arrayMerge($this->_defaultValues, $defaultValues);
              foreach (array_keys($this->_elements) as $key) {
                  $this->_elements[$key]->onQuickFormEvent('updateValue', null, $this);
              }
          }
      }
code: function setDefaults($defaultValues = null, $filter = null)
      {
          if (is_array($defaultValues)) {
              if (isset($filter)) {
                  if (is_array($filter) && (2 != count($filter) || !is_callable($filter))) {
                      foreach ($filter as $val) {
                          if (!is_callable($val)) {
                              return self::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::setDefaults()", 'HTML_QuickForm_Error', true);
                          } else {
                              $defaultValues = $this->_recursiveFilter($val, $defaultValues);
                          }
                      }
                  } elseif (!is_callable($filter)) {
                      return self::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::setDefaults()", 'HTML_QuickForm_Error', true);
                  } else {
                      $defaultValues = $this->_recursiveFilter($filter, $defaultValues);
                  }
              }
              $this->_defaultValues = HTML_QuickForm::arrayMerge($this->_defaultValues, $defaultValues);
              foreach (array_keys($this->_elements) as $key) {
                  $this->_elements[$key]->onQuickFormEvent('updateValue', null, $this);
              }
          }
      }
code_tokens: function setDefaults ( $ defaultValues = null , $ filter = null ) { if ( is_array ( $ defaultValues ) ) { if ( isset ( $ filter ) ) { if ( is_array ( $ filter ) && ( 2 != count ( $ filter ) || ! is_callable ( $ filter ) ) ) { foreach ( $ filter as $ val ) { if ( ! is_callable ( $ val ) ) { return self :: raiseError ( null , QUICKFORM_INVALID_FILTER , null , E_USER_WARNING , "Callback function does not exist in QuickForm::setDefaults()" , 'HTML_QuickForm_Error' , true ) ; } else { $ defaultValues = $ this -> _recursiveFilter ( $ val , $ defaultValues ) ; } } } elseif ( ! is_callable ( $ filter ) ) { return self :: raiseError ( null , QUICKFORM_INVALID_FILTER , null , E_USER_WARNING , "Callback function does not exist in QuickForm::setDefaults()" , 'HTML_QuickForm_Error' , true ) ; } else { $ defaultValues = $ this -> _recursiveFilter ( $ filter , $ defaultValues ) ; } } $ this -> _defaultValues = HTML_QuickForm :: arrayMerge ( $ this -> _defaultValues , $ defaultValues ) ; foreach ( array_keys ( $ this -> _elements ) as $ key ) { $ this -> _elements [ $ key ] -> onQuickFormEvent ( 'updateValue' , null , $ this ) ; } } }
docstring: Initializes default form values
  
  @param     array    $defaultValues       values used to fill the form
  @param     mixed    $filter              (optional) filter(s) to apply to all default values
  @since     1.0
  @access    public
  @return    void
docstring_tokens: Initializes default form values