本文整理汇总了PHP中CLI::displayHelp方法的典型用法代码示例。如果您正苦于以下问题:PHP CLI::displayHelp方法的具体用法?PHP CLI::displayHelp怎么用?PHP CLI::displayHelp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLI
的用法示例。
在下文中一共展示了CLI::displayHelp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$rename = false;
$showHeader = true;
$start = 0;
$update = false;
$options = array(0 => array('help' => 'displays this help', 'debug' => 'show debug output', 'delete' => 'delete fragments after processing', 'fproxy' => 'force proxy for downloading of fragments', 'play' => 'dump stream to stdout for piping to media player', 'rename' => 'rename fragments sequentially before processing', 'update' => 'update the script to current git version'), 1 => array('auth' => 'authentication string for fragment requests', 'duration' => 'stop recording after specified number of seconds', 'filesize' => 'split output file in chunks of specified size (MB)', 'fragments' => 'base filename for fragments', 'fixwindow' => 'timestamp gap between frames to consider as timeshift', 'manifest' => 'manifest file for downloading of fragments', 'maxspeed' => 'maximum bandwidth consumption (KB) for fragment downloading', 'outdir' => 'destination folder for output file', 'outfile' => 'filename to use for output file', 'parallel' => 'number of fragments to download simultaneously', 'proxy' => 'proxy for downloading of manifest', 'quality' => 'selected quality level (low|medium|high) or exact bitrate', 'referrer' => 'Referer to use for emulation of browser requests', 'start' => 'start from specified fragment', 'useragent' => 'User-Agent to use for emulation of browser requests'));
$cli = new CLI($options, true);
// Set large enough memory limit
ini_set("memory_limit", "512M");
// Check if STDOUT is available
if ($cli->getParam('play')) {
$play = true;
$quiet = true;
$showHeader = false;
}
if ($cli->getParam('help')) {
$cli->displayHelp();
exit(0);
}
// Check for required extensions
$required_extensions = array("bcmath", "curl", "SimpleXML");
$missing_extensions = array_diff($required_extensions, get_loaded_extensions());
if ($missing_extensions) {
$msg = "You have to install the following extension(s) to continue: '" . implode("', '", $missing_extensions) . "'";
LogError($msg);
}
// Initialize classes
$cc = new cURL();
$f4f = new F4F();
$f4f->baseFilename =& $baseFilename;
$f4f->debug =& $debug;
$f4f->fixWindow =& $fixWindow;