diff options
Diffstat (limited to 'vendor/doctrine/dbal/src/Logging/Middleware.php')
-rw-r--r-- | vendor/doctrine/dbal/src/Logging/Middleware.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/vendor/doctrine/dbal/src/Logging/Middleware.php b/vendor/doctrine/dbal/src/Logging/Middleware.php new file mode 100644 index 0000000..989e0ca --- /dev/null +++ b/vendor/doctrine/dbal/src/Logging/Middleware.php | |||
@@ -0,0 +1,21 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\DBAL\Logging; | ||
6 | |||
7 | use Doctrine\DBAL\Driver as DriverInterface; | ||
8 | use Doctrine\DBAL\Driver\Middleware as MiddlewareInterface; | ||
9 | use Psr\Log\LoggerInterface; | ||
10 | |||
11 | final class Middleware implements MiddlewareInterface | ||
12 | { | ||
13 | public function __construct(private readonly LoggerInterface $logger) | ||
14 | { | ||
15 | } | ||
16 | |||
17 | public function wrap(DriverInterface $driver): DriverInterface | ||
18 | { | ||
19 | return new Driver($driver, $this->logger); | ||
20 | } | ||
21 | } | ||