original_string: function setConstants($constantValues = null, $filter = null)
      {
          if (is_array($constantValues)) {
              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::setConstants()", 'HTML_QuickForm_Error', true);
                          } else {
                              $constantValues = $this->_recursiveFilter($val, $constantValues);
                          }
                      }
                  } elseif (!is_callable($filter)) {
                      return self::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::setConstants()", 'HTML_QuickForm_Error', true);
                  } else {
                      $constantValues = $this->_recursiveFilter($filter, $constantValues);
                  }
              }
              $this->_constantValues = HTML_QuickForm::arrayMerge($this->_constantValues, $constantValues);
              foreach (array_keys($this->_elements) as $key) {
                  $this->_elements[$key]->onQuickFormEvent('updateValue', null, $this);
              }
          }
      }
code: function setConstants($constantValues = null, $filter = null)
      {
          if (is_array($constantValues)) {
              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::setConstants()", 'HTML_QuickForm_Error', true);
                          } else {
                              $constantValues = $this->_recursiveFilter($val, $constantValues);
                          }
                      }
                  } elseif (!is_callable($filter)) {
                      return self::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::setConstants()", 'HTML_QuickForm_Error', true);
                  } else {
                      $constantValues = $this->_recursiveFilter($filter, $constantValues);
                  }
              }
              $this->_constantValues = HTML_QuickForm::arrayMerge($this->_constantValues, $constantValues);
              foreach (array_keys($this->_elements) as $key) {
                  $this->_elements[$key]->onQuickFormEvent('updateValue', null, $this);
              }
          }
      }
code_tokens: function setConstants ( $ constantValues = null , $ filter = null ) { if ( is_array ( $ constantValues ) ) { 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::setConstants()" , 'HTML_QuickForm_Error' , true ) ; } else { $ constantValues = $ this -> _recursiveFilter ( $ val , $ constantValues ) ; } } } elseif ( ! is_callable ( $ filter ) ) { return self :: raiseError ( null , QUICKFORM_INVALID_FILTER , null , E_USER_WARNING , "Callback function does not exist in QuickForm::setConstants()" , 'HTML_QuickForm_Error' , true ) ; } else { $ constantValues = $ this -> _recursiveFilter ( $ filter , $ constantValues ) ; } } $ this -> _constantValues = HTML_QuickForm :: arrayMerge ( $ this -> _constantValues , $ constantValues ) ; foreach ( array_keys ( $ this -> _elements ) as $ key ) { $ this -> _elements [ $ key ] -> onQuickFormEvent ( 'updateValue' , null , $ this ) ; } } }
docstring: Initializes constant form values.
  These values won't get overridden by POST or GET vars
  
  @param     array   $constantValues        values used to fill the form
  @param     mixed    $filter              (optional) filter(s) to apply to all default values
  
  @since     2.0
  @access    public
  @return    void
docstring_tokens: Initializes constant form values . These values won t get overridden by POST or GET vars