UuidType
extends StringType
in package
Provides behavior for the UUID type
Table of Contents
Properties
- $_name : string|null
- Identifier name for this type
Methods
- __construct() : mixed
- Constructor
- getBaseType() : string|null
- Returns the base type name that this class is inheriting.
- getName() : string|null
- Returns type identifier name for this object.
- marshal() : string|null
- Marshals request data into a PHP string
- newId() : string
- Generate a new UUID
- requiresToPhpCast() : bool
- Returns whether the cast to PHP is required to be invoked, since it is not a identity function.
- toDatabase() : string|null
- Casts given value from a PHP type to one acceptable by database
- toPHP() : string|null
- Convert string values to PHP strings.
- toStatement() : int
- Get the correct PDO binding type for string data.
Properties
$_name
Identifier name for this type
protected
string|null
$_name
Methods
__construct()
Constructor
public
__construct([string|null $name = null ]) : mixed
Parameters
- $name : string|null = null
-
The name identifying this type
getBaseType()
Returns the base type name that this class is inheriting.
public
getBaseType() : string|null
Tags
Return values
string|null —The base type name that this class is inheriting.
getName()
Returns type identifier name for this object.
public
getName() : string|null
Tags
Return values
string|null —The type identifier name for this object.
marshal()
Marshals request data into a PHP string
public
marshal(mixed $value) : string|null
Parameters
- $value : mixed
-
The value to convert.
Return values
string|null —Converted value.
newId()
Generate a new UUID
public
newId() : string
Return values
string —A new primary key value.
requiresToPhpCast()
Returns whether the cast to PHP is required to be invoked, since it is not a identity function.
public
requiresToPhpCast() : bool
Return values
bool —False as database results are returned already as strings
toDatabase()
Casts given value from a PHP type to one acceptable by database
public
toDatabase(mixed $value, DriverInterface $driver) : string|null
Parameters
- $value : mixed
-
value to be converted to database equivalent
- $driver : DriverInterface
-
object from which database preferences and configuration will be extracted
Return values
string|nulltoPHP()
Convert string values to PHP strings.
public
toPHP(mixed $value, DriverInterface $driver) : string|null
Parameters
- $value : mixed
-
The value to convert.
- $driver : DriverInterface
-
The driver instance to convert with.
Return values
string|nulltoStatement()
Get the correct PDO binding type for string data.
public
toStatement(mixed $value, DriverInterface $driver) : int
Parameters
- $value : mixed
-
The value being bound.
- $driver : DriverInterface
-
The driver.