/** * Write a string to the console output writer (if set). * * @param string $str String to write. * * @return void */ protected function write($str) { // Bypass output when silent: if ($this->outputWriter) { $this->outputWriter->write($str); } }
/** * {@inheritdoc} */ public function write(array $data) { foreach ($data as $key => $value) { if (is_bool($data[$key])) { $data[$key] = $data[$key] === true ? $this->trueLabel : $this->falseLabel; } } $this->writer->write($data); }
/** * Get/Flush the data * @param boolean $resetAfterwards Reset the data afterwards? * @return string The data */ public function flush($resetAfterwards = true) { // Get the data from the buffer $data = parent::flush($resetAfterwards); // Write the data to the writer we are proxying for $this->writer->write($data); // Return the data return $data; }