Factory for building database type classes.
arrayCake\Database\TypeInterface>Contains a map of type object instances to be reused if needed.
array<string, string>List of supported database types. A human readable identifier is used as key and a complete namespaced class name as value representing the class that will do actual type conversions.
Returns a Type object capable of converting a type identified by name.
Returns an arrays with all the mapped type objects, indexed by name.
Clears out all created instances and mapped types classes, useful for testing
Get mapped class name for given type or map array.
Registers a new type identifier and maps it to a fully namespaced classname.
Set TypeInterface instance capable of converting a type identified by $name
Set type to classname mapping.
build(string $name): Cake\Database\TypeInterface
Returns a Type object capable of converting a type identified by name.
string $name type identifier
Cake\Database\TypeInterfaceInvalidArgumentExceptionbuildAll(): arrayCake\Database\TypeInterface>
Returns an arrays with all the mapped type objects, indexed by name.
arrayCake\Database\TypeInterface>clear(): void
Clears out all created instances and mapped types classes, useful for testing
voidgetMap(string|null $type = null): array<string>|string|null
Get mapped class name for given type or map array.
string|null $type optional Type name to get mapped class for or null to get map array.
array<string>|string|nullmap(string $type, string $className): void
Registers a new type identifier and maps it to a fully namespaced classname.
string $type Name of type to map.
string $className The classname to register.
voidset(string $name, Cake\Database\TypeInterface $instance): void
Set TypeInterface instance capable of converting a type identified by $name
string $name The type identifier you want to set.
Cake\Database\TypeInterface $instance The type instance you want to set.
voidsetMap(array<string> $map): void
Set type to classname mapping.
array<string> $map List of types to be mapped.
voidContains a map of type object instances to be reused if needed.
arrayCake\Database\TypeInterface>List of supported database types. A human readable identifier is used as key and a complete namespaced class name as value representing the class that will do actual type conversions.
array<string, string>
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/class-Cake.Database.TypeFactory.html