Summary
- File
- Package hierarchy DBAL\Types
- Class hierarchy \Type \DecimalType
- See also https://www.doctrine-project.org
Type that maps an SQL DECIMAL to a PHP double.
A Type object is obtained by calling the static \getType() method.
Type that maps an SQL DECIMAL to a PHP double.
A Type object is obtained by calling the static \getType() method.
convertToDatabaseValue(mixed $value, \AbstractPlatform $platform) : mixed
Converts a value from its PHP representation to its database representation of this type.
mixed | $value | The value to convert. |
\AbstractPlatform | $platform | The currently used database platform. |
The database representation of the value.
None found |
convertToPHPValue(mixed $value, \AbstractPlatform $platform) : mixed
Converts a value from its database representation to its PHP representation of this type.
mixed | $value | The value to convert. |
\AbstractPlatform | $platform | The currently used database platform. |
The PHP representation of the value.
None found |
getDefaultLength(\AbstractPlatform $platform)
Gets the default length of this type.
\AbstractPlatform | $platform |
todo |
Needed? |
getSqlDeclaration(array $fieldDeclaration, \AbstractPlatform $platform)
Gets the SQL declaration snippet for a field of this type.
array | $fieldDeclaration | The field declaration. |
\AbstractPlatform | $platform | The currently used database platform. |
None found |
getName() : string
Gets the name of this type.
None found |
getTypeCode() : integer
Gets the type code of this type.
None found |
getType(string $name) : \Doctrine\DBAL\Types\Type
Factory method to create type instances.
Type instances are implemented as flyweights.
string | $name | The name of the type (as returned by getName()). |
static |
addType(string $name, string $className)
Adds a custom type to the type map.
string | $name | Name of the type. This should correspond to what getName() returns. |
string | $className | The class name of the custom type. |
static |
hasType(string $name) : boolean
Checks if exists support for a type.
string | $name | Name of the type |
TRUE if type is supported; FALSE otherwise
static |
overrideType(string $name, string $className)
Overrides an already defined type to use a different implementation.
string | $name | |
string | $className |
static |
__construct()
None found |