public function __get($strName) { switch ($strName) { case 'ShortDescriptionAsHtml': $strToReturn = QApplication::HtmlEntities(trim($this->strShortDescription)); $strToReturn = str_replace("\r", '', $strToReturn); $strToReturn = str_replace("\n", '<br/>', $strToReturn); return $strToReturn; case 'VariableType': if ($this->intVariableTypeId == VariableType::Object && $this->ObjectType) { $strToReturn = $this->ObjectType->Name; } else { $strToReturn = strtolower(VariableType::ToString($this->intVariableTypeId)); } if ($strToReturn == 'qdatetime') { $strToReturn = 'QDateTime'; } if ($this->blnArrayFlag) { $strToReturn .= '[]'; } return $strToReturn; case 'DisplayDefaultValue': if (is_null($this->strDefaultValue)) { return; } else { return ' = ' . $this->strDefaultValue; } default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
public function dtgVariable_VariableTypeId_Render(Variable $objVariable) { if (!is_null($objVariable->VariableTypeId)) { return VariableType::ToString($objVariable->VariableTypeId); } else { return null; } }
/** * Create a global variable element using a declaration specification * for its type. * @param string $name Name of the variable. * @param string $type Parameter type by specification, eg: const int* * @param string $description A description used to generate documentation. */ public function __construct($name, $type, $description = "") { parent::__construct($type, $description); $this->name = $name; }
/** * Create a parameter element from a declaration specification for the type. * @param string $name Name of the parameter. * @param string $type Parameter type by specification, eg: const int* * @param string $default_value Default value of the parameter. * @param string $description */ public function __construct($name, $type, $default_value = "", $description = "") { parent::__construct($type, $description); $this->name = $name; $this->default_value = $default_value; }