mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
parse_file readability
This commit is contained in:
@@ -444,9 +444,15 @@ class parseCSV {
|
|||||||
* @param file local CSV file
|
* @param file local CSV file
|
||||||
* @return 2D array with CSV data, or false on failure
|
* @return 2D array with CSV data, or false on failure
|
||||||
*/
|
*/
|
||||||
function parse_file ($file = null) {
|
public function parse_file ($file = null) {
|
||||||
if ( $file === null ) $file = $this->file;
|
if ( $file === null ) {
|
||||||
if ( empty($this->file_data) ) $this->load_data($file);
|
$file = $this->file;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( empty($this->file_data) ) {
|
||||||
|
$this->load_data($file);
|
||||||
|
}
|
||||||
|
|
||||||
return ( !empty($this->file_data) ) ? $this->parse_string() : false ;
|
return ( !empty($this->file_data) ) ? $this->parse_string() : false ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user