private function testDataFileIterator::_getcsv in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.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
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;
}