mongodb\file\Collection $fileCollection

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

mongodb\file\Collection $database

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

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 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 insertInternal()

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

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 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 $fileResource

$fileResource public read-only property File stream resource. public resource getFileResource ( )