本文整理汇总了PHP中debug::parse_cli_console方法的典型用法代码示例。如果您正苦于以下问题:PHP debug::parse_cli_console方法的具体用法?PHP debug::parse_cli_console怎么用?PHP debug::parse_cli_console使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类debug
的用法示例。
在下文中一共展示了debug::parse_cli_console方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _displayBrowse
function _displayBrowse($path, &$root_group, &$current_group)
{
if (is_a($current_group, 'LimbGroupTest')) {
$group_tests = $current_group->getTestCasesHandles();
} else {
$group_tests = array();
}
$buffer = "Available test cases in \n'=== " . $current_group->getLabel() . " ===' :\n";
if (sizeof($group_tests)) {
foreach ($group_tests as $index => $group_test) {
resolve_handle($group_test);
$buffer .= $path . '/' . $index . ' ' . $group_test->getLabel() . "\n";
}
$buffer .= "\n";
} else {
$buffer .= "No tests available.\n";
}
echo $buffer;
echo debug::parse_cli_console();
}
示例2: parse_console
function parse_console()
{
if (sys::exec_mode() == 'cli') {
return debug::parse_cli_console();
} else {
return debug::parse_html_console();
}
}
示例3: nonbuffered_response
<?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$
*
***********************************************************************************/
$site_path = $argv[1];
require_once $site_path . '/setup.php';
require_once LIMB_DIR . '/core/lib/debug/debug.class.php';
require_once LIMB_DIR . '/core/request/nonbuffered_response.class.php';
require_once LIMB_DIR . '/core/lib/cron/cron_manager.class.php';
$force = false;
if (isset($argv[2]) && $argv[2] == 'force') {
$force = true;
}
$response =& new nonbuffered_response();
$mgr =& new cron_manager();
$mgr->perform($response, $force);
$response->write(debug::parse_cli_console());
$response->commit();
exit(0);
示例4: explode
$script_settings = explode(';', $script_string);
if (sizeof($script_settings) > 1) {
$script_run_interval = (int) $script_settings[1];
} else {
$script_run_interval = 3600;
}
$script_name = $script_settings[0];
$script_file = $cron_scripts_dir . $script_name;
$now = time();
if (file_exists($script_file)) {
$time_diff = $now - (int) $scripts_last_run[$id];
if ($time_diff > $script_run_interval) {
echo "running {$script_name}\n";
debug::add_timing_point("script {$script_name} starting\n");
include $script_file;
debug::add_timing_point("script done\n");
$scripts_last_run[$id] = $now;
} else {
echo "will run {$script_name} in " . ($script_run_interval - $time_diff) . " seconds\n";
}
} else {
echo "{$script_file} not found\n";
}
}
$fp = fopen($cron_last_run_file, 'w');
foreach ($scripts_last_run as $time) {
fwrite($fp, "{$time}\n");
}
fclose($fp);
echo debug::parse_cli_console();
ob_end_flush();