mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
Fixed Issue #6 - Automatically clears $file_data property after successful parsing of input data. Set the $keep_file_data property to true to keep it around for debugging.
git-svn-id: http://parsecsv-for-php.googlecode.com/svn/trunk@39 339761fc-0c37-0410-822d-8b8cac1f6a97
This commit is contained in:
@@ -135,6 +135,8 @@ class parseCSV {
|
|||||||
var $output_delimiter = ',';
|
var $output_delimiter = ',';
|
||||||
var $output_filename = 'data.csv';
|
var $output_filename = 'data.csv';
|
||||||
|
|
||||||
|
# keep raw file data in memory after successful parsing (useful for debugging)
|
||||||
|
var $keep_file_data = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal variables
|
* Internal variables
|
||||||
@@ -490,6 +492,9 @@ class parseCSV {
|
|||||||
$rows = array_slice($rows, ($this->offset === null ? 0 : $this->offset) , $this->limit, true);
|
$rows = array_slice($rows, ($this->offset === null ? 0 : $this->offset) , $this->limit, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ( !$this->keep_file_data ) {
|
||||||
|
$this->file_data = null;
|
||||||
|
}
|
||||||
return $rows;
|
return $rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user