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


PHP Zend_Db_Adapter_Abstract::setProfiler方法代碼示例

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


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

示例1: __construct

 public function __construct()
 {
     $this->_db = XenForo_Application::getDb();
     $this->_importModel = XenForo_Model::create('XenForo_Model_Import');
     $this->_db->setProfiler(false);
     // this causes lots of memory usage in debug mode, so stop that
 }
開發者ID:namgiangle90,項目名稱:tokyobaito,代碼行數:7,代碼來源:Abstract.php

示例2: setProfiler

 /**
  * Set the adapter's profiler object.
  *
  * The argument may be a boolean, an associative array, an instance of
  * Zend_Db_Profiler, or an instance of Zend_Config.
  *
  * A boolean argument sets the profiler to enabled if true, or disabled if
  * false.  The profiler class is the adapter's default profiler class,
  * Zend_Db_Profiler.
  *
  * An instance of Zend_Db_Profiler sets the adapter's instance to that
  * object.  The profiler is enabled and disabled separately.
  *
  * An associative array argument may contain any of the keys 'enabled',
  * 'class', and 'instance'. The 'enabled' and 'instance' keys correspond to the
  * boolean and object types documented above. The 'class' key is used to name a
  * class to use for a custom profiler. The class must be Zend_Db_Profiler or a
  * subclass. The class is instantiated with no constructor arguments. The 'class'
  * option is ignored when the 'instance' option is supplied.
  *
  * An object of type Zend_Config may contain the properties 'enabled', 'class', and
  * 'instance', just as if an associative array had been passed instead.
  *
  * @param Zend_Db_Profiler|Zend_Config|array|boolean $profiler db profiler
  * @return Zend_Db_Adapter_Abstract Provides a fluent interface
  * @throws Zend_Db_Profiler_Exception if the object instance or class specified
  *         is not Zend_Db_Profiler or an extension of that class.
  */
 public function setProfiler($profiler)
 {
     return $this->_adapter->setProfiler($profiler);
 }
開發者ID:cwcw,項目名稱:cms,代碼行數:32,代碼來源:Abstract.php

示例3: _activateFirebug

 /**
  * Firebug activation
  */
 private function _activateFirebug()
 {
     $oProfiler = new Zend_Db_Profiler_Firebug('DB Queries');
     $oProfiler->setEnabled(true);
     $this->oDb->setProfiler($oProfiler);
 }
開發者ID:pansot2,項目名稱:PadCMS-backend,代碼行數:9,代碼來源:Action.php


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