mongodb\file\Collection $database

$database public property MongoDB database instance. public yii\mongodb\Database $database = null

mongodb\file\Collection $chunkCollection

$chunkCollection public read-only property Mongo collection instance. public yii\mongodb\Collection getChunkCollection ( $refresh = false )

mongodb\file\ActiveRecord writeFile()

writeFile() public method Writes the the internal file content into the given filename. public boolean writeFile ( $filename )$filename string Full filename to be written. return boolean Whether the operation was successful. throws yii\base\InvalidParamException on invalid file attribute value.

mongodb\file\ActiveRecord updateInternal()

updateInternal() protected method See also yii\mongodb\file\ActiveRecord::update(). protected void updateInternal ( $attributes = null )$attributes throws yii\db\StaleObjectException

mongodb\file\ActiveRecord refreshFile()

refreshFile() public method Refreshes the \yii\mongodb\file\file attribute from file collection, using current primary key. public \MongoGridFSFile|null refreshFile ( )return \MongoGridFSFile|null Refreshed file value.

mongodb\file\ActiveRecord insertInternal()

insertInternal() protected method See also yii\mongodb\file\ActiveRecord::insert(). protected void insertInternal ( $attributes = null )$attributes

mongodb\file\ActiveRecord getFileResource()

getFileResource() public method This method returns a stream resource that can be used with all file functions in PHP, which deal with reading files. The contents of the file are pulled out of MongoDB on the fly, so that the whole file does not have to be loaded into memory first. public resource getFileResource ( )return resource File stream resource. throws yii\base\InvalidParamException on invalid file attribute value.

mongodb\file\ActiveRecord getFileContent()

getFileContent() public method Returns the associated file content. public null|string getFileContent ( )return null|string File content. throws yii\base\InvalidParamException on invalid file attribute value.

mongodb\file\ActiveRecord getCollection()

getCollection() public static method Return the Mongo GridFS collection instance for this AR class. public static yii\mongodb\file\Collection getCollection ( )return yii\mongodb\file\Collection Collection instance.

mongodb\file\ActiveRecord find()

find() public static method Creates an \yii\mongodb\file\ActiveQueryInterface instance for query purpose. The returned \yii\mongodb\file\ActiveQueryInterface instance can be further customized by calling methods defined in \yii\mongodb\file\ActiveQueryInterface before one() or all() is called to return populated ActiveRecord instances. For example, // find the customer whose ID is 1 $customer = Customer::find()->where(['id' => 1])->one(); // find all active customers and order the