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

writeLineRaw() public method

Writes a line of text to the output stream without formatting.
public writeLineRaw ( string $string, integer $flags = null )
$string string The string to write. A newline is appended.
$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 writeLineRaw($string, $flags = null)
    {
        if ($this->mayWrite($flags)) {
            $this->stream->write(rtrim($string, PHP_EOL) . PHP_EOL);
        }
    }

Usage Example

Ejemplo n.º 1
0
 public function testWriteLineRawDoesNotFormatText()
 {
     $formatter = $this->getMock('Webmozart\\Console\\Api\\Formatter\\Formatter');
     $formatter->expects($this->never())->method('format');
     $this->output->setFormatter($formatter);
     $this->output->writeLineRaw('<tag>text</tag>');
     $this->assertSame('<tag>text</tag>' . PHP_EOL, $this->stream->fetch());
 }
All Usage Examples Of Webmozart\Console\Api\IO\Output::writeLineRaw