public function getTables()
{
$tables = [];
if ($this->serverSupportFeature(3)) {
$result = $this->runMongoCommand(['listCollections' => 1]);
foreach ($result as $val) {
$tables[] = $val['name'];
}
} else {
$result = $this->runMongoQuery('system.namespaces');
foreach ($result as $val) {
if (strpos($val['name'], '$') === false) {
$tables[] = substr($val['name'], strpos($val['name'], '.') + 1);
}
}
}
return $tables;
}