mongodb\ActiveQuery exists()

exists() public method Returns a value indicating whether the query result contains any row of data. public boolean exists ( $db = null )$db yii\mongodb\Connection The Mongo connection used to execute the query. If this parameter is not given, the mongodb application component will be used. return boolean Whether the query result contains any row of data.

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

buildCursor() public method Builds the Mongo cursor for this query. public \MongoDB\Driver\Cursor buildCursor ( $db = null )$db yii\mongodb\Connection The database connection used to execute the query. return \MongoDB\Driver\Cursor Mongo cursor instance.

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

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

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