. */ namespace Doctrine\DBAL\Types; use Doctrine\DBAL\Platforms\AbstractPlatform; /** * Type that maps an SQL INT to a PHP integer. * * @author Roman Borschel * @since 2.0 */ class IntegerType extends Type { public function getName() { return Type::INTEGER; } public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) { return $platform->getIntegerTypeDeclarationSQL($fieldDeclaration); } public function convertToPHPValue($value, AbstractPlatform $platform) { return (null === $value) ? null : (int) $value; } public function getBindingType() { return \PDO::PARAM_INT; } }