Text
extends Type
in package
implements
TypeInterface
The Text complex data type.
Tags
Table of Contents
Interfaces
- TypeInterface
- The interface for all complex data types.
Constants
- MAX_SIZE = 65535
- The absolute maximum size of the value for the this Text.
Properties
- $helper : string
- The error message for the string type when validation fails.
- $size : int
- The size of the value for the this Text.
- $allowHTML : bool
- Used to determine if the Text object can support HTML content or not. Defaults to true, if set to false then HTML content should be filtered.
- $validationRule : string
- The validation rule for the Text type.
- $value : string
- The value of the Text object.
Methods
- __construct() : mixed
- Constructor.
- __toString() : string
- Used to convert the object to a printable string.
- getAllowHTML() : bool
- Get the $allowHTML value.
- getHelper() : string
- Used to get the validation helper message string.
- getRule() : string
- Get the validation rule.
- getSize() : int
- Get the allowable size of the Double in the database field.
- getValue() : string
- Getter for the value.
- setAllowHTML() : void
- Set the $allowHTML value.
- setHelper() : void
- Set the validation helper text.
- setRule() : void
- Setter to override the default validation rule.
- setSize() : void
- Used to set the allowable size of the Text in the database field.
- setValue() : void
- Setter for the value.
Constants
MAX_SIZE
The absolute maximum size of the value for the this Text.
public
int
MAX_SIZE
= 65535
Tags
Properties
$helper
The error message for the string type when validation fails.
protected
string
$helper
= 'Not a valid Text value!'
Tags
$size
The size of the value for the this Text.
protected
int
$size
= 65535
Tags
$allowHTML
Used to determine if the Text object can support HTML content or not. Defaults to true, if set to false then HTML content should be filtered.
private
bool
$allowHTML
= true
Tags
$validationRule
The validation rule for the Text type.
private
string
$validationRule
Tags
$value
The value of the Text object.
private
string
$value
Tags
Methods
__construct()
Constructor.
public
__construct([string $val = '' ]) : mixed
Parameters
- $val : string = ''
Tags
__toString()
Used to convert the object to a printable string.
public
__toString() : string
Tags
Return values
stringgetAllowHTML()
Get the $allowHTML value.
public
getAllowHTML() : bool
Tags
Return values
boolgetHelper()
Used to get the validation helper message string.
public
getHelper() : string
Tags
Return values
stringgetRule()
Get the validation rule.
public
getRule() : string
Tags
Return values
stringgetSize()
Get the allowable size of the Double in the database field.
public
getSize() : int
Tags
Return values
intgetValue()
Getter for the value.
public
getValue() : string
Tags
Return values
stringsetAllowHTML()
Set the $allowHTML value.
public
setAllowHTML(bool $allowHTML) : void
Parameters
- $allowHTML : bool
Tags
setHelper()
Set the validation helper text.
public
setHelper(string $helper) : void
Parameters
- $helper : string
Tags
setRule()
Setter to override the default validation rule.
public
setRule(string $rule) : void
Parameters
- $rule : string
Tags
setSize()
Used to set the allowable size of the Text in the database field.
public
setSize(int $size) : void
Parameters
- $size : int
Tags
setValue()
Setter for the value.
public
setValue(mixed $val) : void
Parameters
- $val : mixed