1<?php
2
3namespace Doctrine\DBAL\Types;
4
5use Doctrine\DBAL\Platforms\AbstractPlatform;
6
7/**
8 * Represents a GUID/UUID datatype (both are actually synonyms) in the database.
9 */
10class GuidType extends StringType
11{
12    /**
13     * {@inheritdoc}
14     */
15    public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
16    {
17        return $platform->getGuidTypeDeclarationSQL($fieldDeclaration);
18    }
19
20    /**
21     * {@inheritdoc}
22     */
23    public function getName()
24    {
25        return Type::GUID;
26    }
27
28    /**
29     * {@inheritdoc}
30     */
31    public function requiresSQLCommentHint(AbstractPlatform $platform)
32    {
33        return ! $platform->hasNativeGuidType();
34    }
35}
36