mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
parse
This commit is contained in:
@@ -391,24 +391,24 @@ class parseCSV {
|
||||
* @return [bool]
|
||||
*/
|
||||
public function parse ($input = null, $offset = null, $limit = null, $conditions = null) {
|
||||
if ( $input === null ) {
|
||||
if (is_null($input)) {
|
||||
$input = $this->file;
|
||||
}
|
||||
|
||||
if ( !empty($input) ) {
|
||||
if ( $offset !== null ) {
|
||||
if (!empty($input)) {
|
||||
if (!is_null($offset)) {
|
||||
$this->offset = $offset;
|
||||
}
|
||||
|
||||
if ($limit !== null ) {
|
||||
if (!is_null($limit)) {
|
||||
$this->limit = $limit;
|
||||
}
|
||||
|
||||
if ( !is_null($conditions) ) {
|
||||
if (!is_null($conditions)) {
|
||||
$this->conditions = $conditions;
|
||||
}
|
||||
|
||||
if ( is_readable($input) ) {
|
||||
if (is_readable($input)) {
|
||||
$this->data = $this->parse_file($input);
|
||||
}
|
||||
else {
|
||||
@@ -416,7 +416,7 @@ class parseCSV {
|
||||
$this->data = $this->parse_string();
|
||||
}
|
||||
|
||||
if ( $this->data === false ) {
|
||||
if ($this->data === false) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user