yii\mongodb\Database::getFileCollection PHP Method

getFileCollection() public method

Returns Mongo GridFS collection with given prefix.
public getFileCollection ( string $prefix = 'fs', boolean $refresh = false ) : Collection
$prefix string collection prefix.
$refresh boolean whether to reload the collection instance even if it is found in the cache.
return yii\mongodb\file\Collection Mongo GridFS collection.
    public function getFileCollection($prefix = 'fs', $refresh = false)
    {
        if ($refresh || !array_key_exists($prefix, $this->_fileCollections)) {
            $this->_fileCollections[$prefix] = $this->selectFileCollection($prefix);
        }
        return $this->_fileCollections[$prefix];
    }