Webmozart\Console\Api\IO\Output::writeRaw PHP Method

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.
    public function writeRaw($string, $flags = null)
    {
        if ($this->mayWrite($flags)) {
            $this->stream->write($string);
        }
    }

Usage Example

示例#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());
 }
All Usage Examples Of Webmozart\Console\Api\IO\Output::writeRaw