Doctrine


Doctrine\DBAL\Types\DecimalType
/Doctrine/DBAL/Types/DecimalType.php at line 31

Class DecimalType

Class:DecimalType - Superclass: Type
Type
⌊ DecimalType

public class DecimalType
extends Type

Type that maps an SQL DECIMAL to a PHP double.

Since:
2.0
Author:
Roman Borschel

Fields inherited from Doctrine\DBAL\Types\Type
BIGINT, BOOLEAN, DATE, DATETIME, DECIMAL, INTEGER, OBJECT, SMALLINT, STRING, TARRAY, TEXT, TIME
Method Summary
mixed

convertToPHPValue(mixed value, AbstractPlatform platform)

Converts a value from its database representation to its PHP representation of this type.

string

getName()

Gets the name of this type.

void

getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform)

Gets the SQL declaration snippet for a field of this type.

Methods inherited from Doctrine\DBAL\Types\Type
addType, convertToDatabaseValue, convertToPHPValue, getBindingType, getDefaultLength, getName, getSqlDeclaration, getType, getTypesMap, hasType, overrideType

Method Detail

/Doctrine/DBAL/Types/DecimalType.php at line 43

convertToPHPValue

public mixed convertToPHPValue(mixed value, AbstractPlatform platform)

Converts a value from its database representation to its PHP representation of this type.

Parameters:
value - The value to convert.
platform - The currently used database platform.
Returns:
The PHP representation of the value.

/Doctrine/DBAL/Types/DecimalType.php at line 33

getName

public string getName()

Gets the name of this type.

Todo:
Needed?

/Doctrine/DBAL/Types/DecimalType.php at line 38

getSqlDeclaration

public void getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform)

Gets the SQL declaration snippet for a field of this type.

Parameters:
fieldDeclaration - The field declaration.
platform - The currently used database platform.

Doctrine