Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Doctrine\DBAL\Logging;
4
 
5
use Doctrine\Deprecations\Deprecation;
6
 
7
/**
8
 * Chains multiple SQLLogger.
9
 *
10
 * @deprecated
11
 */
12
class LoggerChain implements SQLLogger
13
{
14
    /** @var iterable<SQLLogger> */
15
    private iterable $loggers;
16
 
17
    /** @param iterable<SQLLogger> $loggers */
18
    public function __construct(iterable $loggers = [])
19
    {
20
        Deprecation::trigger(
21
            'doctrine/dbal',
22
            'https://github.com/doctrine/dbal/pull/4967',
23
            'LoggerChain is deprecated',
24
        );
25
 
26
        $this->loggers = $loggers;
27
    }
28
 
29
    /**
30
     * {@inheritdoc}
31
     */
32
    public function startQuery($sql, ?array $params = null, ?array $types = null)
33
    {
34
        foreach ($this->loggers as $logger) {
35
            $logger->startQuery($sql, $params, $types);
36
        }
37
    }
38
 
39
    /**
40
     * {@inheritdoc}
41
     */
42
    public function stopQuery()
43
    {
44
        foreach ($this->loggers as $logger) {
45
            $logger->stopQuery();
46
        }
47
    }
48
}