spoof
|
Public Member Functions | |
__construct ($value, $type) | |
getType () | |
getValue () |
Data Fields | |
const | TYPE_NULL = -1 |
const | TYPE_STRING = 1 |
const | TYPE_INTEGER = 2 |
const | TYPE_FLOAT = 3 |
const | TYPE_BOOLEAN = 4 |
const | TYPE_BINARY = 5 |
const | TYPE_ARRAY = 6 |
const | TYPE_COLUMN = 7 |
const | TYPE_PREPARED = 8 |
const | TYPE_FUNCTION = 9 |
Protected Attributes | |
$type | |
$value |
A database value class implementation
__construct | ( | $value, | |
$type | |||
) |
Constructor creates an instance with specified type and value. Type must match the actual type of the value parameter. This object will not explicitly cast the type.
$value | mixed value of the object |
$type | int type of the value |
DBValueInvalidException | when specified type and actual type do not match |
DBValueTypeUnknownException | when invalid type is supplied |
NOTE use of gettype is not recommended in PHP to determine types. We use it only to provide information in exceptions.
NOTE this is only valid for PHP >= 6
Implements IValue.
getType | ( | ) |
getValue | ( | ) |
|
protected |
Protected value type property
|
protected |
Protected value property
const TYPE_ARRAY = 6 |
Database value type array
const TYPE_BINARY = 5 |
Database value type binary
const TYPE_BOOLEAN = 4 |
Database value type boolean
const TYPE_COLUMN = 7 |
Database value type column
const TYPE_FLOAT = 3 |
Database value type float
const TYPE_FUNCTION = 9 |
Database value type function
const TYPE_INTEGER = 2 |
Database value type integer
const TYPE_NULL = -1 |
Database value type null
const TYPE_PREPARED = 8 |
Database value type prepared
const TYPE_STRING = 1 |
Database value type string