| [ Index ] |
PHP Cross Reference of Moodle 310 |
[Source view] [Print] [Project Stats]
(no description)
| File Size: | 252 lines (9 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
RowIterator:: (12 methods):
__construct()
rewind()
rewindAndSkipBom()
valid()
next()
readDataForNextRow()
shouldReadNextRow()
getNextUTF8EncodedRow()
isEmptyLine()
current()
key()
end()
Class: RowIterator - X-Ref
Class RowIterator| __construct($filePointer,OptionsManagerInterface $optionsManager,EncodingHelper $encodingHelper,InternalEntityFactory $entityFactory,GlobalFunctionsHelper $globalFunctionsHelper) X-Ref |
param: resource $filePointer Pointer to the CSV file to read param: OptionsManagerInterface $optionsManager param: EncodingHelper $encodingHelper param: InternalEntityFactory $entityFactory param: GlobalFunctionsHelper $globalFunctionsHelper |
| rewind() X-Ref |
| Rewind the Iterator to the first element return: void |
| rewindAndSkipBom() X-Ref |
| 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. return: void |
| valid() X-Ref |
| Checks if current position is valid return: bool |
| next() X-Ref |
| Move forward to next element. Reads data for the next unprocessed row. return: void |
| readDataForNextRow() X-Ref |
return: void |
| shouldReadNextRow($currentRowData) X-Ref |
param: array|bool $currentRowData return: bool Whether the data for the current row can be returned or if we need to keep reading |
| getNextUTF8EncodedRow() X-Ref |
| Returns the next row, converted if necessary to UTF-8. As fgetcsv() does not manage correctly encoding for non UTF-8 data, we remove manually whitespace with ltrim or rtrim (depending on the order of the bytes) return: array|false The row for the current file pointer, encoded in UTF-8 or FALSE if nothing to read |
| isEmptyLine($lineData) X-Ref |
param: array|bool $lineData Array containing the cells value for the line return: bool Whether the given line is empty |
| current() X-Ref |
| Return the current element from the buffer return: Row|null |
| key() X-Ref |
| Return the key of the current element return: int |
| end() X-Ref |
| Cleans up what was created to iterate over the object. return: void |
| Generated: Wed Jan 22 11:59:49 2025 | Cross-referenced by PHPXref 0.7.1 |