Driver.php 1.22 KB
Newer Older
1 2 3 4
<?php

namespace Doctrine\DBAL\Driver\DrizzlePDOMySql;

Steve Müller's avatar
Steve Müller committed
5 6
use Doctrine\DBAL\Platforms\DrizzlePlatform;
use Doctrine\DBAL\Schema\DrizzleSchemaManager;
7

8 9 10
/**
 * Drizzle driver using PDO MySql.
 */
11
class Driver extends \Doctrine\DBAL\Driver\PDOMySql\Driver
12 13
{
    /**
14
     * {@inheritdoc}
15
     */
16
    public function connect(array $params, $username = null, $password = null, array $driverOptions = [])
17
    {
18
        return new Connection(
19
            $this->constructPdoDsn($params),
20 21 22 23 24 25
            $username,
            $password,
            $driverOptions
        );
    }

26 27 28 29 30 31 32 33
    /**
     * {@inheritdoc}
     */
    public function createDatabasePlatformForVersion($version)
    {
        return $this->getDatabasePlatform();
    }

34 35
    /**
     * {@inheritdoc}
36 37
     *
     * @return DrizzlePlatform
38
     */
39 40
    public function getDatabasePlatform()
    {
Steve Müller's avatar
Steve Müller committed
41
        return new DrizzlePlatform();
42 43
    }

44 45
    /**
     * {@inheritdoc}
46 47
     *
     * @return DrizzleSchemaManager
48
     */
49 50
    public function getSchemaManager(\Doctrine\DBAL\Connection $conn)
    {
Steve Müller's avatar
Steve Müller committed
51
        return new DrizzleSchemaManager($conn);
52 53
    }

54 55
    /**
     * {@inheritdoc}
56 57
     *
     * @deprecated
58
     */
59 60 61 62
    public function getName()
    {
        return 'drizzle_pdo_mysql';
    }
Benjamin Eberlei's avatar
Benjamin Eberlei committed
63
}