Menu Docs
Página inicial do Docs
///
Manual da Biblioteca PHP
//

MongoDB\GridFS\Bucket::getFilesCollection()

Novidade da versão 1.2.

MongoDB\GridFS\Bucket::getFilesCollection()

Retorna a collection de arquivos usada pelo bucket.

function getFilesCollection(): MongoDB\Collection

Um objeto

MongoDB\Collection para a coleção de arquivos.

<?php
$bucket = (new MongoDB\Client)->test->selectGridFSBucket();
$filesCollection = $bucket->getFilesCollection();
var_dump($filesCollection->getCollectionName());

A saída seria então semelhante a:

string(8) "fs.files"

Voltar

getFileIdForStream()

Nesta página