You are here

private function testDataFileIterator::_getcsv in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/unitTests/testDataFileIterator.php \testDataFileIterator::_getcsv()
1 call to testDataFileIterator::_getcsv()
testDataFileIterator::_parseNextDataset in vendor/phpoffice/phpexcel/unitTests/testDataFileIterator.php

File

vendor/phpoffice/phpexcel/unitTests/testDataFileIterator.php, line 69

Class

testDataFileIterator

Code

private function _getcsv($input, $delimiter, $enclosure) {
  if (function_exists('str_getcsv')) {
    return str_getcsv($input, $delimiter, $enclosure);
  }
  $temp = fopen('php://memory', 'rw');
  fwrite($temp, $input);
  rewind($temp);
  $data = fgetcsv($temp, strlen($input), $delimiter, $enclosure);
  fclose($temp);
  if ($data === false) {
    $data = array(
      null,
    );
  }
  return $data;
}