public function writeLine($string, $flags = null)
    {
        if ($this->mayWrite($flags)) {
            $string = rtrim($string, PHP_EOL);
            $formatted = $this->formatOutput ? $this->format($string) : $this->removeFormat($string);
            $this->stream->write($formatted.PHP_EOL);
        }
    }
public function writeLine($string, $flags = null)
    {
        if ($this->mayWrite($flags)) {
            $string = rtrim($string, PHP_EOL);
            $formatted = $this->formatOutput ? $this->format($string) : $this->removeFormat($string);
            $this->stream->write($formatted.PHP_EOL);
        }
    }
public function writeLine ( $ string , $ flags = null ) { if ( $ this -> mayWrite ( $ flags ) ) { $ string = rtrim ( $ string , PHP_EOL ) ; $ formatted = $ this -> formatOutput ? $ this -> format ( $ string ) : $ this -> removeFormat ( $ string ) ; $ this -> stream -> write ( $ formatted . PHP_EOL ) ; } }
Writes a line of text to the output stream.

The string is formatted before it is written to the output stream.

@param string $string The string to write. A newline is appended.
@param int    $flags  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.

@throws IOException If writing fails or if the output stream is closed.
Writes a line of text to the output stream .