src/Csv.php
public function parse($input = null, $offset = null, $limit = null, $conditions = null) {
        if (is_null($input)) {
            $input = $this->file;
        }

        if (empty($input)) {
            return false;
        }

        $this->init($offset, $limit, $conditions);

        if (strlen($input) <= PHP_MAXPATHLEN && is_readable($input)) {
            $this->file = $input;
            $this->data = $this->parse_file();
        } else {
            $this->file = null;
            $this->file_data = &$input;
            $this->data = $this->parse_string();
        }

        return $this->data !== false;
    }
public function parse($input = null, $offset = null, $limit = null, $conditions = null) {
        if (is_null($input)) {
            $input = $this->file;
        }

        if (empty($input)) {
            return false;
        }

        $this->init($offset, $limit, $conditions);

        if (strlen($input) <= PHP_MAXPATHLEN && is_readable($input)) {
            $this->file = $input;
            $this->data = $this->parse_file();
        } else {
            $this->file = null;
            $this->file_data = &$input;
            $this->data = $this->parse_string();
        }

        return $this->data !== false;
    }
public function parse ( $ input = null , $ offset = null , $ limit = null , $ conditions = null ) { if ( is_null ( $ input ) ) { $ input = $ this -> file ; } if ( empty ( $ input ) ) { return false ; } $ this -> init ( $ offset , $ limit , $ conditions ) ; if ( strlen ( $ input ) <= PHP_MAXPATHLEN && is_readable ( $ input ) ) { $ this -> file = $ input ; $ this -> data = $ this -> parse_file ( ) ; } else { $ this -> file = null ; $ this -> file_data = & $ input ; $ this -> data = $ this -> parse_string ( ) ; } return $ this -> data !== false ; }
Parse
Parse a CSV file or string

@param  string|null $input      The CSV string or a direct file path
@param  integer     $offset     Number of rows to ignore from the
beginning of  the data
@param  integer     $limit      Limits the number of returned rows to
specified amount
@param  string      $conditions Basic SQL-like conditions for row
matching

@return bool True on success
Parse Parse a CSV file or string