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

New in version 1.2.

Definition

MongoDB\GridFS\Bucket::getChunksCollection

Returns the chunks collection used by the bucket.

function getChunksCollection(): MongoDB\Collection

Return Values

A MongoDB\Collection object for the chunks collection.

Examples

<?php

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

var_dump((string) $bucket->getChunksCollection());

The output would then resemble:

string(14) "test.fs.chunks"