Пример #1
0
 /**
  * Adds a column to the transaction
  * Calls the parent addColumn method then sets the default value.
  * @param string $colName The column name
  * @param string $type The column type (NUMERYC_TYPE, STRING_TYPE, etc)
  * @param string $method The request method (GET, POST, FILE, COOKIE, SESSION)
  * @param string $reference The submitted variable name (if method=GET and reference=test, value=$_GET['test'])
  * @param string $defaultValue The default value for the current column
  * @access public
  */
 function addColumn($colName, $type, $method, $reference, $defaultValue = '')
 {
     parent::addColumn($colName, $type, $method, $reference);
     if ($method == 'VALUE') {
         $this->columns[$colName]['default'] = $reference;
     } else {
         if ($method == $this->importType) {
             $this->headers[$reference] = $reference;
         }
         $this->columns[$colName]['default'] = $defaultValue;
     }
 }
Пример #2
0
 /**
  * Adds a column to the transaction
  * Calls the parent addColumn method then sets the default value.
  * @param string $colName The column name
  * @param string $type The column type (NUMERYC_TYPE, STRING_TYPE, etc)
  * @param string $method The request method (GET, POST, FILE, COOKIE, SESSION)
  * @param string $reference The submitted variable name (if method=GET and reference=test, value=$_GET['test'])
  * @param string $defaultValue The default value for the current column
  * @access public
  */
 function addColumn($colName, $type, $method, $reference, $defaultValue = '')
 {
     parent::addColumn($colName, $type, $method, $reference);
     if ($method == "VALUE") {
         $this->columns[$colName]['default'] = $reference;
     } else {
         $this->columns[$colName]['default'] = $defaultValue;
     }
 }