/** * Write a string w/newline to the console output writer (if set). * * @param string $str String to write. * * @return void */ protected function writeLine($str) { // Bypass output when silent: if ($this->outputWriter) { $this->outputWriter->writeLine($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; }
public function testWriteAndRead() { $config = new Config(array('default' => array('test' => 'foo'))); $this->writer->toFile($this->getTestAssetFileName(), $config); $config = $this->reader->fromFile($this->getTestAssetFileName()); $this->assertEquals('foo', $config['default']['test']); }
/** {@inheritdoc} */ public function createAndWrite($path, array $rows) { $this->writer->createAndWrite($path, $rows); }
public function testDefaultMimeTypeIsString() { $this->assertInternalType('string', $this->writer->getDefaultMimeType()); }
/** {@inheritdoc} */ public function createAndWrite($path, array $rows, $sheetName = '') { $this->writer->createAndWrite($path, $rows, $sheetName); }
public function outputHtmlToText($output) { return $this->writer->writeText($output); }