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:
zynode
2008-06-30 20:38:59 +00:00
parent 2bfa3de220
commit 9b64cb07c4

View File

@@ -135,6 +135,8 @@ class parseCSV {
var $output_delimiter = ',';
var $output_filename = 'data.csv';
# keep raw file data in memory after successful parsing (useful for debugging)
var $keep_file_data = false;
/**
* Internal variables
@@ -490,6 +492,9 @@ class parseCSV {
$rows = array_slice($rows, ($this->offset === null ? 0 : $this->offset) , $this->limit, true);
}
}
if ( !$this->keep_file_data ) {
$this->file_data = null;
}
return $rows;
}