1 | <?php |
||
13 | class MongoLogger implements DataCollectorLoggerInterface |
||
14 | { |
||
15 | /** @var \SplQueue|LogEvent[] */ |
||
16 | private $logs; |
||
17 | |||
18 | /** @var array|string[] */ |
||
19 | private $connections; |
||
20 | |||
21 | /** @var Stopwatch */ |
||
22 | private $stopwatch; |
||
23 | |||
24 | /** |
||
25 | * MongoLogger constructor. |
||
26 | * |
||
27 | * @param Stopwatch $stopwatch |
||
28 | */ |
||
29 | 6 | public function __construct(Stopwatch $stopwatch) |
|
35 | |||
36 | 1 | public function startLogging(LogEvent $event) |
|
42 | |||
43 | /** |
||
44 | 4 | * @param string $connection |
|
45 | */ |
||
46 | 4 | public function addConnection(string $connection) |
|
50 | |||
51 | /** |
||
52 | 2 | * @return array|\string[] |
|
53 | */ |
||
54 | 2 | public function getConnections(): array |
|
58 | |||
59 | /** |
||
60 | 2 | * @param LogEvent $event |
|
61 | */ |
||
62 | 2 | public function logQuery(LogEvent $event) |
|
69 | |||
70 | /** |
||
71 | 2 | * @return bool |
|
72 | */ |
||
73 | 2 | public function hasLoggedEvents(): bool |
|
77 | |||
78 | /** |
||
79 | 2 | * @return LogEvent |
|
80 | */ |
||
81 | 2 | public function getLoggedEvent(): LogEvent |
|
89 | } |
||
90 |