/** * Get a database object * * Returns a reference to the global {@link JDatabase} object, only creating it * if it doesn't already exist. * * @return object JDatabase */ public static function &getDBO() { static $instance; if (!is_object($instance)) { //get the debug configuration setting $conf =& JFactory::getConfig(); $debug = $conf->getValue('config.debug'); $instance = JFactory::_createDBO(); $instance->debug($debug); } return $instance; }