Connection.php
2 years ago
DebugStack.php
2 years ago
Driver.php
2 years ago
LoggerChain.php
2 years ago
Middleware.php
2 years ago
SQLLogger.php
2 years ago
Statement.php
2 years ago
index.php
2 years ago
LoggerChain.php
26 lines
| 1 | <?php |
| 2 | namespace MailPoetVendor\Doctrine\DBAL\Logging; |
| 3 | if (!defined('ABSPATH')) exit; |
| 4 | use MailPoetVendor\Doctrine\Deprecations\Deprecation; |
| 5 | class LoggerChain implements SQLLogger |
| 6 | { |
| 7 | private iterable $loggers; |
| 8 | public function __construct(iterable $loggers = []) |
| 9 | { |
| 10 | Deprecation::trigger('doctrine/dbal', 'https://github.com/doctrine/dbal/pull/4967', 'LoggerChain is deprecated'); |
| 11 | $this->loggers = $loggers; |
| 12 | } |
| 13 | public function startQuery($sql, ?array $params = null, ?array $types = null) |
| 14 | { |
| 15 | foreach ($this->loggers as $logger) { |
| 16 | $logger->startQuery($sql, $params, $types); |
| 17 | } |
| 18 | } |
| 19 | public function stopQuery() |
| 20 | { |
| 21 | foreach ($this->loggers as $logger) { |
| 22 | $logger->stopQuery(); |
| 23 | } |
| 24 | } |
| 25 | } |
| 26 |