Method | Description | |
---|---|---|
attributes ( ) : array | Returns the list of all attribute names of the model. | |
find ( ) : yii\mongodb\file\ActiveQuery | ||
getCollection ( ) : |
Return the Mongo GridFS collection instance for this AR class. | |
getFileContent ( ) : null | string | Returns the associated file content. | |
getFileResource ( ) : resource | 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. | |
refreshFile ( ) : MongoGridFSFile | null | Refreshes the [[file]] attribute from file collection, using current primary key. | |
writeFile ( string $filename ) : boolean | Writes the the internal file content into the given filename. |
Method | Description | |
---|---|---|
extractFileName ( mixed $file ) : string | Extracts filename from given raw file value. | |
insertInternal ( $attributes = null ) | ||
updateInternal ( $attributes = null ) |
public attributes ( ) : array | ||
return | array | list of attribute names. |
protected extractFileName ( mixed $file ) : string | ||
$file | mixed | raw file value. |
return | string | file name. |
public static find ( ) : yii\mongodb\file\ActiveQuery | ||
return | yii\mongodb\file\ActiveQuery | the newly created [[ActiveQuery]] instance. |
public static getCollection ( ) : |
||
return | collection instance. |
public getFileContent ( ) : null | string | ||
return | null | string | file content. |
public getFileResource ( ) : resource | ||
return | resource | file stream resource. |
public refreshFile ( ) : MongoGridFSFile | null | ||
return | MongoGridFSFile | null | refreshed file value. |