/** * @param string $className * @return EmailSpool */ 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 EmailModule $email */ $email = Yii::app()->getModule('email'); self::$db = $email->getDbConnection(); self::$db->setActive(true); return self::$db; }