当前位置: 首页>>代码示例>>PHP>>正文


PHP Debug::addTimingPoint方法代码示例

本文整理汇总了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');
  }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:29,代码来源:ImageCacheFilter.class.php

示例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();
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:SimplePermissionsAuthenticationFilter.class.php

示例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');
  }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:28,代码来源:FullPageCacheFilter.class.php

示例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();
  }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:33,代码来源:LocaleDefinitionFilter.class.php

示例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();
  }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:10,代码来源:SessionStartupFilter.class.php

示例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');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:13,代码来源:LoggingFilter.class.php

示例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');
  }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:15,代码来源:SiteObjectController.class.php

示例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();
  }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:15,代码来源:SiteObjectControllerFilter.class.php

示例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()
  {
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:LimbApplication.class.php


注:本文中的Debug::addTimingPoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。