Class TextBase (namespace Nette\Forms)
Implements the basic functionality common to text input controls.
Object | --Component | --FormControl | --TextBase
Public Method Summary | |
---|---|
TextBase |
addFilter
(callback $filter)
Appends input string filter callback.
|
static string |
filterFloat
(string $s)
Float string cleanup.
|
string |
Returns the special value which is treated as empty string.
|
void |
loadHttpData
(array $data)
Loads HTTP data.
|
void |
notifyRule
(Rule $rule)
|
TextBase |
setEmptyValue
(string $value)
Sets the special value which is treated as empty string.
|
void |
setValue
(string $value)
Sets control's value.
|
static bool |
validateEmail
(TextBase $control)
Email validator: is control's value valid email address?
|
static bool |
validateFloat
(TextBase $control)
Float validator: is a control's value float number?
|
static bool |
validateInteger
(TextBase $control)
Integer validator: is a control's value decimal number?
|
static bool |
validateLength
(TextBase $control, array $range)
Length validator: is control's value length in range?
|
static bool |
validateMaxLength
(TextBase $control, int $length)
Max-length validator: is control's value length in limit?
|
static bool |
validateMinLength
(TextBase $control, int $length)
Min-length validator: has control's value minimal length?
|
static bool |
validateRange
(TextBase $control, array $range)
Rangle validator: is a control's value number in specified range?
|
static bool |
validateRegexp
(TextBase $control, string $regexp)
Regular expression validator: matches control's value regular expression?
|
static bool |
validateUrl
(TextBase $control)
URL validator: is control's value valid URL?
|
Methods Inherited From Component |
---|
__construct(), attached(), detached(), getName(), getParent(), getService(), getServiceLocator(), lookup(), lookupPath(), monitor(), setParent(), setServiceLocator(), validateParent(), __clone(), __wakeup() |
Methods Inherited From Object |
---|
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset() |
Variable Summary | ||||
---|---|---|---|---|
protected string | $emptyValue | '' |
line 37 |
|
protected array | $filters | array() |
line 43 |
|
protected string | $tmpValue |
|
line 40 |
Method Details | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 106 addFilterpublic TextBase addFilter (callback $filter) Appends input string filter callback.
|
|||||||||||||||
line 253 filterFloatpublic static string filterFloat (string $s) Float string cleanup.
|
|||||||||||||||
line 94 getEmptyValuepublic string getEmptyValue () Returns the special value which is treated as empty string.
|
|||||||||||||||
line 68 loadHttpDatapublic void loadHttpData (array $data) Loads HTTP data. Overridden in child classes as:
|
|||||||||||||||
line 119 notifyRulepublic void notifyRule (Rule $rule) Overridden in child classes as:
|
|||||||||||||||
line 82 setEmptyValuepublic TextBase setEmptyValue (string $value) Sets the special value which is treated as empty string.
|
|||||||||||||||
line 52 setValuepublic void setValue (string $value) Sets control's value.
|
|||||||||||||||
line 179 validateEmailpublic static bool validateEmail (TextBase $control) Email validator: is control's value valid email address?
|
|||||||||||||||
line 228 validateFloatpublic static bool validateFloat (TextBase $control) Float validator: is a control's value float number?
|
|||||||||||||||
line 216 validateIntegerpublic static bool validateInteger (TextBase $control) Integer validator: is a control's value decimal number?
|
|||||||||||||||
line 163 validateLengthpublic static bool validateLength (TextBase $control, array $range) Length validator: is control's value length in range?
|
|||||||||||||||
line 150 validateMaxLengthpublic static bool validateMaxLength (TextBase $control, int $length) Max-length validator: is control's value length in limit?
|
|||||||||||||||
line 136 validateMinLengthpublic static bool validateMinLength (TextBase $control, int $length) Min-length validator: has control's value minimal length?
|
|||||||||||||||
line 241 validateRangepublic static bool validateRange (TextBase $control, array $range) Rangle validator: is a control's value number in specified range?
|
|||||||||||||||
line 204 validateRegexppublic static bool validateRegexp (TextBase $control, string $regexp) Regular expression validator: matches control's value regular expression?
|
|||||||||||||||
line 191 validateUrlpublic static bool validateUrl (TextBase $control) URL validator: is control's value valid URL?
|