Driver.php 1.14 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 36
    /**
     * {@inheritdoc}
     */
37 38
    public function getDatabasePlatform()
    {
Steve Müller's avatar
Steve Müller committed
39
        return new DrizzlePlatform();
40 41
    }

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

50 51
    /**
     * {@inheritdoc}
52 53
     *
     * @deprecated
54
     */
55 56 57 58
    public function getName()
    {
        return 'drizzle_pdo_mysql';
    }
Benjamin Eberlei's avatar
Benjamin Eberlei committed
59
}