mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
cleaned up construct
This commit is contained in:
@@ -174,10 +174,21 @@ class parseCSV {
|
|||||||
* @return nothing
|
* @return nothing
|
||||||
*/
|
*/
|
||||||
function parseCSV ($input = null, $offset = null, $limit = null, $conditions = null) {
|
function parseCSV ($input = null, $offset = null, $limit = null, $conditions = null) {
|
||||||
if ( $offset !== null ) $this->offset = $offset;
|
if ($offset!==null) {
|
||||||
if ( $limit !== null ) $this->limit = $limit;
|
$this->offset = $offset;
|
||||||
if ( count($conditions) > 0 ) $this->conditions = $conditions;
|
}
|
||||||
if ( !empty($input) ) $this->parse($input);
|
|
||||||
|
if ($limit!==null) {
|
||||||
|
$this->limit = $limit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($conditions)>0) {
|
||||||
|
$this->conditions = $conditions;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($input)) {
|
||||||
|
$this->parse($input);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user