Boolean
extends Type
in package
implements
TypeInterface
The Boolean complex data type.
Tags
Table of Contents
Interfaces
- TypeInterface
- The interface for all complex data types.
Properties
- $helper : string
- The error message returned for invalid values.
- $booleanValue : bool
- The value of the Boolean.
- $value : int
- The binary (1/0) value of the Boolean. This is the value stored in the database.
Methods
- __construct() : mixed
- Constructor.
- __toString() : string
- Used to convert the object to a printable string.
- getBooleanValue() : bool
- Used to get the boolean value of the Boolean.
- getHelper() : string
- Used to get the validation helper message string.
- getValue() : int
- Used to get the binary (1/0) value of the Boolean. This is the value stored in the database.
- setHelper() : void
- Set the validation helper text.
- setValue() : void
- Used to set the Boolean value.
Properties
$helper
The error message returned for invalid values.
protected
string
$helper
= 'Not a valid Boolean value!'
Tags
$booleanValue
The value of the Boolean.
private
bool
$booleanValue
Tags
$value
The binary (1/0) value of the Boolean. This is the value stored in the database.
private
int
$value
Tags
Methods
__construct()
Constructor.
public
__construct([bool $val = true ]) : mixed
Parameters
- $val : bool = true
Tags
__toString()
Used to convert the object to a printable string.
public
__toString() : string
Tags
Return values
stringgetBooleanValue()
Used to get the boolean value of the Boolean.
public
getBooleanValue() : bool
Tags
Return values
boolgetHelper()
Used to get the validation helper message string.
public
getHelper() : string
Tags
Return values
stringgetValue()
Used to get the binary (1/0) value of the Boolean. This is the value stored in the database.
public
getValue() : int
Tags
Return values
intsetHelper()
Set the validation helper text.
public
setHelper(string $helper) : void
Parameters
- $helper : string
Tags
setValue()
Used to set the Boolean value.
public
setValue(mixed $val) : void
Parameters
- $val : mixed
-
Will accept a boolean true/false or integer 1/0.