Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function truncateModels($modelsToTruncate) { |
||
32 | foreach ($modelsToTruncate as $modelName) { |
||
33 | $this->_shell->out(__('Truncate model %s...', $modelName), 1, Shell::VERBOSE); |
||
34 | $model = ClassRegistry::init($modelName); |
||
35 | $datasource = $model->getDataSource(); |
||
36 | $datasource->truncate($model->tablePrefix . $model->useTable); |
||
37 | } |
||
38 | } |
||
39 | } |