Docs Home → PHP Library Manual
MongoDB\GridFS\Bucket::getDatabaseName()
On this page
Definition
Return Values
The name of the database containing this bucket as a string.
Examples
$bucket = (new MongoDB\Client)->test->selectGridFSBucket(); var_dump($bucket->getDatabaseName());
The output would then resemble:
string(4) "test"