Вход Регистрация
Файл: vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/IntegerType.php
Строк: 39
<?php

namespace DoctrineDBALTypes;

use 
DoctrineDBALParameterType;
use 
DoctrineDBALPlatformsAbstractPlatform;

/**
 * Type that maps an SQL INT to a PHP integer.
 */
class IntegerType extends Type implements PhpIntegerMappingType
{
    
/**
     * {@inheritdoc}
     */
    
public function getName()
    {
        return 
Types::INTEGER;
    }

    
/**
     * {@inheritdoc}
     */
    
public function getSQLDeclaration(array $columnAbstractPlatform $platform)
    {
        return 
$platform->getIntegerTypeDeclarationSQL($column);
    }

    
/**
     * {@inheritdoc}
     */
    
public function convertToPHPValue($valueAbstractPlatform $platform)
    {
        return 
$value === null null : (int) $value;
    }

    
/**
     * {@inheritdoc}
     */
    
public function getBindingType()
    {
        return 
ParameterType::INTEGER;
    }
}
Онлайн: 0
Реклама