Provides behavior for the UUID type
string|null
Identifier name for this type
Returns whether the cast to PHP is required to be invoked, since it is not a identity function.
__construct(?string $name)
Constructor
string|null
$name optional The name identifying this type
getBaseType()
Returns the base type name that this class is inheriting.
This is useful when extending base type for adding extra functionality, but still want the rest of the framework to use the same assumptions it would do about the base type it inherits from.
string|null
The base type name that this class is inheriting.
getName()
Returns type identifier name for this object.
string|null
The type identifier name for this object.
marshal(mixed $value)
Marshals request data into a PHP string
mixed
$value The value to convert.
string|null
Converted value.
newId()
Generate a new UUID
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.
bool
False as database results are returned already as strings
toDatabase(mixed $value, \Cake\Database\DriverInterface $driver)
Casts given value from a PHP type to one acceptable by database
mixed
$value value to be converted to database equivalent
\Cake\Database\DriverInterface
$driver object from which database preferences and configuration will be extracted
string|null
toPHP(mixed $value, \Cake\Database\DriverInterface $driver)
Convert string values to PHP strings.
mixed
$value The value to convert.
\Cake\Database\DriverInterface
$driver The driver instance to convert with.
string|null
toStatement(mixed $value, \Cake\Database\DriverInterface $driver)
Get the correct PDO binding type for string data.
mixed
$value The value being bound.
\Cake\Database\DriverInterface
$driver The driver.
int
Identifier name for this type
string|null
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.1/class-Cake.Database.Type.UuidType.html