Navigation

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"