本文整理匯總了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();