1: <?php
2: /**
3: * @package Controls
4: */
5:
6: /**
7: * A subclass of TextBox that validates and sanitizes urls.
8: */
9: class QUrlTextBox extends QTextBox {
10: /** @var int */
11: protected $intSanitizeFilter = FILTER_SANITIZE_URL;
12: /** @var int */
13: protected $intValidateFilter = FILTER_VALIDATE_URL;
14:
15: /**
16: * Constructor
17: *
18: * @param QControl|QForm $objParentObject
19: * @param null|string $strControlId
20: */
21: public function __construct($objParentObject, $strControlId = null) {
22: parent::__construct($objParentObject, $strControlId);
23: $this->strLabelForInvalid = QApplication::Translate('Invalid Web Address');
24: $this->strTextMode = QTextMode::Url;
25: }
26: }