You are viewing an offline version of MongoDB documentation. Some page features might be unavailable. To view the latest version of the page or use interactive features, visit the live page.
MongoDB\GridFS\Bucket::getDatabaseName()
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"