mongodb\file\Cursor current()

current() public method Return the current element This method is required by the interface Iterator. public mixed current ( )return mixed Current row

mongodb\file\Cursor count()

count() public method Count elements of this cursor. This method is required by the interface Countable. public integer count ( )return integer Elements count.

mongodb\file\Cursor $collection

$collection public property Related GridFS collection instance. public yii\mongodb\file\Collection $collection = null

mongodb\file\Collection setPrefix()

setPrefix() public method public void setPrefix ( $prefix )$prefix string Prefix of this file collection.

mongodb\file\Collection remove()

remove() public method Removes data from the collection. public integer|boolean remove ( $condition = [], $options = [] )$condition array Description of records to remove. $options array List of options in format: optionName => optionValue. return integer|boolean Number of updated documents or whether operation was successful. throws yii\mongodb\Exception on failure.

mongodb\file\Collection insertUploads()

insertUploads() public method Creates new file in GridFS collection from uploaded file. Additional attributes can be added file document using $metadata. public mixed insertUploads ( $name, $metadata = [], $options = [] )$name string Name of the uploaded file to store. This should correspond to the file field's name attribute in the HTML form. $metadata array Other metadata fields to include in the file document. $options array List of options in format: optionName => optionValue

mongodb\file\Collection insertFileContent()

insertFileContent() public method Creates new file in GridFS collection with specified content. Additional attributes can be added file document using $metadata. public mixed insertFileContent ( $bytes, $metadata = [], $options = [] )$bytes string String of bytes to store. $metadata array Other metadata fields to include in the file document. $options array List of options in format: optionName => optionValue return mixed The "_id" of the saved file document. This will be a gene

mongodb\file\Collection insertFile()

insertFile() public method Creates new file in GridFS collection from given local filesystem file. Additional attributes can be added file document using $metadata. public mixed insertFile ( $filename, $metadata = [], $options = [] )$filename string Name of the file to store. $metadata array Other metadata fields to include in the file document. $options array List of options in format: optionName => optionValue return mixed The "_id" of the saved file document. This will be a g

mongodb\file\Collection getPrefix()

getPrefix() public method public string getPrefix ( )return string Prefix of this file collection.

mongodb\file\Collection getFileCollection()

getFileCollection() public method (available since version 2.1) Returns the MongoDB collection for the files. public yii\mongodb\Collection getFileCollection ( $refresh = false )$refresh boolean Whether to reload the collection instance even if it is found in the cache. return yii\mongodb\Collection Mongo collection instance.