abstract class TextBase extends BaseControl

Implements the basic functionality common to text input controls.

Properties

protected string $emptyValue
protected mixed $rawValue

Methods

void
setValue($value)

Sets control's value.

mixed
getValue()

Returns control's value.

setEmptyValue($value)

Sets the special value which is treated as empty string.

string
getEmptyValue()

Returns the special value which is treated as empty string.

setMaxLength($length)

Sets the maximum number of allowed characters.

addFilter($filter)

Appends input string filter callback.

Html|string
getControl()

Generates control's HTML element.

addRule($validator, $message = NULL, $arg = NULL)

Adds a validation rule.

Details

at line 33
void setValue($value)

internal  
 

Sets control's value.

Parameters

$value

Return Value

void

at line 49
mixed getValue()

Returns control's value.

Return Value

mixed

at line 60
TextBase setEmptyValue($value)

Sets the special value which is treated as empty string.

Parameters

$value

Return Value

TextBase

at line 71
string getEmptyValue()

Returns the special value which is treated as empty string.

Return Value

string

at line 82
TextBase setMaxLength($length)

Sets the maximum number of allowed characters.

Parameters

$length

Return Value

TextBase

at line 94
TextBase addFilter($filter)

Appends input string filter callback.

Parameters

$filter

Return Value

TextBase

at line 101
Html|string getControl()

Generates control's HTML element.

Return Value

Html|string

at line 114
BaseControl addRule($validator, $message = NULL, $arg = NULL)

Adds a validation rule.

Parameters

$validator
$message
$arg

Return Value

BaseControl