Navigation

MongoDB\Model\DatabaseInfo::isEmpty()

Definition

MongoDB\Model\DatabaseInfo::isEmpty

Return whether the database has any data.

function isEmpty(): boolean

Return Values

A boolean indicating whether the database has any data.

Examples

<?php

$info = new DatabaseInfo(['empty' => true]);

var_dump($info->isEmpty());

The output would then resemble:

bool(true)

See Also