Свойство | Тип | Описание | |
---|---|---|---|
$encodedEOLDelimiter | End of line delimiter, encoded using the same encoding as the CSV | ||
$encoding | Encoding of the CSV file to be read | ||
$encodingHelper | Helper to work with different encodings | ||
$fieldDelimiter | Defines the character used to delimit fields (one character only) | ||
$fieldEnclosure | Defines the character used to enclose fields (one character only) | ||
$filePointer | Pointer to the CSV file to read | ||
$globalFunctionsHelper | Helper to work with global functions | ||
$hasReachedEndOfFile | Indicates whether all rows have been read | ||
$inputEOLDelimiter | End of line delimiter, given by the user as input. | ||
$numReadRows | Number of read rows | ||
$rowDataBuffer | Buffer used to store the row data, while checking if there are more rows to read | ||
$shouldPreserveEmptyRows | Whether empty rows should be returned or skipped |
Метод | Описание | |
---|---|---|
__construct ( resource $filePointer, |
||
current ( ) : array | null | Return the current element from the buffer | |
end ( ) : void | Cleans up what was created to iterate over the object. | |
key ( ) : integer | Return the key of the current element | |
next ( ) : void | Move forward to next element. Reads data for the next unprocessed row. | |
rewind ( ) : void | Rewind the Iterator to the first element | |
valid ( ) : boolean | Checks if current position is valid |
Метод | Описание | |
---|---|---|
getEncodedEOLDelimiter ( ) : string | Returns the end of line delimiter, encoded using the same encoding as the CSV. | |
getNextUTF8EncodedRow ( ) : array | false | Returns the next row, converted if necessary to UTF-8. | |
isEmptyLine ( array | boolean $lineData ) : boolean | ||
readDataForNextRow ( ) : void | ||
rewindAndSkipBom ( ) : void | This rewinds and skips the BOM if inserted at the beginning of the file by moving the file pointer after it, so that it is not read. | |
shouldReadNextRow ( array | boolean $currentRowData ) : boolean |
public __construct ( resource $filePointer, |
||
$filePointer | resource | Pointer to the CSV file to read |
$options | ||
$globalFunctionsHelper | Box\Spout\Common\Helper\GlobalFunctionsHelper |
protected getEncodedEOLDelimiter ( ) : string | ||
Результат | string |
protected getNextUTF8EncodedRow ( ) : array | false | ||
Результат | array | false | The row for the current file pointer, encoded in UTF-8 or FALSE if nothing to read |
protected rewindAndSkipBom ( ) : void | ||
Результат | void |
protected $encodedEOLDelimiter |
protected $encodingHelper |
protected $fieldDelimiter |
protected $fieldEnclosure |
protected $globalFunctionsHelper |
protected $hasReachedEndOfFile |
protected $inputEOLDelimiter |
protected $rowDataBuffer |