toDatabase()
toDatabase(mixed $value, \Cake\Database\Driver $driver) : mixed
Casts given value from a PHP type to one acceptable by a database.
Parameters
mixed | $value | Value to be converted to a database equivalent. |
\Cake\Database\Driver | $driver | Object from which database preferences and configuration will be extracted. |
Returns
mixed —Given PHP type casted to one acceptable by a database.