/**
  * Get a database object.
  *
  * Returns the global {@link JDatabase} object, only creating it if it doesn't already exist.
  *
  * @return  JDatabase object
  *
  * @see     JDatabase
  * @since   11.1
  */
 public static function getDbo()
 {
     if (!self::$database) {
         //get the debug configuration setting
         $conf = self::getConfig();
         $debug = $conf->get('debug');
         self::$database = self::_createDbo();
         self::$database->debug($debug);
     }
     return self::$database;
 }
 /**
  * Sets debug level
  * @param int
  */
 function debug($level)
 {
     if (checkJversion() >= 2) {
         $this->_db->setDebug($level);
     } else {
         $this->_db->debug($level);
     }
 }