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


PHP debug::parse_html_console方法代码示例

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


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

示例1: error

function error($description, $error_place = '', $params = array())
{
    if (defined('DEVELOPER_ENVIROMENT')) {
        trigger_error('error', E_USER_WARNING);
        echo $description . '<br>' . $error_place . '<br><pre>';
        print_r($params);
        echo '</pre>';
    }
    debug::write_error($description, $error_place, $params);
    rollback_user_transaction();
    if (debug::is_console_enabled()) {
        echo debug::parse_html_console();
    } else {
        $message = '';
        if ($user_id = user::get_id()) {
            $message .= "user id:\t{$user_id}\nlogin:\t\t" . user::get_login() . "\ne-mail:\t\t" . user::get_email() . "\n";
        }
        $message .= "ip:\t\t" . sys::client_ip() . "\nrequest:\t" . REQUEST_URI . "\nerror:\t\t{$title}\ndescription:\t{$msg}";
        $mail = new mime_mail();
        $mail->set_body($message);
        $mail->build_message();
        $mail->send('developer', DEVELOPER_EMAIL, '', WEBSITE_EMAIL, $_SERVER['HTTP_HOST'] . ' internal error!');
    }
    ob_end_flush();
    exit;
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:26,代码来源:error.inc.php

示例2: _displayBrowse

 function _displayBrowse($path, &$root_group, &$current_group)
 {
     if ($root_group != $current_group) {
         echo '<p><a href="' . $this->getBaseURL() . '?browse=' . $path . '/..">Back</a></p>';
     }
     if (is_a($current_group, 'LimbGroupTest')) {
         $group_tests = $current_group->getTestCasesHandles();
     } else {
         $group_tests = array();
     }
     $buffer = "<br><a href='" . $this->getBaseURL() . "?perform={$path}&back=1'>Run all tests from this group</a>\n";
     $buffer .= "<p>Available test groups in '" . $current_group->getLabel() . "':</p>\n";
     if (sizeof($group_tests)) {
         $buffer .= "<ul>";
         foreach ($group_tests as $index => $group_test) {
             resolve_handle($group_test);
             if (!is_a($group_test, 'LimbGroupTest')) {
                 $buffer .= "<li><a href='" . $this->getBaseURL() . "?perform={$path}/{$index}'>P</a> " . $group_test->getLabel() . "</li>\n";
             } else {
                 $buffer .= "<li><a href='" . $this->getBaseURL() . "?perform={$path}/{$index}'>P</a> <a href='" . $this->getBaseURL() . "?browse={$path}/{$index}'>B</a> " . $group_test->getLabel() . "</li>\n";
             }
         }
         $buffer .= "</ul>\n";
     } else {
         $buffer .= "<p>No groups available.</p> \n";
     }
     echo $buffer;
     echo debug::parse_html_console();
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:29,代码来源:html_test_runner.class.php

示例3: error

function error($description, $error_place='', $params=array()) 
{
	if(isset($GLOBALS['error_recursion']) && $GLOBALS['error_recursion'])
		die();
		
	$GLOBALS['error_recursion'] = true;
	
	if(defined('DEVELOPER_ENVIROMENT'))
	{
		trigger_error('error', E_USER_WARNING);
		
		echo(  $description . '<br>' . $error_place . '<br><pre>');
		print_r($params);
		echo('</pre>');
	}
	
	$description = $description . "\n\nback trace:\n" . get_trace_back();
		
	rollback_user_transaction();

	debug :: set_message_output(DEBUG_OUTPUT_MESSAGE_STORE | DEBUG_OUTPUT_MESSAGE_SEND);
	debug :: write_error($description, $error_place, $params);
	
	if (debug :: is_console_enabled())
	{
		debug :: write_error($description, $error_place, $params);
		echo debug :: parse_html_console();
	}
		
	ob_end_flush();
			
	exit;
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:33,代码来源:error.inc.php

示例4: run

  function run(&$filter_chain, &$request, &$response)
  {
    $filter_chain->next();

    if( $response->get_content_type() == 'text/html' &&
        $response->get_status() == 200)//only 200?
    {
      if (debug :: is_console_enabled())
        $response->write(debug :: parse_html_console());

      $response->write(message_box :: parse());//It definetly should be somewhere else!
    }
  }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:13,代码来源:response_processing_filter.class.php

示例5: run

 function run()
 {
     $request =& request::instance();
     $response =& new http_response();
     $filter_chain =& new filter_chain($request, $response);
     $this->_register_filters($filter_chain);
     $filter_chain->process();
     if ($response->get_content_type() == 'text/html' && $response->get_status() == 200) {
         if (debug::is_console_enabled()) {
             $response->write(debug::parse_html_console());
         }
         $response->write(message_box::parse());
         //It definetly should be somewhere else!
     }
     $response->commit();
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:16,代码来源:limb_application.class.php

示例6: run

 function run()
 {
     $this->_inititiliaze_user_session();
     $request =& request::instance();
     $response =& new http_response();
     $filter_chain =& new filter_chain($request, $response);
     $this->_register_filters($filter_chain);
     $filter_chain->process();
     if (!$response->file_sent()) {
         if (debug::is_console_enabled()) {
             echo debug::parse_html_console();
         }
         echo message_box::parse();
         //It definetly should be somewhere else!
     }
     $response->commit();
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:17,代码来源:limb_application.class.php

示例7: ob_end_flush

    echo "<p><a href='" . $_SERVER['PHP_SELF'] . "'>Run more tests</a></p>";
    echo debug::parse_html_console();
    ob_end_flush();
    exit(0);
}
if (isset($_GET['group'])) {
    TestManager::runGroupTest(ucfirst($_GET['group']), $_GET['group'], new HTMLReporter());
    echo "<p><a href='" . $_SERVER['PHP_SELF'] . "'>Run more tests</a></p>";
    echo debug::parse_html_console();
    ob_end_flush();
    exit(0);
}
if (isset($_GET['case'])) {
    TestManager::runTestCase($_GET['case'], new HTMLReporter());
    echo "<p><a href='" . $_SERVER['PHP_SELF'] . "?show=cases'>Run more tests</a></p>";
    echo debug::parse_html_console();
    ob_end_flush();
    exit(0);
}
echo "<h1>Unit Test Suite</h1>\n";
echo "<p><a href='" . $_SERVER['PHP_SELF'] . "'>Test groups</a>";
echo " || <a href='" . $_SERVER['PHP_SELF'] . "?show=cases'>Test cases</a></p>";
if (isset($_GET['show']) && $_GET['show'] == 'cases') {
    echo HTMLTestManager::getGroupTestList(LIMB_DIR . '/tests/cases');
    echo HTMLTestManager::getGroupTestList(PROJECT_DIR . '/tests/cases');
} else {
    /* no group specified, so list them all */
    echo HTMLTestManager::getGroupTestList(LIMB_DIR . '/tests/groups');
    echo HTMLTestManager::getGroupTestList(PROJECT_DIR . '/tests/groups');
}
ob_end_flush();
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:index.php

示例8: parse_console

 function parse_console()
 {
     if (sys::exec_mode() == 'cli') {
         return debug::parse_cli_console();
     } else {
         return debug::parse_html_console();
     }
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:8,代码来源:debug.class.php

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


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