DoctrineMongoDbAggregateLogger::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the Doctrine MongoDBBundle
5
 *
6
 * The code was originally distributed inside the Symfony framework.
7
 *
8
 * (c) Fabien Potencier <[email protected]>
9
 * (c) Doctrine Project
10
 *
11
 * For the full copyright and license information, please view the LICENSE
12
 * file that was distributed with this source code.
13
 */
14
15
namespace Saxulum\SaxulumWebProfiler\Logger;
16
17
/**
18
 * An aggregate query logger.
19
 *
20
 * @author Kris Wallsmith <[email protected]>
21
 */
22
class DoctrineMongoDbAggregateLogger implements DoctrineMongoDbLoggerInterface
23
{
24
    private $loggers;
25
26
    /**
27
     * Constructor.
28
     *
29
     * @param array $loggers An array of LoggerInterface objects
30
     */
31
    public function __construct(array $loggers)
32
    {
33
        $this->loggers = $loggers;
34
    }
35
36
    public function logQuery(array $query)
37
    {
38
        foreach ($this->loggers as $logger) {
39
            $logger->logQuery($query);
40
        }
41
    }
42
}
43