本文整理汇总了PHP中ShellDispatcher::stdout方法的典型用法代码示例。如果您正苦于以下问题:PHP ShellDispatcher::stdout方法的具体用法?PHP ShellDispatcher::stdout怎么用?PHP ShellDispatcher::stdout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShellDispatcher
的用法示例。
在下文中一共展示了ShellDispatcher::stdout方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: out
/**
* Outputs a single or multiple messages to stdout. If no parameters
* are passed outputs just a newline.
*
* @param mixed $message A string or a an array of strings to output
* @param integer $newlines Number of newlines to append
* @return integer Returns the number of bytes returned from writing to stdout.
* @access public
*/
function out($message = null, $newlines = 1)
{
if (is_array($message)) {
$message = implode($this->nl(), $message);
}
return $this->Dispatch->stdout($message . $this->nl($newlines), false);
}
示例2: out
/**
* Outputs to the stdout filehandle.
*
* @param string $string String to output.
* @param boolean $newline If true, the outputs gets an added newline.
* @access public
*/
function out($string, $newline = true)
{
if (is_array($string)) {
$string = implode("\n", $string) . "\n";
}
return $this->Dispatch->stdout($string, $newline);
}
示例3: out
/**
* Outputs a single or multiple messages to stdout.
*
* @param mixed $message A string or a an array of strings to output
* @param mixed $after Appended to message, if true a newline is used
* @access public
*/
function out($message, $after = true)
{
if (is_array($message)) {
$message = implode($this->nl(), $message);
}
$this->Dispatch->stdout($message . $this->nl($after), false);
}
示例4: out
/**
* Outputs to the stdout filehandle.
*
* @param string $string String to output.
* @param boolean $newline If true, the outputs gets an added newline.
* @access public
*/
function out($string, $newline = true)
{
if (is_array($string)) {
$str = '';
foreach ($string as $message) {
$str .= $message . "\n";
}
$string = $str;
}
return $this->Dispatch->stdout($string, $newline);
}