Commit 2f4a09ef by Carsten Brandt

phpdoc

parent be78c434
...@@ -21,7 +21,7 @@ use yii\base\Component; ...@@ -21,7 +21,7 @@ use yii\base\Component;
* *
* For example, * For example,
* *
* ~~~ * ```php
* $query = new Query; * $query = new Query;
* // compose the query * // compose the query
* $query->select('id, name') * $query->select('id, name')
...@@ -33,7 +33,7 @@ use yii\base\Component; ...@@ -33,7 +33,7 @@ use yii\base\Component;
* $command = $query->createCommand(); * $command = $query->createCommand();
* // $command->sql returns the actual SQL * // $command->sql returns the actual SQL
* $rows = $command->queryAll(); * $rows = $command->queryAll();
* ~~~ * ```
* *
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @author Carsten Brandt <mail@cebe.cc> * @author Carsten Brandt <mail@cebe.cc>
......
...@@ -65,7 +65,7 @@ trait QueryTrait ...@@ -65,7 +65,7 @@ trait QueryTrait
* } * }
* ~~~ * ~~~
* *
* @return static the query object itself * @return static the query object itself.
*/ */
public function indexBy($column) public function indexBy($column)
{ {
...@@ -79,7 +79,7 @@ trait QueryTrait ...@@ -79,7 +79,7 @@ trait QueryTrait
* See [[QueryInterface::where()]] for detailed documentation. * See [[QueryInterface::where()]] for detailed documentation.
* *
* @param string|array $condition the conditions that should be put in the WHERE part. * @param string|array $condition the conditions that should be put in the WHERE part.
* @return static the query object itself * @return static the query object itself.
* @see andWhere() * @see andWhere()
* @see orWhere() * @see orWhere()
*/ */
...@@ -94,7 +94,7 @@ trait QueryTrait ...@@ -94,7 +94,7 @@ trait QueryTrait
* The new condition and the existing one will be joined using the 'AND' operator. * The new condition and the existing one will be joined using the 'AND' operator.
* @param string|array $condition the new WHERE condition. Please refer to [[where()]] * @param string|array $condition the new WHERE condition. Please refer to [[where()]]
* on how to specify this parameter. * on how to specify this parameter.
* @return static the query object itself * @return static the query object itself.
* @see where() * @see where()
* @see orWhere() * @see orWhere()
*/ */
...@@ -113,7 +113,7 @@ trait QueryTrait ...@@ -113,7 +113,7 @@ trait QueryTrait
* The new condition and the existing one will be joined using the 'OR' operator. * The new condition and the existing one will be joined using the 'OR' operator.
* @param string|array $condition the new WHERE condition. Please refer to [[where()]] * @param string|array $condition the new WHERE condition. Please refer to [[where()]]
* on how to specify this parameter. * on how to specify this parameter.
* @return static the query object itself * @return static the query object itself.
* @see where() * @see where()
* @see andWhere() * @see andWhere()
*/ */
...@@ -149,7 +149,7 @@ trait QueryTrait ...@@ -149,7 +149,7 @@ trait QueryTrait
* *
* @param array $condition the conditions that should be put in the WHERE part. * @param array $condition the conditions that should be put in the WHERE part.
* See [[where()]] on how to specify this parameter. * See [[where()]] on how to specify this parameter.
* @return static the query object itself * @return static the query object itself.
* @see where() * @see where()
* @see andFilterWhere() * @see andFilterWhere()
* @see orFilterWhere() * @see orFilterWhere()
...@@ -173,7 +173,7 @@ trait QueryTrait ...@@ -173,7 +173,7 @@ trait QueryTrait
* *
* @param array $condition the new WHERE condition. Please refer to [[where()]] * @param array $condition the new WHERE condition. Please refer to [[where()]]
* on how to specify this parameter. * on how to specify this parameter.
* @return static the query object itself * @return static the query object itself.
* @see filterWhere() * @see filterWhere()
* @see orFilterWhere() * @see orFilterWhere()
*/ */
...@@ -196,7 +196,7 @@ trait QueryTrait ...@@ -196,7 +196,7 @@ trait QueryTrait
* *
* @param array $condition the new WHERE condition. Please refer to [[where()]] * @param array $condition the new WHERE condition. Please refer to [[where()]]
* on how to specify this parameter. * on how to specify this parameter.
* @return static the query object itself * @return static the query object itself.
* @see filterWhere() * @see filterWhere()
* @see andFilterWhere() * @see andFilterWhere()
*/ */
...@@ -305,14 +305,14 @@ trait QueryTrait ...@@ -305,14 +305,14 @@ trait QueryTrait
/** /**
* Sets the ORDER BY part of the query. * Sets the ORDER BY part of the query.
* @param string|array $columns the columns (and the directions) to be ordered by. * @param string|array $columns the columns (and the directions) to be ordered by.
* Columns can be specified in either a string (e.g. "id ASC, name DESC") or an array * Columns can be specified in either a string (e.g. `"id ASC, name DESC"`) or an array
* (e.g. `['id' => SORT_ASC, 'name' => SORT_DESC]`). * (e.g. `['id' => SORT_ASC, 'name' => SORT_DESC]`).
* The method will automatically quote the column names unless a column contains some parenthesis * The method will automatically quote the column names unless a column contains some parenthesis
* (which means the column contains a DB expression). * (which means the column contains a DB expression).
* Note that if your order-by is an expression containing commas, you should always use an array * Note that if your order-by is an expression containing commas, you should always use an array
* to represent the order-by information. Otherwise, the method will not be able to correctly determine * to represent the order-by information. Otherwise, the method will not be able to correctly determine
* the order-by columns. * the order-by columns.
* @return static the query object itself * @return static the query object itself.
* @see addOrderBy() * @see addOrderBy()
*/ */
public function orderBy($columns) public function orderBy($columns)
...@@ -328,7 +328,7 @@ trait QueryTrait ...@@ -328,7 +328,7 @@ trait QueryTrait
* (e.g. `['id' => SORT_ASC, 'name' => SORT_DESC]`). * (e.g. `['id' => SORT_ASC, 'name' => SORT_DESC]`).
* The method will automatically quote the column names unless a column contains some parenthesis * The method will automatically quote the column names unless a column contains some parenthesis
* (which means the column contains a DB expression). * (which means the column contains a DB expression).
* @return static the query object itself * @return static the query object itself.
* @see orderBy() * @see orderBy()
*/ */
public function addOrderBy($columns) public function addOrderBy($columns)
...@@ -363,7 +363,7 @@ trait QueryTrait ...@@ -363,7 +363,7 @@ trait QueryTrait
/** /**
* Sets the LIMIT part of the query. * Sets the LIMIT part of the query.
* @param integer $limit the limit. Use null or negative value to disable limit. * @param integer $limit the limit. Use null or negative value to disable limit.
* @return static the query object itself * @return static the query object itself.
*/ */
public function limit($limit) public function limit($limit)
{ {
...@@ -374,7 +374,7 @@ trait QueryTrait ...@@ -374,7 +374,7 @@ trait QueryTrait
/** /**
* Sets the OFFSET part of the query. * Sets the OFFSET part of the query.
* @param integer $offset the offset. Use null or negative value to disable offset. * @param integer $offset the offset. Use null or negative value to disable offset.
* @return static the query object itself * @return static the query object itself.
*/ */
public function offset($offset) public function offset($offset)
{ {
......
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