setMongoDBComponent(Yii::app()->getComponent('mongodb_data')); parent::__construct($scenario); } public static function model($className=__CLASS__) { return parent::model($className); } public function getCollectionName() { return 'variable'; } public function parseRow($row,$output=array()){ $newRow = array(); $newRow['key'] = (string)$row['_id']; $newRow['value'] = CommonFn::get_val_if_isset($row,'value',0); return $this->output($newRow,$output); } }