For AI agents: a documentation index is available at https://www.mongodb.com/es/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

MongoDB\GridFS\Bucket::getChunksCollection()

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"