| 148 |
lars |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
namespace Doctrine\DBAL;
|
|
|
4 |
|
|
|
5 |
use Doctrine\DBAL\Driver\API\ExceptionConverter;
|
|
|
6 |
use Doctrine\DBAL\Driver\Connection as DriverConnection;
|
|
|
7 |
use Doctrine\DBAL\Driver\Exception;
|
|
|
8 |
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
|
|
9 |
use Doctrine\DBAL\Schema\AbstractSchemaManager;
|
|
|
10 |
|
|
|
11 |
/**
|
|
|
12 |
* Driver interface.
|
|
|
13 |
* Interface that all DBAL drivers must implement.
|
|
|
14 |
*/
|
|
|
15 |
interface Driver
|
|
|
16 |
{
|
|
|
17 |
/**
|
|
|
18 |
* Attempts to create a connection with the database.
|
|
|
19 |
*
|
|
|
20 |
* @param mixed[] $params All connection parameters.
|
|
|
21 |
*
|
|
|
22 |
* @return DriverConnection The database connection.
|
|
|
23 |
*
|
|
|
24 |
* @throws Exception
|
|
|
25 |
*/
|
|
|
26 |
public function connect(array $params);
|
|
|
27 |
|
|
|
28 |
/**
|
|
|
29 |
* Gets the DatabasePlatform instance that provides all the metadata about
|
|
|
30 |
* the platform this driver connects to.
|
|
|
31 |
*
|
|
|
32 |
* @return AbstractPlatform The database platform.
|
|
|
33 |
*/
|
|
|
34 |
public function getDatabasePlatform();
|
|
|
35 |
|
|
|
36 |
/**
|
|
|
37 |
* Gets the SchemaManager that can be used to inspect and change the underlying
|
|
|
38 |
* database schema of the platform this driver connects to.
|
|
|
39 |
*
|
|
|
40 |
* @deprecated Use {@link AbstractPlatform::createSchemaManager()} instead.
|
|
|
41 |
*
|
|
|
42 |
* @return AbstractSchemaManager
|
|
|
43 |
*/
|
|
|
44 |
public function getSchemaManager(Connection $conn, AbstractPlatform $platform);
|
|
|
45 |
|
|
|
46 |
/**
|
|
|
47 |
* Gets the ExceptionConverter that can be used to convert driver-level exceptions into DBAL exceptions.
|
|
|
48 |
*/
|
|
|
49 |
public function getExceptionConverter(): ExceptionConverter;
|
|
|
50 |
}
|