コード例 #1
0
ファイル: CsvParser.php プロジェクト: graze/data-file
 /**
  * Parse the rows looking for the header row and storing it locally
  *
  * @param array $current
  * @param int   $key
  *
  * @return bool
  */
 public function handleHeaderRow(array $current, $key)
 {
     if ($key == $this->csvFormat->getHeaderRow() - 1) {
         if (count($current) > 1 || strlen($current[0]) > 0) {
             $this->headerRow = $current;
         }
     }
     return true;
 }
コード例 #2
0
ファイル: CsvFormatter.php プロジェクト: graze/data-file
 /**
  * Get a separator between each row
  *
  * @return string
  */
 public function getRowSeparator()
 {
     return $this->encode($this->csvFormat->getNewLine());
 }