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