1 | <?php |
||
16 | final class MongoDbDataCollector extends DataCollector |
||
17 | { |
||
18 | const QUERY_KEYWORD = 'queries'; |
||
19 | const CONNECTION_KEYWORD = 'connections'; |
||
20 | const TIME_KEYWORD = 'totalTime'; |
||
21 | |||
22 | /** @var DataCollectorLoggerInterface */ |
||
23 | private $logger; |
||
24 | |||
25 | 2 | public function __construct() |
|
33 | |||
34 | /** |
||
35 | * @param DataCollectorLoggerInterface $logger |
||
36 | */ |
||
37 | 2 | public function setLogger(DataCollectorLoggerInterface $logger) |
|
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | */ |
||
45 | 2 | public function collect(Request $request, Response $response, \Exception $exception = null) |
|
63 | |||
64 | /** |
||
65 | * @return int |
||
66 | */ |
||
67 | 2 | public function getQueryCount(): int |
|
71 | |||
72 | /** |
||
73 | * @return array |
||
74 | */ |
||
75 | 2 | public function getQueries(): array |
|
79 | |||
80 | /** |
||
81 | * @return float |
||
82 | */ |
||
83 | 2 | public function getTime(): float |
|
87 | |||
88 | /** |
||
89 | * @return int |
||
90 | */ |
||
91 | 2 | public function getConnectionsCount(): int |
|
95 | /** |
||
96 | * @return array|string[] |
||
97 | */ |
||
98 | 2 | public function getConnections(): array |
|
102 | |||
103 | /** |
||
104 | * {@inheritdoc} |
||
105 | */ |
||
106 | 2 | public function getName() |
|
110 | |||
111 | /** |
||
112 | * @param array $data |
||
113 | * |
||
114 | * @return array |
||
115 | */ |
||
116 | private function prepareUnserializableData(array $data): array |
||
134 | } |
||
135 |