Class NTextBase
Implements the basic functionality common to text input controls.
NObject | --NComponent | --NFormControl | --NTextBase
Direct Known Sub-classes:
Public Method Summary | |
---|---|
NTextBase |
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.
|
string |
getValue
()
Returns control's value.
|
void |
notifyRule
(NRule $rule)
|
NTextBase |
setEmptyValue
(string $value)
Sets the special value which is treated as empty string.
|
NTextBase |
setValue
(string $value)
Sets control's value.
|
static bool |
validateEmail
(NTextBase $control)
Email validator: is control's value valid email address?
|
static bool |
validateFloat
(NTextBase $control)
Float validator: is a control's value float number?
|
static bool |
validateInteger
(NTextBase $control)
Integer validator: is a control's value decimal number?
|
static bool |
validateLength
(NTextBase $control, array $range)
Length validator: is control's value length in range?
|
static bool |
validateMaxLength
(NTextBase $control, int $length)
Max-length validator: is control's value length in limit?
|
static bool |
validateMinLength
(NTextBase $control, int $length)
Min-length validator: has control's value minimal length?
|
static bool |
validateRange
(NTextBase $control, array $range)
Rangle validator: is a control's value number in specified range?
|
static bool |
validateRegexp
(NTextBase $control, string $regexp)
Regular expression validator: matches control's value regular expression?
|
static bool |
validateUrl
(NTextBase $control)
URL validator: is control's value valid URL?
|
Methods Inherited From NComponent |
---|
__construct(), attached(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), setParent(), unmonitor(), validateParent(), __clone(), __wakeup() |
Methods Inherited From NObject |
---|
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset() |
Variable Summary | ||||
---|---|---|---|---|
protected string | $emptyValue | '' |
line 38 |
|
protected array | $filters | array() |
line 41 |
Method Details | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 102 addFilterpublic NTextBase addFilter (callback $filter) Appends input string filter callback.
|
|||||||||||||||
line 252 filterFloatpublic static string filterFloat (string $s) Float string cleanup.
|
|||||||||||||||
line 90 getEmptyValuepublic string getEmptyValue () Returns the special value which is treated as empty string.
|
|||||||||||||||
line 62 getValuepublic string getValue () Returns control's value.
|
|||||||||||||||
line 115 notifyRulepublic void notifyRule (NRule $rule) Overridden in child classes as:
|
|||||||||||||||
line 78 setEmptyValuepublic NTextBase setEmptyValue (string $value) Sets the special value which is treated as empty string.
|
|||||||||||||||
line 50 setValuepublic NTextBase setValue (string $value) Sets control's value.
|
|||||||||||||||
line 174 validateEmailpublic static bool validateEmail (NTextBase $control) Email validator: is control's value valid email address?
|
|||||||||||||||
line 227 validateFloatpublic static bool validateFloat (NTextBase $control) Float validator: is a control's value float number?
|
|||||||||||||||
line 215 validateIntegerpublic static bool validateInteger (NTextBase $control) Integer validator: is a control's value decimal number?
|
|||||||||||||||
line 158 validateLengthpublic static bool validateLength (NTextBase $control, array $range) Length validator: is control's value length in range?
|
|||||||||||||||
line 145 validateMaxLengthpublic static bool validateMaxLength (NTextBase $control, int $length) Max-length validator: is control's value length in limit?
|
|||||||||||||||
line 132 validateMinLengthpublic static bool validateMinLength (NTextBase $control, int $length) Min-length validator: has control's value minimal length?
|
|||||||||||||||
line 240 validateRangepublic static bool validateRange (NTextBase $control, array $range) Rangle validator: is a control's value number in specified range?
|
|||||||||||||||
line 203 validateRegexppublic static bool validateRegexp (NTextBase $control, string $regexp) Regular expression validator: matches control's value regular expression?
|
|||||||||||||||
line 190 validateUrlpublic static bool validateUrl (NTextBase $control) URL validator: is control's value valid URL?
|