summaryrefslogtreecommitdiff
path: root/vendor/doctrine/dbal/src/Driver/Middleware
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/Middleware
parent94d67a4b51f8e62e7d518cce26a526ae1ec48278 (diff)
downloadAppliGestionPHP-bf6655a534a6775d30cafa67bd801276bda1d98d.zip
VERSION 0.2 doctrine ORM et entités
Diffstat (limited to 'vendor/doctrine/dbal/src/Driver/Middleware')
-rw-r--r--vendor/doctrine/dbal/src/Driver/Middleware/AbstractConnectionMiddleware.php69
-rw-r--r--vendor/doctrine/dbal/src/Driver/Middleware/AbstractDriverMiddleware.php39
-rw-r--r--vendor/doctrine/dbal/src/Driver/Middleware/AbstractResultMiddleware.php68
-rw-r--r--vendor/doctrine/dbal/src/Driver/Middleware/AbstractStatementMiddleware.php26
4 files changed, 202 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
3declare(strict_types=1);
4
5namespace Doctrine\DBAL\Driver\Middleware;
6
7use Doctrine\DBAL\Driver\Connection;
8use Doctrine\DBAL\Driver\Result;
9use Doctrine\DBAL\Driver\Statement;
10
11abstract 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}
diff --git a/vendor/doctrine/dbal/src/Driver/Middleware/AbstractDriverMiddleware.php b/vendor/doctrine/dbal/src/Driver/Middleware/AbstractDriverMiddleware.php
new file mode 100644
index 0000000..482f134
--- /dev/null
+++ b/vendor/doctrine/dbal/src/Driver/Middleware/AbstractDriverMiddleware.php
@@ -0,0 +1,39 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\DBAL\Driver\Middleware;
6
7use Doctrine\DBAL\Driver;
8use Doctrine\DBAL\Driver\API\ExceptionConverter;
9use Doctrine\DBAL\Driver\Connection as DriverConnection;
10use Doctrine\DBAL\Platforms\AbstractPlatform;
11use Doctrine\DBAL\ServerVersionProvider;
12use SensitiveParameter;
13
14abstract class AbstractDriverMiddleware implements Driver
15{
16 public function __construct(private readonly Driver $wrappedDriver)
17 {
18 }
19
20 /**
21 * {@inheritDoc}
22 */
23 public function connect(
24 #[SensitiveParameter]
25 array $params,
26 ): DriverConnection {
27 return $this->wrappedDriver->connect($params);
28 }
29
30 public function getDatabasePlatform(ServerVersionProvider $versionProvider): AbstractPlatform
31 {
32 return $this->wrappedDriver->getDatabasePlatform($versionProvider);
33 }
34
35 public function getExceptionConverter(): ExceptionConverter
36 {
37 return $this->wrappedDriver->getExceptionConverter();
38 }
39}
diff --git a/vendor/doctrine/dbal/src/Driver/Middleware/AbstractResultMiddleware.php b/vendor/doctrine/dbal/src/Driver/Middleware/AbstractResultMiddleware.php
new file mode 100644
index 0000000..7da2f99
--- /dev/null
+++ b/vendor/doctrine/dbal/src/Driver/Middleware/AbstractResultMiddleware.php
@@ -0,0 +1,68 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\DBAL\Driver\Middleware;
6
7use Doctrine\DBAL\Driver\Result;
8
9abstract class AbstractResultMiddleware implements Result
10{
11 public function __construct(private readonly Result $wrappedResult)
12 {
13 }
14
15 public function fetchNumeric(): array|false
16 {
17 return $this->wrappedResult->fetchNumeric();
18 }
19
20 public function fetchAssociative(): array|false
21 {
22 return $this->wrappedResult->fetchAssociative();
23 }
24
25 public function fetchOne(): mixed
26 {
27 return $this->wrappedResult->fetchOne();
28 }
29
30 /**
31 * {@inheritDoc}
32 */
33 public function fetchAllNumeric(): array
34 {
35 return $this->wrappedResult->fetchAllNumeric();
36 }
37
38 /**
39 * {@inheritDoc}
40 */
41 public function fetchAllAssociative(): array
42 {
43 return $this->wrappedResult->fetchAllAssociative();
44 }
45
46 /**
47 * {@inheritDoc}
48 */
49 public function fetchFirstColumn(): array
50 {
51 return $this->wrappedResult->fetchFirstColumn();
52 }
53
54 public function rowCount(): int|string
55 {
56 return $this->wrappedResult->rowCount();
57 }
58
59 public function columnCount(): int
60 {
61 return $this->wrappedResult->columnCount();
62 }
63
64 public function free(): void
65 {
66 $this->wrappedResult->free();
67 }
68}
diff --git a/vendor/doctrine/dbal/src/Driver/Middleware/AbstractStatementMiddleware.php b/vendor/doctrine/dbal/src/Driver/Middleware/AbstractStatementMiddleware.php
new file mode 100644
index 0000000..6eaad50
--- /dev/null
+++ b/vendor/doctrine/dbal/src/Driver/Middleware/AbstractStatementMiddleware.php
@@ -0,0 +1,26 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\DBAL\Driver\Middleware;
6
7use Doctrine\DBAL\Driver\Result;
8use Doctrine\DBAL\Driver\Statement;
9use Doctrine\DBAL\ParameterType;
10
11abstract class AbstractStatementMiddleware implements Statement
12{
13 public function __construct(private readonly Statement $wrappedStatement)
14 {
15 }
16
17 public function bindValue(int|string $param, mixed $value, ParameterType $type): void
18 {
19 $this->wrappedStatement->bindValue($param, $value, $type);
20 }
21
22 public function execute(): Result
23 {
24 return $this->wrappedStatement->execute();
25 }
26}