Source for file TextBase.php
Documentation is available at TextBase.php
- 1: <?php
- 3: /**
- 4: * Nette Framework
- 5: *
- 6: * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
- 7: *
- 8: * This source file is subject to the "Nette license" that is bundled
- 9: * with this package in the file license.txt.
- 10: *
- 11: * For more information please see https://nette.org
- 12: *
- 19: */
- 27: /**
- 28: * Implements the basic functionality common to text input controls.
- 29: *
- 33: */
- 35: {
- 47: /**
- 48: * Sets control's value.
- 51: */
- 53: {
- 57: }
- 59: }
- 63: /**
- 64: * Loads HTTP data.
- 67: */
- 69: {
- 73: }
- 77: /**
- 78: * Sets the special value which is treated as empty string.
- 81: */
- 83: {
- 86: }
- 90: /**
- 91: * Returns the special value which is treated as empty string.
- 93: */
- 95: {
- 97: }
- 101: /**
- 102: * Appends input string filter callback.
- 105: */
- 107: {
- 111: throw new InvalidArgumentException("Filter '$textual' is not " . ($able ? 'callable.' : 'valid PHP callback.'));
- 112: }
- 115: }
- 120: {
- 123: }
- 126: }
- 130: /**
- 131: * Min-length validator: has control's value minimal length?
- 135: */
- 137: {
- 138: // PHP bug #33268 iconv_strlen works since PHP 5.0.5
- 140: }
- 144: /**
- 145: * Max-length validator: is control's value length in limit?
- 149: */
- 151: {
- 153: }
- 157: /**
- 158: * Length validator: is control's value length in range?
- 162: */
- 164: {
- 167: }
- 170: }
- 174: /**
- 175: * Email validator: is control's value valid email address?
- 178: */
- 180: {
- 182: }
- 186: /**
- 187: * URL validator: is control's value valid URL?
- 190: */
- 192: {
- 194: }
- 198: /**
- 199: * Regular expression validator: matches control's value regular expression?
- 203: */
- 205: {
- 207: }
- 211: /**
- 212: * Integer validator: is a control's value decimal number?
- 215: */
- 217: {
- 219: }
- 223: /**
- 224: * Float validator: is a control's value float number?
- 227: */
- 229: {
- 231: }
- 235: /**
- 236: * Rangle validator: is a control's value number in specified range?
- 240: */
- 242: {
- 243: return ($range[0] === NULL || $control->getValue() >= $range[0]) && ($range[1] === NULL || $control->getValue() <= $range[1]);
- 244: }
- 248: /**
- 249: * Float string cleanup.
- 252: */
- 254: {
- 256: }
- 258: }