JsonFileSample implements IteratorAggregate
FinalYes
Tags
Interfaces
- IteratorAggregate
Methods
- __construct() : mixed
- bytes() : int
- Bytes read so far, line endings included; 0 until the sample was iterated.
- complete() : bool
- True once an iteration reached the end of the file; false until then, and when the consumer stopped first.
- getIterator() : Generator<int, array<string|int, mixed>>
- Records what it read when the consumer stops or the file ends, whichever comes first.
Methods
__construct()
public
__construct(JsonFileReader $reader, SourceFile $source[, null|FileSplit $window = null ]) : mixed
Parameters
- $reader : JsonFileReader
- $source : SourceFile
- $window : null|FileSplit = null
-
the byte window of $source to sample, Lines only; null samples it whole
bytes()
Bytes read so far, line endings included; 0 until the sample was iterated.
public
bytes() : int
Return values
intcomplete()
True once an iteration reached the end of the file; false until then, and when the consumer stopped first.
public
complete() : bool
Return values
boolgetIterator()
Records what it read when the consumer stops or the file ends, whichever comes first.
public
getIterator() : Generator<int, array<string|int, mixed>>