textWriter = $writer; } /** * @param TextWriter $writer * @return FormatedWriter */ public function setTextWriter(TextWriter $writer) { $this->textWriter = $writer; return $this; } /** * @return TextWriter */ public function getTextWriter() { return $this->textWriter; } /** * Writes some text to the text writer * * @see TextWriter::write() * @param string $text * @param array $formatOptions * @return Command */ public function write($text, $pipe = TextWriter::STDOUT) { $this->textWriter->write($this->format($text), $pipe); return $this; } /** * Writes a line of text * * @see TextWriter::writeln() * @param string $text * @param array $formatOptions * @return Command */ public function writeln($text = '', $pipe = TextWriter::STDOUT) { $this->textWriter->writeln($this->format($text), $pipe); return $this; } }