Boolean extends Type implements TypeInterface
The Boolean complex data type.
Tags
Interfaces, Classes and Traits
- TypeInterface
- The interface for all complex data types.
Table of Contents
- $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.
- __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() : mixed
- Set the validation helper text.
- setValue() : mixed
- 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
Return values
mixed —__toString()
Used to convert the object to a printable string.
public
__toString() : string
Tags
Return values
string —getBooleanValue()
Used to get the boolean value of the Boolean.
public
getBooleanValue() : bool
Tags
Return values
bool —getHelper()
Used to get the validation helper message string.
public
getHelper() : string
Tags
Return values
string —getValue()
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
int —setHelper()
Set the validation helper text.
public
setHelper(string $helper) : mixed
Parameters
- $helper : string
Tags
Return values
mixed —setValue()
Used to set the Boolean value.
public
setValue(mixed $val) : mixed
Parameters
- $val : mixed
-
Will accept a boolean true/false or integer 1/0.