mongodb\file\ActiveRecord extractFileName()

extractFileName() protected method Extracts filename from given raw file value. protected string extractFileName ( $file )$file mixed Raw file value. return string File name. throws yii\base\InvalidParamException on invalid file value.

mongodb\file\ActiveRecord attributes()

attributes() public method Returns the list of all attribute names of the model. This method could be overridden by child classes to define available attributes. Note: all attributes defined in base Active Record class should be always present in returned array. For example: public function attributes() { return array_merge( parent::attributes(), ['tags', 'status'] ); } public array attributes ( )return array List of attribute names.

mongodb\file\ActiveRecord $fileResource

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

mongodb\file\ActiveRecord $fileContent

$fileContent public read-only property File content. public null|string getFileContent ( )

mongodb\file\ActiveQuery __construct()

__construct() public method Constructor. public void __construct ( $modelClass, $config = [] )$modelClass array The model class associated with this query $config array Configurations to be applied to the newly created query object

mongodb\file\ActiveQuery populate()

populate() public method Converts the raw query results into the format as specified by this query. This method is internally used to convert the data fetched from MongoDB into the format as required by this query. public array populate ( $rows )$rows array The raw query result from MongoDB return array The converted query result

mongodb\file\ActiveQuery one()

one() public method Executes query and returns a single row of result. public yii\mongodb\file\ActiveRecord|array|null one ( $db = null )$db yii\mongodb\Connection The Mongo connection used to execute the query. If null, the Mongo connection returned by $modelClass will be used. return yii\mongodb\file\ActiveRecord|array|null A single row of query result. Depending on the setting of asArray(), the query result may be either an array or an ActiveRecord object. Null will be returned if

mongodb\file\ActiveQuery init()

init() public method Initializes the object. This method is called at the end of the constructor. The default implementation will trigger an EVENT_INIT event. If you override this method, make sure you call the parent implementation at the end to ensure triggering of the event. public void init ( )

mongodb\file\ActiveQuery getCollection()

getCollection() public method Returns the Mongo collection for this query. public yii\mongodb\file\Collection getCollection ( $db = null )$db yii\mongodb\Connection Mongo connection. return yii\mongodb\file\Collection Collection instance.

mongodb\file\ActiveQuery EVENT_INIT

EVENT_INIT event of type \yii\mongodb\file\Event An event that is triggered when the query is initialized via init().