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

namespace DoctrineDBALTypes;

use 
DoctrineDBALParameterType;
use 
DoctrineDBALPlatformsAbstractPlatform;

/**
 * Type that maps a database SMALLINT to a PHP integer.
 */
class SmallIntType extends Type implements PhpIntegerMappingType
{
    
/**
     * {@inheritdoc}
     */
    
public function getName()
    {
        return 
Types::SMALLINT;
    }

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

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

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