Trait TypeMapTrait
Trait TypeMapTrait
Property Summary
-
$_typeMap protected
Cake\Database\TypeMap
Method Summary
-
defaultTypes() public deprecated
Allows setting default types when chaining query
-
getDefaultTypes() public
Gets default types of current type map.
-
getTypeMap() public
Returns the existing type map.
-
setDefaultTypes() public
Allows setting default types when chaining query.
-
setTypeMap() public
Creates a new TypeMap if $typeMap is an array, otherwise exchanges it for the given one.
-
typeMap() public deprecated
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
getDefaultTypes() ¶ public
getDefaultTypes(): array
Gets default types of current type map.
Returns
array
getTypeMap() ¶ public
getTypeMap(): Cake\Database\TypeMap
Returns the existing type map.
Returns
Cake\Database\TypeMap
setDefaultTypes() ¶ public
setDefaultTypes(array $types): $this
Allows setting default types when chaining query.
Parameters
-
array
$types The array of types to set.
Returns
$this
setTypeMap() ¶ public
setTypeMap(arrayCake\Database\TypeMap $typeMap): $this
Creates a new TypeMap if $typeMap is an array, otherwise exchanges it for the given one.
Parameters
-
arrayCake\Database\TypeMap
$typeMap Creates a TypeMap if array, otherwise sets the given TypeMap
Returns
$this
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