Commit a57aeb2a by Paul Klimov

Doc comments at `yii\mongodb\*` fixed

parent 0adcd06c
......@@ -18,7 +18,7 @@ use yii\test\BaseActiveFixture;
* specified by [[dataFile]] or overriding [[getData()]] if you want to use code to generate the fixture data.
*
* When the fixture is being loaded, it will first call [[resetCollection()]] to remove any existing data in the collection.
* It will then populate the table with the data returned by [[getData()]].
* It will then populate the collection with the data returned by [[getData()]].
*
* After the fixture is loaded, you can access the loaded data via the [[data]] property. If you set [[modelClass]],
* you will also be able to retrieve an instance of [[modelClass]] with the populated data via [[getModel()]].
......@@ -34,7 +34,7 @@ class ActiveFixture extends BaseActiveFixture
public $db = 'mongodb';
/**
* @var string|array the collection name that this fixture is about. If this property is not set,
* the table name will be determined via [[modelClass]].
* the collection name will be determined via [[modelClass]].
* @see Connection::getCollection()
*/
public $collectionName;
......@@ -53,7 +53,7 @@ class ActiveFixture extends BaseActiveFixture
/**
* Loads the fixture data.
* The default implementation will first reset the DB table and then populate it with the data
* The default implementation will first reset the MongoDB collection and then populate it with the data
* returned by [[getData()]].
*/
public function load()
......@@ -90,7 +90,7 @@ class ActiveFixture extends BaseActiveFixture
* This method is called by [[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 table.
* 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.
*
......
......@@ -48,9 +48,9 @@ use yii\db\ActiveRelationTrait;
* a getter method which calls one of the above methods and returns the created ActiveQuery object.
*
* A relation is specified by [[link]] which represents the association between columns
* of different tables; and the multiplicity of the relation is indicated by [[multiple]].
* of different collections; and the multiplicity of the relation is indicated by [[multiple]].
*
* If a relation involves a junction table, it may be specified by [[via()]].
* If a relation involves a junction collection, it may be specified by [[via()]].
* This methods may only be called in a relational context. Same is true for [[inverseOf()]], which
* marks a relation as inverse of another relation.
*
......
......@@ -111,7 +111,7 @@ abstract class ActiveRecord extends BaseActiveRecord
*
* By default this method returns the class name as the collection name by calling [[Inflector::camel2id()]].
* For example, 'Customer' becomes 'customer', and 'OrderItem' becomes
* 'order_item'. You may override this method if the table is not named after this convention.
* 'order_item'. You may override this method if the collection is not named after this convention.
* @return string|array the collection name
*/
public static function collectionName()
......@@ -332,7 +332,7 @@ abstract class ActiveRecord extends BaseActiveRecord
/**
* Returns a value indicating whether the given active record is the same as the current one.
* The comparison is made by comparing the table names and the primary key values of the two active records.
* The comparison is made by comparing the collection names and the primary key values of the two active records.
* If one of the records [[isNewRecord|is new]] they are also considered not equal.
* @param ActiveRecord $record record to compare to
* @return boolean whether the two active records refer to the same row in the same Mongo collection.
......
......@@ -16,7 +16,7 @@ use yii\di\Instance;
*
* By default, Cache stores session data in a MongoDB collection named 'cache' inside the default database.
* This collection is better to be pre-created with fields 'id' and 'expire' indexed.
* The table name can be changed by setting [[cacheCollection]].
* The collection name can be changed by setting [[cacheCollection]].
*
* Please refer to [[\yii\caching\Cache]] for common cache operations that are supported by Cache.
*
......
......@@ -194,7 +194,7 @@ class Generator extends \yii\gii\Generator
}
/**
* Generates validation rules for the specified table.
* Generates validation rules for the specified collection.
* @param array $attributes the list of attributes
* @return array the generated validation rules
*/
......@@ -262,8 +262,8 @@ class Generator extends \yii\gii\Generator
}
/**
* Generates a class name from the specified table name.
* @param string $collectionName the table name (which may contain schema prefix)
* Generates a class name from the specified collection name.
* @param string $collectionName the collection name (which may contain schema prefix)
* @return string the generated class name
*/
protected function generateClassName($collectionName)
......
<?php
/**
* This is the template for generating the model class of a specified table.
* This is the template for generating the model class of a specified collection.
*/
/* @var $this yii\web\View */
/* @var $generator yii\mongodb\gii\model\Generator */
/* @var $collectionName string full table name */
/* @var $collectionName string full collection name */
/* @var $attributes array list of attribute names */
/* @var $className string class name */
/* @var $labels string[] list of attribute labels (name => label) */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment