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