Trait TypeMapTrait
Namespace: Cake\Database
Property Summary
-
$_typeMap protected
Cake\Database\TypeMap
Method Summary
-
defaultTypes() public
Allows setting default types when chaining query
-
typeMap() public
Creates a new TypeMap if $typeMap is an array, otherwise returns the existing type map or exchanges it for the given one.
Method Detail
defaultTypes() ¶ public
defaultTypes(array|null $types = null): $this|array
Allows setting default types when chaining query
Parameters
-
array|null
$types optional The array of types to set.
Returns
$this|array
typeMap() ¶ public
typeMap(arrayCake\Database\TypeMap|null $typeMap = null): $thisCake\Database\TypeMap
Creates a new TypeMap if $typeMap is an array, otherwise returns the existing type map or exchanges it for the given one.
Parameters
-
arrayCake\Database\TypeMap|null
$typeMap optional Creates a TypeMap if array, otherwise sets the given TypeMap
Returns
$thisCake\Database\TypeMap