original_string: public static function getDbo()
  	{
  		if (!self::$database)
  		{
  			//get config values
  
  			$host = Config::get()->get('database.host');
  			$user = Config::get()->get('database.user');
  			$password = Config::get()->get('database.password');
  			$database = Config::get()->get('database.name');
  			$prefix = Config::get()->get('database.prefix');
  			$driver = Config::get()->get('database.driver');
  			$debug = Config::get()->get('database.debug');
  
  			//added extra code to prevent error when $driver is incorrect
  
  			$options = array('driver' => $driver, 'host' => $host, 'user' => $user, 'password' => $password, 'database' => $database, 'prefix' => $prefix);
  
  			self::$database = DatabaseFactory::getInstance()->getDriver($driver, $options);
  
  			//get the debug configuration setting
  			self::$database->setDebug(Config::get()->get('debug'));
  		}
  		return self::$database;
  	}
code: public static function getDbo()
  	{
  		if (!self::$database)
  		{
  			//get config values
  
  			$host = Config::get()->get('database.host');
  			$user = Config::get()->get('database.user');
  			$password = Config::get()->get('database.password');
  			$database = Config::get()->get('database.name');
  			$prefix = Config::get()->get('database.prefix');
  			$driver = Config::get()->get('database.driver');
  			$debug = Config::get()->get('database.debug');
  
  			//added extra code to prevent error when $driver is incorrect
  
  			$options = array('driver' => $driver, 'host' => $host, 'user' => $user, 'password' => $password, 'database' => $database, 'prefix' => $prefix);
  
  			self::$database = DatabaseFactory::getInstance()->getDriver($driver, $options);
  
  			//get the debug configuration setting
  			self::$database->setDebug(Config::get()->get('debug'));
  		}
  		return self::$database;
  	}
code_tokens: public static function getDbo ( ) { if ( ! self :: $ database ) { //get config values $ host = Config :: get ( ) -> get ( 'database.host' ) ; $ user = Config :: get ( ) -> get ( 'database.user' ) ; $ password = Config :: get ( ) -> get ( 'database.password' ) ; $ database = Config :: get ( ) -> get ( 'database.name' ) ; $ prefix = Config :: get ( ) -> get ( 'database.prefix' ) ; $ driver = Config :: get ( ) -> get ( 'database.driver' ) ; $ debug = Config :: get ( ) -> get ( 'database.debug' ) ; //added extra code to prevent error when $driver is incorrect $ options = array ( 'driver' => $ driver , 'host' => $ host , 'user' => $ user , 'password' => $ password , 'database' => $ database , 'prefix' => $ prefix ) ; self :: $ database = DatabaseFactory :: getInstance ( ) -> getDriver ( $ driver , $ options ) ; //get the debug configuration setting self :: $ database -> setDebug ( Config :: get ( ) -> get ( 'debug' ) ) ; } return self :: $ database ; }
docstring: Get a database object.
  
  Returns the global {@link Driver} object, only creating it if it doesn't already exist.
  
  @return  DatabaseDriver
docstring_tokens: Get a database object .