Integer
        
        extends Type
    
    
            
            in package
            
        
    
            
            implements
                            TypeInterface                    
    
    
The Integer complex data type.
Tags
Table of Contents
Interfaces
- TypeInterface
- The interface for all complex data types.
Constants
- MAX_SIZE = 11
- The absolute maximum size of the value for the this Integer.
Properties
- $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.
Methods
- __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() : void
- Set the validation helper text.
- setSize() : void
- Used to set the allowable size of the Integer in the database field.
- setValue() : void
- Setter for the Integer value.
- zeroPad() : string
- 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 = 0 ]) : mixed
    Parameters
- $val : int = 0
Tags
__toString()
Used to convert the object to a printable string.
    public
                    __toString() : string
    Tags
Return values
stringgetHelper()
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 Integer in the database field.
    public
                    getSize() : int
    Tags
Return values
intgetValue()
Getter for the Integer value.
    public
                    getValue() : int
    Tags
Return values
intsetHelper()
Set the validation helper text.
    public
                    setHelper(string $helper) : void
    Parameters
- $helper : string
Tags
setSize()
Used to set the allowable size of the Integer in the database field.
    public
                    setSize(int $size) : void
    Parameters
- $size : int
Tags
setValue()
Setter for the Integer value.
    public
                    setValue(mixed $val) : void
    Parameters
- $val : mixed
Tags
zeroPad()
Returns the integer value provided but padded with zeros to MAX_SIZE.
    public
            static        zeroPad(int $val) : string
    Parameters
- $val : int