Skip to content

Commit

Permalink
Fixed PHPDoc.
Browse files Browse the repository at this point in the history
  • Loading branch information
romeOz committed May 29, 2015
1 parent 85fd713 commit 71aa1ef
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/ActiveDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

/**
* ActiveDataProvider implements a data provider based on {@see \rock\sphinx\Query} and {@see \rock\sphinx\ActiveQuery}.
* ActiveDataProvider provides data by performing DB queries using {@see \rock\db\ActiveDataProvider::$query }.
* ActiveDataProvider provides data by performing DB queries using {@see \rock\db\common\ActiveDataProvider::$query }.
* And the following example shows how to use ActiveDataProvider without ActiveRecord:
*
* ```php
Expand Down
8 changes: 4 additions & 4 deletions src/ActiveQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
*
* ActiveQuery also provides the following additional query options:
*
* - {@see \rock\db\ActiveQueryInterface::with()}: list of relations that this query should be performed with.
* - {@see \rock\db\ActiveQueryInterface::indexBy()}: the name of the column by which the query result should be indexed.
* - {@see \rock\db\ActiveQueryInterface::asArray()}: whether to return each record as an array.
* - {@see \rock\db\common\ActiveQueryInterface::with()}: list of relations that this query should be performed with.
* - {@see \rock\db\common\ActiveQueryInterface::indexBy()}: the name of the column by which the query result should be indexed.
* - {@see \rock\db\common\ActiveQueryInterface::asArray()}: whether to return each record as an array.
*
* These options can be configured using methods of the same name. For example:
*
Expand Down Expand Up @@ -68,7 +68,7 @@
* A relation is specified by {@see \rock\db\ActiveRelationTrait::$link} which represents the association between columns
* of different tables; and the multiplicity of the relation is indicated by {@see \rock\db\ActiveRelationTrait::$multiple}.
*
* If a relation involves a pivot table, it may be specified by {@see \rock\db\ActiveQueryInterface::via()}.
* If a relation involves a pivot table, it may be specified by {@see \rock\db\common\ActiveQueryInterface::via()}.
* This methods may only be called in a relational context. Same is true for {@see \rock\db\ActiveRelationTrait::inverseOf()}, which
* marks a relation as inverse of another relation.
*/
Expand Down
30 changes: 15 additions & 15 deletions src/ActiveRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,16 +322,16 @@ public function attributes()
* 1. call {@see \rock\components\Model::beforeValidate()} when `$runValidation` is true. If validation
* fails, it will skip the rest of the steps;
* 2. call {@see \rock\components\Model::afterValidate()} when `$runValidation` is true.
* 3. call {@see \rock\db\BaseActiveRecord::beforeSave()}. If the method returns false, it will skip the
* 3. call {@see \rock\db\common\BaseActiveRecord::beforeSave()}. If the method returns false, it will skip the
* rest of the steps;
* 4. insert the record into index. If this fails, it will skip the rest of the steps;
* 5. call {@see \rock\db\BaseActiveRecord::afterSave()};
* 5. call {@see \rock\db\common\BaseActiveRecord::afterSave()};
*
* In the above step 1, 2, 3 and 5, events {@see \rock\components\Model::EVENT_BEFORE_VALIDATE},
* {@see \rock\db\BaseActiveRecord::EVENT_BEFORE_INSERT}, {@see \rock\db\BaseActiveRecord::EVENT_AFTER_INSERT} and {@see \rock\components\Model::EVENT_AFTER_VALIDATE}
* {@see \rock\db\common\BaseActiveRecord::EVENT_BEFORE_INSERT}, {@see \rock\db\common\BaseActiveRecord::EVENT_AFTER_INSERT} and {@see \rock\components\Model::EVENT_AFTER_VALIDATE}
* will be raised by the corresponding methods.
*
* Only the {@see \rock\db\BaseActiveRecord::$dirtyAttributes}(changed attribute values) will be inserted.
* Only the {@see \rock\db\common\BaseActiveRecord::$dirtyAttributes}(changed attribute values) will be inserted.
*
* For example, to insert an article record:
*
Expand Down Expand Up @@ -412,16 +412,16 @@ private function insertInternal(array $attributes = null)
* 1. call {@see \rock\components\Model::beforeValidate()} when `$runValidation` is true. If validation
* fails, it will skip the rest of the steps;
* 2. call {@see \rock\components\Model::afterValidate()} when `$runValidation` is true.
* 3. call {@see \rock\db\BaseActiveRecord::beforeSave()}. If the method returns false, it will skip the
* 3. call {@see \rock\db\common\BaseActiveRecord::beforeSave()}. If the method returns false, it will skip the
* rest of the steps;
* 4. save the record into index. If this fails, it will skip the rest of the steps;
* 5. call {@see \rock\db\BaseActiveRecord::afterSave()};
* 5. call {@see \rock\db\common\BaseActiveRecord::afterSave()};
*
* In the above step 1, 2, 3 and 5, events {@see \rock\components\Model::EVENT_BEFORE_VALIDATE},
* {@see \rock\db\BaseActiveRecord::EVENT_BEFORE_UPDATE}, {@see \rock\db\BaseActiveRecord::EVENT_AFTER_UPDATE} and {@see \rock\components\Model::EVENT_AFTER_VALIDATE}
* {@see \rock\db\common\BaseActiveRecord::EVENT_BEFORE_UPDATE}, {@see \rock\db\common\BaseActiveRecord::EVENT_AFTER_UPDATE} and {@see \rock\components\Model::EVENT_AFTER_VALIDATE}
* will be raised by the corresponding methods.
*
* Only the {@see \rock\db\BaseActiveRecord::$dirtyAttributes}(changed attribute values) will be saved into database.
* Only the {@see \rock\db\common\BaseActiveRecord::$dirtyAttributes}(changed attribute values) will be saved into database.
*
* For example, to update an article record:
*
Expand Down Expand Up @@ -449,8 +449,8 @@ private function insertInternal(array $attributes = null)
* @param array $attributeNames list of attributes that need to be saved. Defaults to null,
* meaning all attributes that are loaded from DB will be saved.
* @return integer|boolean the number of rows affected, or false if validation fails
* or {@see \rock\db\BaseActiveRecord::beforeSave()} stops the updating process.
* @throws SphinxException if {@see \rock\db\BaseActiveRecord::optimisticLock()}(optimistic locking) is enabled and the data
* or {@see \rock\db\common\BaseActiveRecord::beforeSave()} stops the updating process.
* @throws SphinxException if {@see \rock\db\common\BaseActiveRecord::optimisticLock()}(optimistic locking) is enabled and the data
* being updated is outdated.
* @throws \Exception in case update failed.
*/
Expand Down Expand Up @@ -549,17 +549,17 @@ protected function updateInternal(array $attributes = null)
*
* This method performs the following steps in order:
*
* 1. call {@see \rock\db\BaseActiveRecord::beforeDelete()}. If the method returns false, it will skip the
* 1. call {@see \rock\db\common\BaseActiveRecord::beforeDelete()}. If the method returns false, it will skip the
* rest of the steps;
* 2. delete the record from the index;
* 3. call {@see \rock\db\BaseActiveRecord::afterDelete()}.
* 3. call {@see \rock\db\common\BaseActiveRecord::afterDelete()}.
*
* In the above step 1 and 3, events named {@see \rock\db\BaseActiveRecord::EVENT_BEFORE_DELETE} and {@see \rock\db\BaseActiveRecord::EVENT_AFTER_DELETE}
* In the above step 1 and 3, events named {@see \rock\db\common\BaseActiveRecord::EVENT_BEFORE_DELETE} and {@see \rock\db\common\BaseActiveRecord::EVENT_AFTER_DELETE}
* will be raised by the corresponding methods.
*
* @return integer|boolean the number of rows deleted, or false if the deletion is unsuccessful for some reason.
* Note that it is possible the number of rows deleted is 0, even though the deletion execution is successful.
* @throws SphinxException if {@see \rock\db\BaseActiveRecord::optimisticLock()}(optimistic locking) is enabled and the data
* @throws SphinxException if {@see \rock\db\common\BaseActiveRecord::optimisticLock()}(optimistic locking) is enabled and the data
* being deleted is outdated.
* @throws \Exception in case delete failed.
*/
Expand Down Expand Up @@ -604,7 +604,7 @@ public function delete()
/**
* Returns a value indicating whether the given active record is the same as the current one.
* The comparison is made by comparing the index names and the primary key values of the two active records.
* If one of the records {@see \rock\db\BaseActiveRecord::$isNewRecord}(is new) they are also considered not equal.
* If one of the records {@see \rock\db\common\BaseActiveRecord::$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 index.
*/
Expand Down

0 comments on commit 71aa1ef

Please sign in to comment.