Double
extends Type
in package
implements
TypeInterface
The Double complex data type.
Tags
Table of Contents
Interfaces
- TypeInterface
- The interface for all complex data types.
Constants
- MAX_SIZE = 13
- The absolute maximum size of the value for the this double.
Properties
- $helper : string
- The error message for the Double type when validation fails.
- $size : int
- The size of the value for the Double.
- $validationRule : string
- The validation rule (reg-ex) applied to Double values.
- $value : float
- The value of the Double.
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() : mixed
- Get the allowable size of the Double in the database field.
- getValue() : float
- Getter for the Double value.
- setHelper() : void
- Set the validation helper text.
- setSize() : void
- Used to set the allowable size of the Double in the database field.
- setValue() : void
- Setter for the Double value.
Constants
MAX_SIZE
The absolute maximum size of the value for the this double.
public
int
MAX_SIZE
= 13
Tags
Properties
$helper
The error message for the Double type when validation fails.
protected
string
$helper
= 'Not a valid double value!'
Tags
$size
The size of the value for the Double.
private
int
$size
= 13
Tags
$validationRule
The validation rule (reg-ex) applied to Double values.
private
string
$validationRule
Tags
$value
The value of the Double.
private
float
$value
Tags
Methods
__construct()
Constructor.
public
__construct([float $val = 0.0 ]) : mixed
Parameters
- $val : float = 0.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 Double in the database field.
public
getSize([bool $databaseDimension = false ]) : mixed
Parameters
- $databaseDimension : bool = false
Tags
getValue()
Getter for the Double value.
public
getValue() : float
Tags
Return values
floatsetHelper()
Set the validation helper text.
public
setHelper(string $helper) : void
Parameters
- $helper : string
Tags
setSize()
Used to set the allowable size of the Double in the database field.
public
setSize(int $size) : void
Parameters
- $size : int
Tags
setValue()
Setter for the Double value.
public
setValue(mixed $val) : void
Parameters
- $val : mixed