Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
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;
621 lars 10
use SensitiveParameter;
148 lars 11
 
12
/**
13
 * Driver interface.
14
 * Interface that all DBAL drivers must implement.
621 lars 15
 *
16
 * @psalm-import-type Params from DriverManager
148 lars 17
 */
18
interface Driver
19
{
20
    /**
21
     * Attempts to create a connection with the database.
22
     *
621 lars 23
     * @param array<string, mixed> $params All connection parameters.
24
     * @psalm-param Params $params All connection parameters.
148 lars 25
     *
26
     * @return DriverConnection The database connection.
27
     *
28
     * @throws Exception
29
     */
621 lars 30
    public function connect(
31
        #[SensitiveParameter]
32
        array $params
33
    );
148 lars 34
 
35
    /**
36
     * Gets the DatabasePlatform instance that provides all the metadata about
37
     * the platform this driver connects to.
38
     *
39
     * @return AbstractPlatform The database platform.
40
     */
41
    public function getDatabasePlatform();
42
 
43
    /**
44
     * Gets the SchemaManager that can be used to inspect and change the underlying
45
     * database schema of the platform this driver connects to.
46
     *
47
     * @deprecated Use {@link AbstractPlatform::createSchemaManager()} instead.
48
     *
49
     * @return AbstractSchemaManager
50
     */
51
    public function getSchemaManager(Connection $conn, AbstractPlatform $platform);
52
 
53
    /**
54
     * Gets the ExceptionConverter that can be used to convert driver-level exceptions into DBAL exceptions.
55
     */
56
    public function getExceptionConverter(): ExceptionConverter;
57
}