| 1 | <?php |
||
| 12 | class MongoLogger implements DataCollectorLoggerInterface |
||
| 13 | { |
||
| 14 | /** @var \SplQueue|QueryLog[] */ |
||
| 15 | private $logs; |
||
| 16 | |||
| 17 | /** @var array|string[] */ |
||
| 18 | private $connections; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * MongoLogger constructor. |
||
| 22 | */ |
||
| 23 | 5 | public function __construct() |
|
| 28 | |||
| 29 | /** |
||
| 30 | * @param string $connection |
||
| 31 | */ |
||
| 32 | 4 | public function addConnection(string $connection) |
|
| 36 | |||
| 37 | /** |
||
| 38 | * @return array|\string[] |
||
| 39 | */ |
||
| 40 | 2 | public function getConnections(): array |
|
| 44 | |||
| 45 | /** |
||
| 46 | * @param QueryLog $event |
||
| 47 | */ |
||
| 48 | 2 | public function logQuery(QueryLog $event) |
|
| 52 | |||
| 53 | /** |
||
| 54 | * @return bool |
||
| 55 | */ |
||
| 56 | 2 | public function hasLoggedEvents(): bool |
|
| 60 | |||
| 61 | /** |
||
| 62 | * @return QueryLog |
||
| 63 | */ |
||
| 64 | 2 | public function getLoggedEvent(): QueryLog |
|
| 72 | } |
||
| 73 |