本文整理汇总了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
}
示例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);
}
示例3: _activateFirebug
/**
* Firebug activation
*/
private function _activateFirebug()
{
$oProfiler = new Zend_Db_Profiler_Firebug('DB Queries');
$oProfiler->setEnabled(true);
$this->oDb->setProfiler($oProfiler);
}