writeRaw() public method

Writes a string to the output stream without formatting.
public writeRaw ( string $string, integer $flags = null )
$string string The string to write.
$flags integer The flags. If one of of {@link IO::VERBOSE}, {@link IO::VERY_VERBOSE} and {@link IO::DEBUG} is passed, the output is only written if the verbosity level is the given level or higher.
示例#1
0
 public function testWriteRawDoesNotFormatText()
 {
     $formatter = $this->getMock('Webmozart\\Console\\Api\\Formatter\\Formatter');
     $formatter->expects($this->never())->method('format');
     $this->output->setFormatter($formatter);
     $this->output->writeRaw('<tag>text</tag>');
     $this->assertSame('<tag>text</tag>', $this->stream->fetch());
 }
示例#2
0
文件: IO.php 项目: webmozart/console
 /**
  * Writes a string to the error output without formatting.
  *
  * @param string $string The string to write.
  * @param int    $flags  The flags. One of {@link VERBOSE},
  *                       {@link VERY_VERBOSE} and {@link DEBUG}.
  *
  * @throws IOException If writing fails or if the error output is closed.
  */
 public function errorRaw($string, $flags = null)
 {
     $this->errorOutput->writeRaw($string, $flags);
 }