public function __get($strName) { switch ($strName) { case "Value": if ($this->strText === null || $this->strText === "") { return null; } else { return (int) filter_var($this->strText, FILTER_SANITIZE_NUMBER_INT); } default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
/** * Constructor * * @param QControl|QForm $objParentObject * @param null|string $strControlId */ public function __construct($objParentObject, $strControlId = null) { parent::__construct($objParentObject, $strControlId); $this->strLabelForInvalid = QApplication::Translate('Invalid Integer'); $this->strDataType = QType::Integer; }