mongodb\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\ActiveQuery EVENT_INIT

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

mongodb\ActiveQuery getCollection()

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

mongodb\ActiveFixture resetCollection()

resetCollection() protected method Removes all existing data from the specified collection and resets sequence number if any. This method is called before populating fixture data into the collection associated with this fixture. protected void resetCollection ( )

mongodb\ActiveQuery all()

all() public method Executes query and returns all results as an array. public array|yii\mongodb\ActiveRecord all ( $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 array|yii\mongodb\ActiveRecord The query results. If the query results in nothing, an empty array will be returned.

mongodb\ActiveQuery $collection

$collection public read-only property Collection instance. public yii\mongodb\Collection getCollection ( $db = null )

mongodb\ActiveFixture init()

init() public method Initializes the object. This method is invoked at the end of the constructor after the object is initialized with the given configuration. public void init ( )

mongodb\ActiveFixture getCollectionName()

getCollectionName() protected method Returns collection name used by this fixture. protected array|string getCollectionName ( )return array|string Related collection name

mongodb\ActiveFixture getData()

getData() protected method Returns the fixture data. This method is called by \yii\mongodb\loadData() to get the needed fixture data. The default implementation will try to return the fixture data by including the external file specified by $dataFile. The file should return an array of data rows (column name => column value), each corresponding to a row in the collection. If the data file does not exist, an empty array will be returned. protected array getData ( )return array The data

mongodb\ActiveFixture load()

load() public method Loads the fixture data. The default implementation will first reset the MongoDB collection and then populate it with the data returned by getData(). public void load ( )