diff options
Diffstat (limited to 'vendor/doctrine/dbal/src/Driver/Middleware/AbstractConnectionMiddleware.php')
-rw-r--r-- | vendor/doctrine/dbal/src/Driver/Middleware/AbstractConnectionMiddleware.php | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/vendor/doctrine/dbal/src/Driver/Middleware/AbstractConnectionMiddleware.php b/vendor/doctrine/dbal/src/Driver/Middleware/AbstractConnectionMiddleware.php new file mode 100644 index 0000000..bdf9b2f --- /dev/null +++ b/vendor/doctrine/dbal/src/Driver/Middleware/AbstractConnectionMiddleware.php | |||
@@ -0,0 +1,69 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\DBAL\Driver\Middleware; | ||
6 | |||
7 | use Doctrine\DBAL\Driver\Connection; | ||
8 | use Doctrine\DBAL\Driver\Result; | ||
9 | use Doctrine\DBAL\Driver\Statement; | ||
10 | |||
11 | abstract class AbstractConnectionMiddleware implements Connection | ||
12 | { | ||
13 | public function __construct(private readonly Connection $wrappedConnection) | ||
14 | { | ||
15 | } | ||
16 | |||
17 | public function prepare(string $sql): Statement | ||
18 | { | ||
19 | return $this->wrappedConnection->prepare($sql); | ||
20 | } | ||
21 | |||
22 | public function query(string $sql): Result | ||
23 | { | ||
24 | return $this->wrappedConnection->query($sql); | ||
25 | } | ||
26 | |||
27 | public function quote(string $value): string | ||
28 | { | ||
29 | return $this->wrappedConnection->quote($value); | ||
30 | } | ||
31 | |||
32 | public function exec(string $sql): int|string | ||
33 | { | ||
34 | return $this->wrappedConnection->exec($sql); | ||
35 | } | ||
36 | |||
37 | public function lastInsertId(): int|string | ||
38 | { | ||
39 | return $this->wrappedConnection->lastInsertId(); | ||
40 | } | ||
41 | |||
42 | public function beginTransaction(): void | ||
43 | { | ||
44 | $this->wrappedConnection->beginTransaction(); | ||
45 | } | ||
46 | |||
47 | public function commit(): void | ||
48 | { | ||
49 | $this->wrappedConnection->commit(); | ||
50 | } | ||
51 | |||
52 | public function rollBack(): void | ||
53 | { | ||
54 | $this->wrappedConnection->rollBack(); | ||
55 | } | ||
56 | |||
57 | public function getServerVersion(): string | ||
58 | { | ||
59 | return $this->wrappedConnection->getServerVersion(); | ||
60 | } | ||
61 | |||
62 | /** | ||
63 | * {@inheritDoc} | ||
64 | */ | ||
65 | public function getNativeConnection() | ||
66 | { | ||
67 | return $this->wrappedConnection->getNativeConnection(); | ||
68 | } | ||
69 | } | ||