protected static function getDatos1DbConnection() { if (self::$db1 !== null) { return self::$db1; } else { self::$db1 = Yii::app()->db1; if (self::$db1 instanceof CDbConnection) { self::$db1->setActive(true); return self::$db1; } else { throw new CDbException(Yii::t('yii', 'Active Record requires a "db1" CDbConnection application component.')); } } }
/** * Returns the static model of the specified AR class. * @param string $className active record class name. * @return Estudios the static model class */ public static function model($className = __CLASS__) { return parent::model($className); }