Docs Menu
Docs Home
/ / /
PHP Library Manual
/ /

MongoDB\GridFS\Bucket::getChunksCollection()

On this page

  • Definition
  • Return Values
  • Examples

New in version 1.2.

MongoDB\GridFS\Bucket::getChunksCollection()

Returns the chunks collection used by the bucket.

function getChunksCollection(): MongoDB\Collection

A MongoDB\Collection object for the chunks collection.

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

The output would then resemble:

string(14) "test.fs.chunks"

Back

getBucketName()