map()
map(string|array<mixed,string>|array<mixed,\Cake\Database\Type>|null $type = null, string|\Cake\Database\Type|null $className = null) : array|string|null
Registers a new type identifier and maps it to a fully namespaced classname,
If called with no arguments it will return current types map array
If $className is omitted it will return mapped class for $type
Deprecated 3.6.2:
- The usage of $type as string[]|\Cake\Database\Type[] is deprecated.
Use Type::setMap() with string[] instead.
- Passing $className as \Cake\Database\Type instance is deprecated, use
class name string only.
- Using this method as getter is deprecated. Use Type::getMap() instead.
Parameters
string|array<mixed,string>|array<mixed,\Cake\Database\Type>|null |
$type |
If string name of type to map, if array list of arrays to be mapped |
string|\Cake\Database\Type|null |
$className |
The classname or object instance of it to register. |
Returns
array|string|null
— If $type is null then array with current map, if $className is null string
configured class name for give $type, null otherwise