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 | /** |
||
22 | * MongoLogger constructor. |
||
23 | */ |
||
24 | 6 | public function __construct() |
|
29 | |||
30 | 1 | public function startLogging(LogEvent $event) |
|
34 | |||
35 | /** |
||
36 | * @param string $connection |
||
37 | */ |
||
38 | 4 | public function addConnection(string $connection) |
|
42 | |||
43 | /** |
||
44 | * @return array|\string[] |
||
45 | */ |
||
46 | 2 | public function getConnections(): array |
|
50 | |||
51 | /** |
||
52 | * @param LogEvent $event |
||
53 | */ |
||
54 | 2 | public function logQuery(LogEvent $event) |
|
61 | |||
62 | /** |
||
63 | * @return bool |
||
64 | */ |
||
65 | 2 | public function hasLoggedEvents(): bool |
|
69 | |||
70 | /** |
||
71 | * @return LogEvent |
||
72 | */ |
||
73 | 2 | public function getLoggedEvent(): LogEvent |
|
81 | } |
||
82 |