| 1 | <?php declare(strict_types = 1); |
||
| 10 | class MongoQueryLogger implements DataCollectorLoggerInterface |
||
| 11 | { |
||
| 12 | /** @var \SplQueue|Query[] */ |
||
| 13 | private $logs; |
||
| 14 | /** @var array|string[] */ |
||
| 15 | private $connections; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * MongoQueryLogger constructor. |
||
| 19 | */ |
||
| 20 | 7 | public function __construct() |
|
| 25 | |||
| 26 | /** |
||
| 27 | * @param string $connection |
||
| 28 | */ |
||
| 29 | 5 | public function addConnection(string $connection) |
|
| 33 | |||
| 34 | /** |
||
| 35 | * @return array|\string[] |
||
| 36 | */ |
||
| 37 | 4 | public function getConnections(): array |
|
| 41 | |||
| 42 | /** |
||
| 43 | * @param Query $event |
||
| 44 | */ |
||
| 45 | 3 | public function logQuery(Query $event) |
|
| 49 | |||
| 50 | /** |
||
| 51 | * @return Query |
||
| 52 | */ |
||
| 53 | 3 | public function getLoggedEvent(): Query |
|
| 61 | |||
| 62 | /** |
||
| 63 | * @return bool |
||
| 64 | */ |
||
| 65 | 4 | public function hasLoggedEvents(): bool |
|
| 69 | } |
||
| 70 |