Exemplo n.º 1
0
 /**
  * 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);
     }
 }
Exemplo n.º 2
0
 /**
  * {@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);
 }
Exemplo n.º 3
0
 /**
  * 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;
 }
Exemplo n.º 4
0
    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']);
    }
Exemplo n.º 5
0
 /** {@inheritdoc} */
 public function createAndWrite($path, array $rows)
 {
     $this->writer->createAndWrite($path, $rows);
 }
Exemplo n.º 6
0
 public function testDefaultMimeTypeIsString()
 {
     $this->assertInternalType('string', $this->writer->getDefaultMimeType());
 }
Exemplo n.º 7
0
 /** {@inheritdoc} */
 public function createAndWrite($path, array $rows, $sheetName = '')
 {
     $this->writer->createAndWrite($path, $rows, $sheetName);
 }
Exemplo n.º 8
0
 public function outputHtmlToText($output)
 {
     return $this->writer->writeText($output);
 }