/** * Returns the static model of the specified AR class. * @param string $className * @return AccountUser the static model class */ public static function model($className = __CLASS__) { return parent::model($className); }
/** * @throws CDbException * @return CDbConnection */ public function getDbConnection() { if (self::$db !== null) { return self::$db; } /** @var AccountModule $account */ $account = Yii::app()->getModule('account'); self::$db = $account->getDbConnection(); self::$db->setActive(true); return self::$db; }