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


PHP DebugKitDebugger::stopTimer方法代碼示例

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


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

示例1: render

 /**
  * Renders view for given action and layout. If $file is given, that is used
  * for a view filename (e.g. customFunkyView.ctp).
  * Adds timers, for all subsequent rendering, and injects the debugKit toolbar.
  *
  * @param string $action Name of action to render for
  * @param string $layout Layout to use
  * @param string $file Custom filename for view
  * @return string Rendered Element
  */
 function render($action = null, $layout = null, $file = null)
 {
     DebugKitDebugger::startTimer('viewRender', __('Rendering View', true));
     $out = parent::render($action, $layout, $file);
     DebugKitDebugger::stopTimer('viewRender');
     DebugKitDebugger::stopTimer('controllerRender');
     if (isset($this->loaded['toolbar'])) {
         $this->loaded['toolbar']->postRender();
     }
     //Temporary work around to hide the SQL dump at page bottom
     Configure::write('debug', 0);
     return $this->output;
 }
開發者ID:kondrat,項目名稱:agift,代碼行數:23,代碼來源:debug.php

示例2: render

 /**
  * Renders view for given action and layout. If $file is given, that is used
  * for a view filename (e.g. customFunkyView.ctp).
  * Adds timers, for all subsequent rendering, and injects the debugKit toolbar.
  *
  * @param string $action Name of action to render for
  * @param string $layout Layout to use
  * @param string $file Custom filename for view
  * @return string Rendered Element
  */
 function render($action = null, $layout = null, $file = null)
 {
     DebugKitDebugger::startTimer('viewRender', __d('debug_kit', 'Rendering View', true));
     $out = parent::render($action, $layout, $file);
     DebugKitDebugger::stopTimer('viewRender');
     DebugKitDebugger::stopTimer('controllerRender');
     DebugKitDebugger::setMemoryPoint(__d('debug_kit', 'View render complete', true));
     if (empty($this->params['requested']) && isset($this->loaded['toolbar'])) {
         $backend = $this->loaded['toolbar']->getName();
         $this->loaded['toolbar']->{$backend}->send();
     }
     if (empty($this->output)) {
         return $out;
     }
     return $this->output;
 }
開發者ID:ambagasdowa,項目名稱:kml,代碼行數:26,代碼來源:debug.php

示例3: render

 /**
  * Renders view for given action and layout. If $file is given, that is used
  * for a view filename (e.g. customFunkyView.ctp).
  * Adds timers, for all subsequent rendering, and injects the debugKit toolbar.
  *
  * @param string $action Name of action to render for
  * @param string $layout Layout to use
  * @param string $file Custom filename for view
  * @return string Rendered Element
  */
 function render($action = null, $layout = null, $file = null)
 {
     DebugKitDebugger::startTimer('viewRender', __d('debug_kit', 'Rendering View', true));
     $out = parent::render($action, $layout, $file);
     DebugKitDebugger::stopTimer('viewRender');
     DebugKitDebugger::stopTimer('controllerRender');
     DebugKitDebugger::setMemoryPoint(__d('debug_kit', 'View render complete', true));
     if (isset($this->loaded['toolbar'])) {
         $backend = $this->loaded['toolbar']->getName();
         $this->loaded['toolbar']->{$backend}->send();
     }
     if (empty($this->output)) {
         return $out;
     }
     //Temporary work around to hide the SQL dump at page bottom
     Configure::write('debug', 0);
     return $this->output;
 }
開發者ID:predominant,項目名稱:debug_kit,代碼行數:28,代碼來源:debug.php

示例4: afterSave

 /**
  * afterSave, stop the timer started from a save.
  *
  * @param string $Model
  * @param string $created
  * @return void
  */
 public function afterSave(Model $Model, $created)
 {
     DebugKitDebugger::stopTimer($Model->alias . '_save');
     return true;
 }
開發者ID:carriercomm,項目名稱:professional-inventory-and-billing-system,代碼行數:12,代碼來源:TimedBehavior.php

示例5: testGetTimers

 /**
  * test getting all the set timers.
  *
  * @return void
  **/
 function testGetTimers()
 {
     DebugKitDebugger::startTimer('test1', 'this is my first test');
     DebugKitDebugger::stopTimer('test1');
     usleep(50);
     DebugKitDebugger::startTimer('test2');
     DebugKitDebugger::stopTimer('test2');
     $timers = DebugKitDebugger::getTimers();
     $this->assertEqual(count($timers), 3);
     $this->assertTrue(is_float($timers['test1']['time']));
     $this->assertTrue(isset($timers['test1']['message']));
     $this->assertTrue(isset($timers['test2']['message']));
 }
開發者ID:afzet,項目名稱:cake-cart,代碼行數:18,代碼來源:debug_kit_debugger.test.php

示例6: find

 /**
  * Queries the datasource and returns a result set array.
  *
  * @param string $type Type of find operation (all / first / count / neighbors / list / threaded)
  * @param array $query Option fields (conditions / fields / joins / limit / offset / order / page / group / callbacks)
  * @return array Array of records
  * @link http://book.cakephp.org/2.0/en/models/deleting-data.html#deleteall
  */
 public function find($type = 'first', $query = array())
 {
     DebugKitDebugger::startTimer($this->name . '::find(' . $type . ')');
     $results = parent::find($type, $query);
     DebugKitDebugger::stopTimer($this->name . '::find(' . $type . ')');
     return $results;
 }
開發者ID:superstarrajini,項目名稱:cakepackages,代碼行數:15,代碼來源:AppModel.php

示例7: beforeRender

 /**
  * beforeRender callback
  *
  * Calls beforeRender on all the panels and set the aggregate to the controller.
  *
  * @return void
  **/
 function beforeRender(&$controller)
 {
     DebugKitDebugger::stopTimer('controllerAction');
     $vars = array();
     $panels = array_keys($this->panels);
     foreach ($panels as $panelName) {
         $panel =& $this->panels[$panelName];
         $vars[$panelName]['content'] = $panel->beforeRender($controller);
         $elementName = Inflector::underscore($panelName) . '_panel';
         if (isset($panel->elementName)) {
             $elementName = $panel->elementName;
         }
         $vars[$panelName]['elementName'] = $elementName;
         $vars[$panelName]['plugin'] = $panel->plugin;
         $vars[$panelName]['disableTimer'] = true;
     }
     $controller->set(array('debugToolbarPanels' => $vars, 'debugToolbarJavascript' => $this->javascript));
     DebugKitDebugger::startTimer('controllerRender', __('Render Controller Action', true));
 }
開發者ID:TomMaher,項目名稱:umambo,代碼行數:26,代碼來源:toolbar.php

示例8: beforeRender

 /**
  * beforeRender callback
  *
  * Calls beforeRender on all the panels and set the aggregate to the controller.
  *
  * @return void
  **/
 function beforeRender(&$controller)
 {
     DebugKitDebugger::stopTimer('controllerAction');
     $vars = $this->_gatherVars($controller);
     $this->_saveState($controller, $vars);
     $controller->set(array('debugToolbarPanels' => $vars, 'debugToolbarJavascript' => $this->javascript));
     DebugKitDebugger::startTimer('controllerRender', __d('debug_kit', 'Render Controller Action', true));
     DebugKitDebugger::setMemoryPoint(__d('debug_kit', 'Controller render start', true));
 }
開發者ID:sdoney,項目名稱:infinitas,代碼行數:16,代碼來源:toolbar.php

示例9: beforeRender

/**
 * beforeRender callback
 *
 * Calls beforeRender on all the panels and set the aggregate to the controller.
 *
 * @return void
 **/
	public function beforeRender($controller) {
		if (!class_exists('DebugKitDebugger')) {
			return null;
		}
		DebugKitDebugger::stopTimer('controllerAction');
		$vars = $this->_gatherVars($controller);
		$this->_saveState($controller, $vars);

		$controller->set(array('debugToolbarPanels' => $vars, 'debugToolbarJavascript' => $this->javascript));
		DebugKitDebugger::startTimer('controllerRender', __d('debug_kit', 'Render Controller Action'));
		DebugKitDebugger::setMemoryPoint(__d('debug_kit', 'Controller render start'));
	}
開發者ID:neterslandreau,項目名稱:tubones,代碼行數:19,代碼來源:ToolbarComponent.php

示例10: render

/**
 * Renders view for given action and layout.
 * Adds timers, for all subsequent rendering, and injects the debugKit toolbar.
 *
 * @param string $action Name of action to render for
 * @param string $layout Layout to use
 * @return string Rendered Element
 */
	public function render($action = null, $layout = null) {
		DebugKitDebugger::startTimer('viewRender', __d('debug_kit', 'Rendering View'));

		$out = parent::render($action, $layout);

		DebugKitDebugger::stopTimer('viewRender');
		DebugKitDebugger::stopTimer('controllerRender');
		DebugKitDebugger::setMemoryPoint(__d('debug_kit', 'View render complete'));

		if (empty($this->request->params['requested']) && $this->Helpers->attached('Toolbar')) {
			$backend = $this->Helpers->Toolbar->getName();
			$this->Helpers->Toolbar->{$backend}->send();
		}
		if (empty($this->output)) {
			return $out;
		}
		return $this->output;
	}
開發者ID:neterslandreau,項目名稱:tubones,代碼行數:26,代碼來源:DebugView.php


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