Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | 4 | public function __construct(CDbCriteria $criteria, $table, $chunkSize) |
|
11 | { |
||
12 | 4 | $command = Yii::app()->db->commandBuilder->createFindCommand($table, $criteria); |
|
13 | 4 | $count = Yii::app()->db->commandBuilder->createCountCommand($table, $criteria)->queryScalar(); |
|
14 | |||
15 | 4 | $dataProvider = new CSqlDataProvider($command, array('params' => $criteria->params, 'totalItemCount' => $count)); |
|
16 | |||
17 | 4 | parent::__construct($dataProvider, $chunkSize); |
|
18 | } |
||
19 | } |