CakePHP TypeConverterTrait (trait)
Type converter trait
 Namespace: Cake\Database
 
 Method Summary
Method Detail
cast() public
cast(mixed $value, mixed $type)
Converts a give value to a suitable database value based on type and return relevant internal statement type
Parameters
-  mixed$value
- The value to cast 
-  \Cake\Database\TypeInterface|string|int$type optional
- The type name or type instance to use. 
Returns
arraylist containing converted value and internal type
matchTypes() public
matchTypes(array $columns, array $types)
Matches columns to corresponding types
Both types should either be numeric based or string key based at the same time.
Parameters
-  array$columns
- list or associative array of columns and parameters to be bound with types 
-  array$types
- list or associative array of types 
Returns
array
Comments
Post a Comment