protected function getDb()
    {
        if (isset($this->_db)) {
            return $this->_db;
        } else {
            if (($db = Yii::app()->getComponent($this->connectionID)) === null) {
                throw new CException(sprintf(
                    'Failed to get database connection. Component %s not found.',
                    $this->connectionID
                ));
            }
            return $this->_db = $db;
        }
    }
protected function getDb()
    {
        if (isset($this->_db)) {
            return $this->_db;
        } else {
            if (($db = Yii::app()->getComponent($this->connectionID)) === null) {
                throw new CException(sprintf(
                    'Failed to get database connection. Component %s not found.',
                    $this->connectionID
                ));
            }
            return $this->_db = $db;
        }
    }
protected function getDb ( ) { if ( isset ( $ this -> _db ) ) { return $ this -> _db ; } else { if ( ( $ db = Yii :: app ( ) -> getComponent ( $ this -> connectionID ) ) === null ) { throw new CException ( sprintf ( 'Failed to get database connection. Component %s not found.' , $ this -> connectionID ) ) ; } return $ this -> _db = $ db ; } }
Returns the database connection component.
@return CDbConnection the component.
@throws CException if the component is not found.
Returns the database connection component .