Browse Source

phpDoc updated

tags/2.0.7
githubjeka 9 years ago
parent
commit
2b6ceb1eb7
  1. 5
      framework/db/ActiveQuery.php
  2. 2
      framework/db/ActiveQueryInterface.php
  3. 2
      framework/db/ActiveQueryTrait.php

5
framework/db/ActiveQuery.php

@ -366,7 +366,7 @@ class ActiveQuery extends Query implements ActiveQueryInterface
* Order::find()->joinWith('books', true, 'INNER JOIN')->all(); * Order::find()->joinWith('books', true, 'INNER JOIN')->all();
* // find all orders, eager loading "books", and sort the orders and books by the book names. * // find all orders, eager loading "books", and sort the orders and books by the book names.
* Order::find()->joinWith([ * Order::find()->joinWith([
* 'books' => function ($query) { * 'books' => function (\yii\db\ActiveQuery $query) {
* $query->orderBy('item.name'); * $query->orderBy('item.name');
* } * }
* ])->all(); * ])->all();
@ -622,7 +622,8 @@ class ActiveQuery extends Query implements ActiveQueryInterface
* ```php * ```php
* public function getActiveUsers() * public function getActiveUsers()
* { * {
* return $this->hasMany(User::className(), ['id' => 'user_id'])->onCondition(['active' => true]); * return $this->hasMany(User::className(), ['id' => 'user_id'])
* ->onCondition(['active' => true]);
* } * }
* ``` * ```
* *

2
framework/db/ActiveQueryInterface.php

@ -68,7 +68,7 @@ interface ActiveQueryInterface extends QueryInterface
* Customer::find()->with('orders.address')->all(); * Customer::find()->with('orders.address')->all();
* // find customers together with their country and orders of status 1 * // find customers together with their country and orders of status 1
* Customer::find()->with([ * Customer::find()->with([
* 'orders' => function ($query) { * 'orders' => function (\yii\db\ActiveQueryInterface $query) {
* $query->andWhere('status = 1'); * $query->andWhere('status = 1');
* }, * },
* 'country', * 'country',

2
framework/db/ActiveQueryTrait.php

@ -62,7 +62,7 @@ trait ActiveQueryTrait
* Customer::find()->with('orders.address')->all(); * Customer::find()->with('orders.address')->all();
* // find customers together with their country and orders of status 1 * // find customers together with their country and orders of status 1
* Customer::find()->with([ * Customer::find()->with([
* 'orders' => function ($query) { * 'orders' => function (\yii\db\ActiveQueryInterface $query) {
* $query->andWhere('status = 1'); * $query->andWhere('status = 1');
* }, * },
* 'country', * 'country',

Loading…
Cancel
Save