當前位置: 首頁>>代碼示例>>PHP>>正文


PHP JDatabaseDriver::setDebug方法代碼示例

本文整理匯總了PHP中JDatabaseDriver::setDebug方法的典型用法代碼示例。如果您正苦於以下問題:PHP JDatabaseDriver::setDebug方法的具體用法?PHP JDatabaseDriver::setDebug怎麽用?PHP JDatabaseDriver::setDebug使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在JDatabaseDriver的用法示例。


在下文中一共展示了JDatabaseDriver::setDebug方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testSetDebug

	/**
	 * Tests the JDatabaseDriver::setDebug method.
	 *
	 * @return  void
	 *
	 * @since   12.1
	 */
	public function testSetDebug()
	{
		$this->assertThat(
			$this->db->setDebug(true),
			$this->isType('boolean'),
			'setDebug should return a boolean value containing the previous debug state.'
		);
	}
開發者ID:realityking,項目名稱:joomla-platform,代碼行數:15,代碼來源:JDatabaseDriverTest.php

示例2: getDbo

 /**
  * Get a database object.
  *
  * Returns the global {@link JDatabaseDriver} object, only creating it if it doesn't already exist.
  *
  * @return  JDatabaseDriver
  *
  * @see     JDatabaseDriver
  * @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->setDebug($debug);
     }
     return self::$database;
 }
開發者ID:renzhewk,項目名稱:joomla-platform,代碼行數:21,代碼來源:factory.php

示例3: loadDatabase

 /**
  * Method to create a database driver for the Web application.
  *
  * @return void
  *
  * @since 1.0
  */
 protected function loadDatabase()
 {
     $database = 'sqlite' == $this->get('db_driver') ? APP_PATH_DATA . '/' . $this->get('db_name') : $this->get('db_name');
     $this->db = JDatabaseDriver::getInstance(array('driver' => $this->get('db_driver'), 'host' => $this->get('db_host'), 'user' => $this->get('db_user'), 'password' => $this->get('db_pass'), 'database' => $database, 'prefix' => $this->get('db_prefix')));
     // Select the database.
     if ('sqlite' != $this->get('db_driver')) {
         $this->db->select($this->get('db_name'));
     }
     // Set the debug flag.
     $this->db->setDebug($this->get('debug'));
     // Set the database to our static cache.
     JFactory::$database = $this->db;
 }
開發者ID:cuongnd,項目名稱:etravelservice,代碼行數:20,代碼來源:web.php

示例4: debug

 /**
  * Sets debug level
  *
  * @param  int  $level  New level
  * @return int          Previous level
  */
 public function debug($level)
 {
     return $this->_db->setDebug($level);
 }
開發者ID:bobozhangshao,項目名稱:HeartCare,代碼行數:10,代碼來源:CmsDatabaseDriver.php

示例5: debug

 /**
  * Sets debug level
  * @param int
  */
 function debug($level)
 {
     if (checkJversion() >= 2) {
         $this->_db->setDebug($level);
     } else {
         $this->_db->debug($level);
     }
 }
開發者ID:rogatnev-nikita,項目名稱:cloudinterpreter,代碼行數:12,代碼來源:cb.database.php


注:本文中的JDatabaseDriver::setDebug方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。