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


PHP DebugKitDebugger::setMemoryPoint方法代碼示例

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


在下文中一共展示了DebugKitDebugger::setMemoryPoint方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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', __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

示例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 (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

示例3: testMemorySettingAndGetting

 /**
  * test making memory use markers.
  *
  * @return void
  **/
 function testMemorySettingAndGetting()
 {
     $result = DebugKitDebugger::setMemoryPoint('test marker');
     $this->assertTrue($result);
     $result = DebugKitDebugger::getMemoryPoints(true);
     $this->assertEqual(count($result), 1);
     $this->assertTrue(isset($result['test marker']));
     $this->assertTrue(is_numeric($result['test marker']));
     $result = DebugKitDebugger::getMemoryPoints();
     $this->assertTrue(empty($result));
     DebugKitDebugger::setMemoryPoint('test marker');
     DebugKitDebugger::setMemoryPoint('test marker');
     $result = DebugKitDebugger::getMemoryPoints();
     $this->assertEqual(count($result), 2);
     $this->assertTrue(isset($result['test marker']));
     $this->assertTrue(isset($result['test marker #2']));
 }
開發者ID:afzet,項目名稱:cake-cart,代碼行數:22,代碼來源:debug_kit_debugger.test.php

示例4: 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

示例5: 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

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