public listDBs ( ) : array | ||
return | array | - Returns an associative array containing three fields. The first field is databases, which in turn contains an array. Each element of the array is an associative array corresponding to a database, giving th database's name, size, and if it's empty. The other two fields are totalSize (in bytes) and ok, which is 1 if this method ran successfully. |
public function listDBs()
{
$cmd = ['listDatabases' => 1];
$result = $this->selectDB(self::DEFAULT_DATABASE)->command($cmd);
return $result;
}
public function listDatabases() { $this->initialize(); return $this->mongo->listDBs(); }