MongoDB\Model\DatabaseInfo::isEmpty()
On this page
Definition
Return Values
A boolean indicating whether the database has any data.
Examples
$info = new DatabaseInfo(['empty' => true]); var_dump($info->isEmpty());
The output would then resemble:
bool(true)
See Also
listDatabases command reference in the MongoDB manual