示例#1
0
 /**
  * Add a new report parameter
  *
  * @param int $controltype
  * @param string $name
  * @param string $fieldname
  * @param string $value
  * @param array $values
  * @param int $fieldlength
  * @param string $dbfield
  * @param string $dbaction
  *
  * @return object {@link xhelpReportParameter}
  * @access	public
  */
 function addParam($controltype, $name, $fieldname, $value, $values, $fieldlength, $dbfield, $dbaction)
 {
     $param =& xhelpReportParameter::create();
     $param->controltype = $controltype;
     $param->name = $name;
     $param->fieldname = $fieldname;
     $param->value = $value;
     $param->values = $values;
     $param->fieldlength = $fieldlength;
     $param->maxlength = $fieldlength < 50 ? $fieldlength : 50;
     $param->dbfield = $dbfield;
     $param->dbaction = $dbaction;
     return $param;
 }
示例#2
0
 /**
  * Get report parameters
  *
  * @return array {@link xhelpReportParameter} objects
  * @access	public
  */
 function getParams()
 {
     include_once XHELP_CLASS_PATH . '/reportParameter.php';
     $params = array();
     foreach ($this->parameters as $name => $param) {
         $params[] = xhelpReportParameter::addParam($param['controltype'], $name, $param['fieldname'], $param['value'], $param['values'], $param['fieldlength'], $param['dbfield'], $param['dbaction']);
     }
     return $params;
 }