1<?php
2
3namespace Doctrine\DBAL\Types;
4
5use Doctrine\DBAL\Platforms\AbstractPlatform;
6
7/**
8 * Type that maps an SQL VARCHAR to a PHP string.
9 */
10class StringType extends Type
11{
12    /**
13     * {@inheritdoc}
14     */
15    public function getSQLDeclaration(array $column, AbstractPlatform $platform)
16    {
17        return $platform->getVarcharTypeDeclarationSQL($column);
18    }
19
20    /**
21     * {@inheritdoc}
22     */
23    public function getDefaultLength(AbstractPlatform $platform)
24    {
25        return $platform->getVarcharDefaultLength();
26    }
27
28    /**
29     * {@inheritdoc}
30     */
31    public function getName()
32    {
33        return Types::STRING;
34    }
35}
36