Метод | Описание | |
---|---|---|
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. |
Метод | Описание | |
---|---|---|
extractFileName ( mixed $file ) : string | Extracts filename from given raw file value. | |
insertInternal ( $attributes = null ) | ||
updateInternal ( $attributes = null ) |
public attributes ( ) : array | ||
Результат | array | list of attribute names. |
protected extractFileName ( mixed $file ) : string | ||
$file | mixed | raw file value. |
Результат | string | file name. |
public static find ( ) : yii\mongodb\file\ActiveQuery | ||
Результат | yii\mongodb\file\ActiveQuery | the newly created [[ActiveQuery]] instance. |
public static getCollection ( ) : |
||
Результат | collection instance. |
public getFileContent ( ) : null | string | ||
Результат | null | string | file content. |
public getFileResource ( ) : resource | ||
Результат | resource | file stream resource. |
public refreshFile ( ) : MongoGridFSFile | null | ||
Результат | MongoGridFSFile | null | refreshed file value. |