コード例 #1
0
ファイル: Printer.php プロジェクト: devour-php/devour
 /**
  * {@inheritdoc}
  */
 protected function processRow(RowInterface $row)
 {
     $output = [];
     foreach ($row->getData() as $key => $value) {
         $output[] = "{$key}: {$value}";
     }
     $output = implode(', ', $output);
     print "{$output}\n";
 }
コード例 #2
0
ファイル: CsvWriter.php プロジェクト: devour-php/devour
 /**
  * @param resource $handle
  *   The file handle to write to.
  * @param \Devour\Row\RowInterface $row
  *   The row to write to the file.
  */
 protected function processRow($handle, RowInterface $row)
 {
     fputcsv($handle, $row->getData(), $this->delimeter, $this->enclosure);
 }