Horde_Cli::writeln PHP Method

writeln() public method

Prints $text on a single line.
public writeln ( string $text = '', boolean $pre = false )
$text string The text to print.
$pre boolean If true the linebreak is printed before the text instead of after it.
    public function writeln($text = '', $pre = false)
    {
        if ($pre) {
            echo $this->_newline . $text;
        } else {
            echo $text . $this->_newline;
        }
    }

Usage Example

Example #1
0
 public function pear($text)
 {
     if (!$this->_verbose) {
         return;
     }
     $this->_cli->message('-------------------------------------------------', $this->_getType('cli.message'));
     $this->_cli->message('PEAR output START', $this->_getType('cli.message'));
     $this->_cli->message('-------------------------------------------------', $this->_getType('cli.message'));
     $this->_cli->writeln($text);
     $this->_cli->message('-------------------------------------------------', $this->_getType('cli.message'));
     $this->_cli->message('PEAR output END', $this->_getType('cli.message'));
     $this->_cli->message('-------------------------------------------------', $this->_getType('cli.message'));
 }
All Usage Examples Of Horde_Cli::writeln