diff options
Diffstat (limited to 'vendor/doctrine/dbal/src/Driver.php')
-rw-r--r-- | vendor/doctrine/dbal/src/Driver.php | 48 |
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 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\DBAL; | ||
6 | |||
7 | use Doctrine\DBAL\Driver\API\ExceptionConverter; | ||
8 | use Doctrine\DBAL\Driver\Connection as DriverConnection; | ||
9 | use Doctrine\DBAL\Driver\Exception; | ||
10 | use Doctrine\DBAL\Platforms\AbstractPlatform; | ||
11 | use SensitiveParameter; | ||
12 | |||
13 | /** | ||
14 | * Driver interface. | ||
15 | * Interface that all DBAL drivers must implement. | ||
16 | * | ||
17 | * @psalm-import-type Params from DriverManager | ||
18 | */ | ||
19 | interface 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 | } | ||