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::getBucketName()

MongoDB\GridFS\Bucket::getBucketName()

Returns the name of this bucket.

function getBucketName(): string

The name of this bucket as a string.

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

The output would then resemble:

string(2) "fs"

Back

findOne()

On this page