summaryrefslogtreecommitdiff
path: root/vendor/doctrine/dbal/src/Driver.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2024-08-13 23:45:21 +0200
committerpolo <ordipolo@gmx.fr>2024-08-13 23:45:21 +0200
commitbf6655a534a6775d30cafa67bd801276bda1d98d (patch)
treec6381e3f6c81c33eab72508f410b165ba05f7e9c /vendor/doctrine/dbal/src/Driver.php
parent94d67a4b51f8e62e7d518cce26a526ae1ec48278 (diff)
downloadAppliGestionPHP-bf6655a534a6775d30cafa67bd801276bda1d98d.zip
VERSION 0.2 doctrine ORM et entités
Diffstat (limited to 'vendor/doctrine/dbal/src/Driver.php')
-rw-r--r--vendor/doctrine/dbal/src/Driver.php48
1 files changed, 48 insertions, 0 deletions
diff --git a/vendor/doctrine/dbal/src/Driver.php b/vendor/doctrine/dbal/src/Driver.php
new file mode 100644
index 0000000..ffdc83c
--- /dev/null
+++ b/vendor/doctrine/dbal/src/Driver.php
@@ -0,0 +1,48 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\DBAL;
6
7use Doctrine\DBAL\Driver\API\ExceptionConverter;
8use Doctrine\DBAL\Driver\Connection as DriverConnection;
9use Doctrine\DBAL\Driver\Exception;
10use Doctrine\DBAL\Platforms\AbstractPlatform;
11use SensitiveParameter;
12
13/**
14 * Driver interface.
15 * Interface that all DBAL drivers must implement.
16 *
17 * @psalm-import-type Params from DriverManager
18 */
19interface Driver
20{
21 /**
22 * Attempts to create a connection with the database.
23 *
24 * @param array<string, mixed> $params All connection parameters.
25 * @psalm-param Params $params All connection parameters.
26 *
27 * @return DriverConnection The database connection.
28 *
29 * @throws Exception
30 */
31 public function connect(
32 #[SensitiveParameter]
33 array $params,
34 ): DriverConnection;
35
36 /**
37 * Gets the DatabasePlatform instance that provides all the metadata about
38 * the platform this driver connects to.
39 *
40 * @return AbstractPlatform The database platform.
41 */
42 public function getDatabasePlatform(ServerVersionProvider $versionProvider): AbstractPlatform;
43
44 /**
45 * Gets the ExceptionConverter that can be used to convert driver-level exceptions into DBAL exceptions.
46 */
47 public function getExceptionConverter(): ExceptionConverter;
48}