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


PHP debug::add_timing_point方法代码示例

本文整理汇总了PHP中debug::add_timing_point方法的典型用法代码示例。如果您正苦于以下问题:PHP debug::add_timing_point方法的具体用法?PHP debug::add_timing_point怎么用?PHP debug::add_timing_point使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在debug的用法示例。


在下文中一共展示了debug::add_timing_point方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

  function run(&$filter_chain, &$request, &$response) 
  {
    debug :: add_timing_point('locale filter started');
    
    if(!$node = map_request_to_node($request))
    {
    	define('CONTENT_LOCALE_ID', DEFAULT_CONTENT_LOCALE_ID);
    	define('MANAGEMENT_LOCALE_ID', CONTENT_LOCALE_ID);
    	
    	$locale =& locale :: instance();    	
    	$locale->setlocale();
    	
      $filter_chain->next();
      return;
    }
          
    if($object_locale_id = site_object :: get_locale_by_id($node['object_id']))
    	define('CONTENT_LOCALE_ID', $object_locale_id);
    else
      define('CONTENT_LOCALE_ID', DEFAULT_CONTENT_LOCALE_ID);
    
    $user = user :: instance();
    if($user_locale_id = $user->get_locale_id())
    	define('MANAGEMENT_LOCALE_ID', $user_locale_id);
    else
      define('MANAGEMENT_LOCALE_ID', CONTENT_LOCALE_ID);
              
    debug :: add_timing_point('locale filter finished');

  	$locale =& locale :: instance();    	
  	$locale->setlocale();
    
    $filter_chain->next();
  }   
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:34,代码来源:locale_definition_filter.class.php

示例2: run

 function run(&$filter_chain, &$request, &$response)
 {
     debug::add_timing_point('authentication filter started');
     if (!($object_data = fetch_requested_object($request))) {
         if (!($node = map_request_to_node($request))) {
             if (defined('ERROR_DOCUMENT_404')) {
                 $response->redirect(ERROR_DOCUMENT_404);
             } else {
                 $response->header("HTTP/1.1 404 Not found");
             }
             return;
         }
         $response->redirect('/root/login?redirect=' . urlencode($_SERVER['REQUEST_URI']));
         return;
     }
     $object =& wrap_with_site_object($object_data);
     $site_object_controller =& $object->get_controller();
     if (($action = $site_object_controller->determine_action($request)) === false) {
         debug::write_error('"' . $action . '" action not found', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__);
         if (defined('ERROR_DOCUMENT_404')) {
             $response->redirect(ERROR_DOCUMENT_404);
         } else {
             $response->header("HTTP/1.1 404 Not found");
         }
         debug::add_timing_point('authentication filter finished');
         $filter_chain->next();
         return;
     }
     $actions = $object->get_attribute('actions');
     if (!isset($actions[$action])) {
         $response->redirect('/root/login?redirect=' . urlencode($_SERVER['REQUEST_URI']));
     }
     debug::add_timing_point('authentication filter finished');
     $filter_chain->next();
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:35,代码来源:authentication_filter.class.php

示例3: run

  function run(&$filter_chain, &$request, &$response)
  {
    if(!$response->is_empty() || !$this->_is_caching_enabled())
    {
      $filter_chain->next();
      return;
    }

    $cache = new image_cache_manager();
    $cache->set_uri($request->get_uri());

    ob_start();

    $filter_chain->next();

    if(!$response->is_empty())
      return;

    debug :: add_timing_point('image cache started');

    if($content = ob_get_contents())
    {
      ob_end_clean();

      $cache->process_content($content);

      $response->write($content);
    }

    debug :: add_timing_point('image cache write finished');
  }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:image_cache_filter.class.php

示例4: run

  function run(&$filter_chain, &$request, &$response)
  {
    if(!$response->is_empty() || !$this->_is_caching_enabled())
    {
      $filter_chain->next();
      return;
    }

    debug :: add_timing_point('full page cache started');

    $cache = new full_page_cache_manager();

    $cache->set_uri($request->get_uri());

    if($contents =& $cache->get())
    {
      debug :: add_timing_point('full page cache read finished');

      $response->write($contents);
      return;
    }

    $filter_chain->next();

    $cache->write($content =& $response->get_response_string());

    debug :: add_timing_point('full page cache write finished');
  }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:28,代码来源:full_page_cache_filter.class.php

示例5: run

 function run(&$filter_chain, &$request, &$response)
 {
     debug::add_timing_point('session startup filter started');
     require_once LIMB_DIR . '/core/lib/session/session.class.php';
     start_user_session();
     debug::add_timing_point('session startup filter finished');
     $filter_chain->next();
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:8,代码来源:session_startup_filter.class.php

示例6: run

  function run(&$filter_chain, &$request, &$response)
  {
    debug :: add_timing_point('authentication filter started');

    if(!$object_data = fetch_requested_object($request))
    {
      if(!$node = map_request_to_node($request))
      {
        if(defined('ERROR_DOCUMENT_404'))
          $response->redirect(ERROR_DOCUMENT_404);
        else
          $response->header("HTTP/1.1 404 Not found");
        return;
      }
      $response->redirect('/root/login?redirect='. urlencode($request->to_string()));
      return;
    }

    $object =& wrap_with_site_object($object_data);

    $site_object_controller =& $object->get_controller();

    if(($action = $site_object_controller->determine_action($request)) === false)
    {
      debug :: write_error('"'. $action . '" action not found', __FILE__ . ' : ' . __LINE__ . ' : ' .  __FUNCTION__);

      if(defined('ERROR_DOCUMENT_404'))
        $response->redirect(ERROR_DOCUMENT_404);
      else
        $response->header("HTTP/1.1 404 Not found");

      debug :: add_timing_point('authentication filter finished');

      $filter_chain->next();
      return;
    }

    $actions = $object->get_attribute('actions');

    if(!isset($actions[$action]))
    {
      $redirect_path = $site_object_controller->get_action_property($action, 'inaccessible_redirect');

      if(!$redirect_path)
        $redirect_path = '/root/login';

      $redirect_strategy =& $this->_get_redirect_strategy($site_object_controller, $action);

      $response->set_redirect_strategy($redirect_strategy);

      $response->redirect($redirect_path . '?redirect='. urlencode($request->to_string()));
    }

    debug :: add_timing_point('authentication filter finished');

    $filter_chain->next();
  }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:57,代码来源:authentication_filter.class.php

示例7: run

 function run(&$filter_chain, &$request, &$response)
 {
     $filter_chain->next();
     debug::add_timing_point('logging filter started');
     $object = wrap_with_site_object(fetch_requested_object($request));
     $controller = $object->get_controller();
     include_once LIMB_DIR . 'core/model/stats/stats_register.class.php';
     $stats_register = new stats_register();
     $stats_register->register($object->get_node_id(), $controller->get_action(), $request->get_status());
     debug::add_timing_point('logging filter finished');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:11,代码来源:logging_filter.class.php

示例8: run

 function run(&$filter_chain, &$request, &$response)
 {
     debug::add_timing_point('site object controller filter started');
     $site_object =& wrap_with_site_object(fetch_requested_object($request));
     $site_object_controller =& $site_object->get_controller();
     $site_object_controller->process($request, $response);
     if ($response->is_empty()) {
         $site_object_controller->display_view();
     }
     debug::add_timing_point('site object controller filter finished');
     $filter_chain->next();
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:12,代码来源:site_object_controller_filter.class.php

示例9: run

 function run(&$filter_chain, &$request, &$response)
 {
     debug::add_timing_point('jip filter started');
     $fetcher =& fetcher::instance();
     $fetcher->set_jip_status(false);
     $user =& user::instance();
     if ($user->is_logged_in()) {
         $ini =& get_ini('jip_groups.ini');
         if ($user->is_in_groups(array_keys($ini->get_group('groups')))) {
             $fetcher->set_jip_status(true);
         }
     }
     debug::add_timing_point('jip filter done');
     $filter_chain->next();
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:15,代码来源:jip_filter.class.php

示例10: ob_end_clean

        ob_end_clean();
        if (debug::is_console_enabled()) {
            echo debug::parse_html_console();
        }
        header("HTTP/1.1 403 Access denied");
        exit;
    }
}
if (isset($object_data['locale_id']) && $object_data['locale_id']) {
    define('CONTENT_LOCALE_ID', $object_data['locale_id']);
} else {
    define('CONTENT_LOCALE_ID', DEFAULT_CONTENT_LOCALE_ID);
}
define('MANAGEMENT_LOCALE_ID', user::get_management_locale_id());
$site_object =& site_object_factory::instance($object_data['class_name']);
debug::add_timing_point('object fetched');
$site_object_controller =& $site_object->get_controller();
if (($action = $site_object_controller->determine_action()) === false) {
    debug::write_error('"' . $action . '" action not found', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__);
    ob_end_clean();
    if (debug::is_console_enabled()) {
        echo debug::parse_html_console();
    }
    header("HTTP/1.1 404 Not found");
    exit;
}
$actions = $object_data['actions'];
if (!isset($actions[$action])) {
    debug::write_error('"' . $action . '" action is not accessible', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__);
    ob_end_clean();
    if (debug::is_console_enabled()) {
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:root.php

示例11: array

<?php

/**********************************************************************************
* Copyright 2004 BIT, Ltd. http://www.0x00.ru, mailto: bit@0x00.ru
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/
require_once LIMB_DIR . 'core/lib/debug/debug.class.php';
debug::add_timing_point('start');
require_once LIMB_DIR . 'core/lib/system/objects_support.inc.php';
require_once LIMB_DIR . 'core/filters/filter_chain.class.php';
require_once LIMB_DIR . 'core/request/http_response.class.php';
require_once LIMB_DIR . 'core/request/request.class.php';
require_once LIMB_DIR . 'core/lib/http/control_flow.inc.php';
require_once LIMB_DIR . 'core/lib/system/message_box.class.php';
class limb_application
{
    function _inititiliaze_user_session()
    {
        require_once LIMB_DIR . 'core/lib/session/session.class.php';
        start_user_session();
    }
    function _register_filters(&$filter_chain)
    {
        $f = array();
        $filter_chain->register_filter($f[] = LIMB_DIR . 'core/filters/locale_definition_filter');
        $filter_chain->register_filter($f[] = LIMB_DIR . 'core/filters/authentication_filter');
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:limb_application.class.php

示例12:

    }
    $object->import_attributes($params);
    if ($object->create($is_root)) {
        echo $params['parent_path'] . '/' . $params['identifier'] . ' created <br/>';
    } else {
        echo 'object was not created';
        exit;
    }
    if (!$is_root) {
        $parent_object =& site_object_factory::instance($parent_data['class_name']);
        $parent_object->import_attributes($parent_data);
        $access_policy =& access_policy::instance();
        $access_policy->save_object_access($object, $parent_object);
    }
    $db->commit();
    debug::add_timing_point('finish');
    if (debug::is_console_enabled()) {
        echo debug::parse_html_console();
    }
}
?>
<html>

<head>
	<title>Class creation</title>
	<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
	<link href="/shared/styles/admin.css" rel="stylesheet" type="text/css">
	<script language="javascript" src="/shared/js/common.js"></script>
	<script language="javascript" src="/design/main/js/form_errors.js"></script>
	<metadata:METADATA>
	<meta name="description" content="{$description}">
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:create_object.php

示例13: run

  function run(&$filter_chain, &$request, &$response)
  { 
    debug :: add_timing_point('authentication filter started');
  	
    if(!$object_data = fetch_requested_object($request))
    {
      if(!$node = map_request_to_node($request))
      {
      	if(defined('ERROR_DOCUMENT_404'))
      		$response->redirect(ERROR_DOCUMENT_404);
      	else
      		$response->header("HTTP/1.1 404 Not found");
      	return;
      }
      
      
      $user =& user :: instance();
    	if (!$user->is_logged_in())
    	{
    		$tree = tree :: instance();
    		
    		$response->redirect('/root/login?redirect='. $tree->get_path_to_node($node));
    		return;
    	}	
    	else
    	{
    		debug :: write_error('content object not allowed or retrieved', __FILE__ . ' : ' . __LINE__ . ' : ' .  __FUNCTION__);
    		        	
    		if(defined('ERROR_DOCUMENT_403'))
    			$response->redirect(ERROR_DOCUMENT_403);
    		else
    			$response->header("HTTP/1.1 403 Access denied");
    		return;
    	}	
    }
    
    $object =& wrap_with_site_object($object_data); 

    $site_object_controller =& $object->get_controller();
    
    if(($action = $site_object_controller->determine_action($request)) === false)
    {
    	debug :: write_error('"'. $action . '" action not found', __FILE__ . ' : ' . __LINE__ . ' : ' .  __FUNCTION__);
    
    	if(defined('ERROR_DOCUMENT_404'))
    		$response->redirect(ERROR_DOCUMENT_404);
    	else
    		$response->header("HTTP/1.1 404 Not found");

      debug :: add_timing_point('authentication filter finished');
    	
    	$filter_chain->next();
    	return;
    }
        
    $actions = $object->get_attribute('actions');
    
    if(!isset($actions[$action]))
    {
    	debug :: write_error('"'. $action . '" action is not accessible', __FILE__ . ' : ' . __LINE__ . ' : ' .  __FUNCTION__);
    	
    	if (debug :: is_console_enabled())
    		echo debug :: parse_html_console();
    		
    	if(defined("ERROR_DOCUMENT_403"))
    		$response->redirect(ERROR_DOCUMENT_403);
    	else
    		$response->header("HTTP/1.1 403 Access denied");
    	return;
    }

    debug :: add_timing_point('authentication filter finished');
          
    $filter_chain->next();        
  }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:75,代码来源:authentication_filter.class.php

示例14:

 function &get_view()
 {
     if ($this->_view) {
         return $this->_view;
     }
     if (!($template_path = $this->get_current_action_property('template_path'))) {
         return null;
     }
     $this->_view =& $this->_create_template($template_path);
     debug::add_timing_point('template created');
     return $this->_view;
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:12,代码来源:site_object_controller.class.php

示例15:

 function &get_view()
 {
     if ($this->_view) {
         return $this->_view;
     }
     $this->_view =& $this->_create_template();
     debug::add_timing_point('template created');
     return $this->_view;
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:9,代码来源:site_object_controller.class.php


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