Navigation
This version of the documentation is archived and no longer supported. To learn how to upgrade your version of PHP Library Manual, refer to the upgrade documentation.

MongoDB\GridFS\Bucket::getBucketName()

Definition

MongoDB\GridFS\Bucket::getBucketName

Returns the name of this bucket.

function getBucketName(): string

Return Values

The name of this bucket as a string.

Examples

<?php

$bucket = (new MongoDB\Client)->test->selectGridFSBucket();

var_dump($bucket->getBucketName());

The output would then resemble:

string(2) "fs"