Integer extends Type implements TypeInterface
The Integer complex data type.
Tags
Interfaces, Classes and Traits
- TypeInterface
- The interface for all complex data types.
Table of Contents
- MAX_SIZE = 11
- The absolute maximum size of the value for the this Integer.
- $helper : string
- The error message for the Integer type when validation fails.
- $size : int
- The size of the value for the Integer.
- $validationRule : string
- The validation rule (reg-ex) applied to Integer values.
- $value : int
- The value of the Integer.
- __construct() : mixed
- Constructor.
- __toString() : string
- Used to convert the object to a printable string.
- getHelper() : string
- Used to get the validation helper message string.
- getRule() : string
- Get the validation rule.
- getSize() : int
- Get the allowable size of the Integer in the database field.
- getValue() : int
- Getter for the Integer value.
- setHelper() : mixed
- Set the validation helper text.
- setSize() : mixed
- Used to set the allowable size of the Integer in the database field.
- setValue() : mixed
- Setter for the Integer value.
- zeroPad() : mixed
- Returns the integer value provided but padded with zeros to MAX_SIZE.
Constants
MAX_SIZE
The absolute maximum size of the value for the this Integer.
public
int
MAX_SIZE
= 11
Tags
Properties
$helper
The error message for the Integer type when validation fails.
protected
string
$helper
= 'Not a valid integer value!'
Tags
$size
The size of the value for the Integer.
private
int
$size
= 11
Tags
$validationRule
The validation rule (reg-ex) applied to Integer values.
private
string
$validationRule
Tags
$value
The value of the Integer.
private
int
$value
Tags
Methods
__construct()
Constructor.
public
__construct(int $val) : mixed
Parameters
- $val : int
Tags
Return values
mixed —__toString()
Used to convert the object to a printable string.
public
__toString() : string
Tags
Return values
string —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 Integer in the database field.
public
getSize() : int
Tags
Return values
int —getValue()
Getter for the Integer value.
public
getValue() : int
Tags
Return values
int —setHelper()
Set the validation helper text.
public
setHelper(string $helper) : mixed
Parameters
- $helper : string
Tags
Return values
mixed —setSize()
Used to set the allowable size of the Integer in the database field.
public
setSize(int $size) : mixed
Parameters
- $size : int
Tags
Return values
mixed —setValue()
Setter for the Integer value.
public
setValue(int $val) : mixed
Parameters
- $val : int
Tags
Return values
mixed —zeroPad()
Returns the integer value provided but padded with zeros to MAX_SIZE.
public
static zeroPad(int $val) : mixed
Parameters
- $val : int