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 | 5 | public function __construct(Stopwatch $stopwatch) |
|
35 | |||
36 | 1 | public function startLogging() |
|
40 | |||
41 | /** |
||
42 | * @param string $connection |
||
43 | */ |
||
44 | 3 | public function addConnection(string $connection) |
|
48 | |||
49 | /** |
||
50 | * @return array|\string[] |
||
51 | */ |
||
52 | 1 | public function getConnections(): array |
|
56 | |||
57 | /** |
||
58 | * @param LogEvent $event |
||
59 | */ |
||
60 | 1 | public function logQuery(LogEvent $event) |
|
67 | |||
68 | /** |
||
69 | * @return bool |
||
70 | */ |
||
71 | 1 | public function hasLoggedEvents(): bool |
|
75 | |||
76 | /** |
||
77 | * @return LogEvent |
||
78 | */ |
||
79 | 1 | public function getLoggedEvent(): LogEvent |
|
87 | } |
||
88 |