本文整理汇总了PHP中Debug::addTimingPoint方法的典型用法代码示例。如果您正苦于以下问题:PHP Debug::addTimingPoint方法的具体用法?PHP Debug::addTimingPoint怎么用?PHP Debug::addTimingPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Debug
的用法示例。
在下文中一共展示了Debug::addTimingPoint方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public function run($filter_chain, $request, $response)
{
if(!$this->_isCachingEnabled())
{
$filter_chain->next();
return;
}
$cache = $this->_getImageCacheManager();
$cache->setUri($request->getUri());
ob_start();
$filter_chain->next();
if($response->fileSent())
return;
Debug :: addTimingPoint('image cache started');
if($content = $response->getResponseString())
{
//by reference
$cache->processContent($content);
$response->write($content);
}
Debug :: addTimingPoint('image cache write finished');
}
示例2: run
public function run($filter_chain, $request, $response)
{
Debug::addTimingPoint('authentication filter started');
$this->initializeUser();
$toolkit = Limb::toolkit();
$datasource = $toolkit->getDatasource('RequestedObjectDatasource');
if (!($node = $datasource->mapRequestToNode($request))) {
$this->process404Error($request, $response);
$filter_chain->next();
return;
}
$behaviour = $this->getBehaviourByObjectId($node['object_id']);
$controller = $this->_getController($behaviour);
if (!($action = $controller->getRequestedAction())) {
$this->process404Error($request, $response);
$filter_chain->next();
return;
}
$datasource->setRequest($request);
if (!($object_data = $datasource->fetch())) {
$response->redirect('/root/login?redirect=' . urlencode($_SERVER['REQUEST_URI']));
return;
}
$authoriser = Limb::toolkit()->getAuthorizer();
$authoriser->assignActionsToObjects($object_data);
if (!isset($object_data['actions']) || !isset($object_data['actions'][$action])) {
$response->redirect('/root/login?redirect=' . urlencode($_SERVER['REQUEST_URI']));
return;
}
$filter_chain->next();
}
示例3: run
public function run($filter_chain, $request, $response)
{
if(!$this->_isCachingEnabled())
{
$filter_chain->next();
return;
}
Debug :: addTimingPoint('full page cache started');
$cache = $this->_getFullPacheCacheManager();
$cache->setRequest($request);
if($contents = $cache->get())
{
Debug :: addTimingPoint('full page cache read finished');
$response->write($contents);
return;
}
$filter_chain->next();
$cache->write($response->getResponseString());
Debug :: addTimingPoint('full page cache write finished');
}
示例4: run
public function run($filter_chain, $request, $response)
{
$toolkit = Limb :: toolkit();
Debug :: addTimingPoint('locale filter started');
$toolkit->getLocale()->setlocale();
$datasource = $toolkit->getDatasource('RequestedObjectDatasource');
if(!$node = $datasource->mapRequestToNode($request))
{
$toolkit->define('CONTENT_LOCALE_ID', DEFAULT_CONTENT_LOCALE_ID);
$toolkit->define('MANAGEMENT_LOCALE_ID', DEFAULT_CONTENT_LOCALE_ID);
$filter_chain->next();
return;
}
if($object_locale_id = $this->_findSiteObjectLocaleId($node['object_id']))
$toolkit->define('CONTENT_LOCALE_ID', $object_locale_id);
else
$toolkit->define('CONTENT_LOCALE_ID', DEFAULT_CONTENT_LOCALE_ID);
if($user_locale_id = $toolkit->getUser()->get('locale_id'))
$toolkit->define('MANAGEMENT_LOCALE_ID', $user_locale_id);
else
$toolkit->define('MANAGEMENT_LOCALE_ID', $toolkit->constant('CONTENT_LOCALE_ID'));
Debug :: addTimingPoint('locale filter finished');
$filter_chain->next();
}
示例5: run
public function run($filter_chain, $request, $response)
{
Debug :: addTimingPoint('session startup filter started');
Limb :: toolkit()->getSession()->start();
Debug :: addTimingPoint('session startup filter finished');
$filter_chain->next();
}
示例6: run
public function run($filter_chain, $request, $response)
{
$filter_chain->next();
Debug::addTimingPoint('logging filter started');
$datasource = Limb::toolkit()->getDatasource('RequestedObjectDatasource');
$datasource->setRequest($request);
$object = wrapWithSiteObject($datasource->fetch());
$controller = $object->getController();
include_once dirname(__FILE__) . '/../StatsRegister.class.php';
$stats_register = new StatsRegister();
$stats_register->register($object->getNodeId(), $controller->getAction($request), $request->getStatus());
Debug::addTimingPoint('logging filter finished');
}
示例7: _performAction
protected function _performAction($request)
{
if(!$action = $this->getRequestedAction($request))
throw new LimbException('action not defined in state machine',
array('action' => $action,
'class' => get_class($this->behaviour)));
$state_machine = $this->_getStateMachine();
call_user_func(array($this->behaviour, 'define_' . $action), $state_machine);
$state_machine->run();
Debug :: addTimingPoint('action performed');
}
示例8: run
public function run($filter_chain, $request, $response)
{
Debug :: addTimingPoint('site object controller filter started');
$datasource = Limb :: toolkit()->getDatasource('RequestedObjectDatasource');
$datasource->setRequest($request);
$site_object = wrapWithSiteObject($datasource->fetch());
$site_object->getController()->process($request);
Debug :: addTimingPoint('site object controller filter finished');
$filter_chain->next();
}
示例9: addTimingPoint
<?php
/**********************************************************************************
* Copyright 2004 BIT, Ltd. http://limb-project.com, mailto: support@limb-project.com
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/
require_once(LIMB_DIR . '/core/error/Debug.class.php');
Debug :: addTimingPoint('start');
require_once(LIMB_DIR . '/core/Limb.class.php');
require_once(LIMB_DIR . '/core/file_resolvers/file_resolvers_registry.inc.php');
require_once(LIMB_DIR . '/core/filters/FilterChain.class.php');
require_once(LIMB_DIR . '/core/etc/limb_util.inc.php');
require_once(LIMB_DIR . '/core/etc/MessageBox.class.php');
class LimbApplication
{
function _loadPackages()
{
include_once(LIMB_DIR . '/core/PackagesInfo.class.php');
$inst =& PackagesInfo :: instance();
$inst->loadPackages();
}
function _createToolkit()
{