SmallText extends Type implements TypeInterface
The SmallText complex data type.
Tags
Interfaces, Classes and Traits
- TypeInterface
- The interface for all complex data types.
Table of Contents
- MAX_SIZE = 255
- The absolute maximum size of the value for the this String.
- $helper : string
- The error message for the string type when validation fails.
- $password : bool
- Simple boolean to determine if the string is a password or not.
- $size : int
- The size of the value for the this String.
- $validationRule : string
- The validation rule for the string type.
- $value : string
- The value of the string.
- __construct() : mixed
- Constructor.
- __toString() : string
- Used to convert the object to a printable string.
- checkIsPassword() : bool
- Checks to see if the string is a password or not.
- 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.
- isPassword() : mixed
- Define the string as a password (making it required by validation rule).
- isRequired() : mixed
- Sets up an appropriate validation rule for a required field.
- setHelper() : mixed
- Set the validation helper text.
- setRule() : mixed
- Setter to override the default validation rule.
- setSize() : mixed
- Used to set the allowable size of the String in the database field.
- setValue() : mixed
- Setter for the value.
Constants
MAX_SIZE
The absolute maximum size of the value for the this String.
public
int
MAX_SIZE
= 255
Tags
Properties
$helper
The error message for the string type when validation fails.
protected
string
$helper
= 'Not a valid smalltext value!'
Tags
$password
Simple boolean to determine if the string is a password or not.
private
bool
$password
= false
Tags
$size
The size of the value for the this String.
private
int
$size
= 255
Tags
$validationRule
The validation rule for the string type.
private
string
$validationRule
Tags
$value
The value of the string.
private
string
$value
Tags
Methods
__construct()
Constructor.
public
__construct([string $val = '' ]) : mixed
Parameters
- $val : string = ''
Tags
Return values
mixed —__toString()
Used to convert the object to a printable string.
public
__toString() : string
Tags
Return values
string —checkIsPassword()
Checks to see if the string is a password or not.
public
checkIsPassword() : bool
Tags
Return values
bool —getHelper()
Used to get the validation helper message string.
public
getHelper() : string
Tags
Return values
string —getRule()
Get the validation rule.
public
getRule() : string
Tags
Return values
string —getSize()
Get the allowable size of the Double in the database field.
public
getSize() : int
Tags
Return values
int —getValue()
Getter for the value.
public
getValue() : string
Tags
Return values
string —isPassword()
Define the string as a password (making it required by validation rule).
public
isPassword([bool $pass = true ]) : mixed
Parameters
- $pass : bool = true
Tags
Return values
mixed —isRequired()
Sets up an appropriate validation rule for a required field.
public
isRequired([bool $req = true ]) : mixed
Parameters
- $req : bool = true
Tags
Return values
mixed —setHelper()
Set the validation helper text.
public
setHelper(string $helper) : mixed
Parameters
- $helper : string
Tags
Return values
mixed —setRule()
Setter to override the default validation rule.
public
setRule(string $rule) : mixed
Parameters
- $rule : string
Tags
Return values
mixed —setSize()
Used to set the allowable size of the String in the database field.
public
setSize(int $size) : mixed
Parameters
- $size : int
Tags
Return values
mixed —setValue()
Setter for the value.
public
setValue(string $val) : mixed
Parameters
- $val : string