Example #1
0
 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.'));
         }
     }
 }
Example #2
0
 /**
  * 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);
 }