Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs Menu
Docs Home
/ / /
PHP Library Manual
/ /

MongoDB\GridFS\Bucket::getDatabaseName()

MongoDB\GridFS\Bucket::getDatabaseName()

Returns the name of the database containing this bucket.

function getDatabaseName(): string

The name of the database containing this bucket as a string.

<?php
$bucket = (new MongoDB\Client)->test->selectGridFSBucket();
var_dump($bucket->getDatabaseName());

The output would then resemble:

string(4) "test"

Back

getChunkSizeBytes()

On this page