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->getGridFSBucket(); var_dump($bucket->getBucketName());
The output would then resemble:
string(2) "fs"
On this page
Documentation
PHP Library Manual
Overview
Getting Started
Connect
Databases & Collections
CRUD Operations
Aggregation
Data Formats
Indexes
Run a Database Command
MongoDB Search
MongoDB Vector Search
Logging and Monitoring
Security
Third-Party Integrations
Reference
Compatibility
API Documentation
BSON
MongoDB\Client
MongoDB\ClientBulkWrite
MongoDB\Database
MongoDB\Collection
MongoDB\GridFS\Bucket
__construct()
delete()
deleteByName()
downloadToStream()
downloadToStreamByName()
drop()
find()
findOne()
getBucketName()
getChunksCollection()
getChunkSizeBytes()
getDatabaseName()
getFileDocumentForStream()
getFileIdForStream()
getFilesCollection()
getReadConcern()
getReadPreference()
getTypeMap()
getWriteConcern()
openDownloadStream()
openDownloadStreamByName()
openUploadStream()
registerGlobalStreamWrapperAlias()
rename()
renameByName()
uploadFromStream()
Result Classes
Functions
Exception Classes
Issues & Help