FloeStreamReader
FinalYes
Methods
- __construct() : mixed
- close() : void
- footer() : Footer
- head() : Generator<int, Rows>
- The first $count rows, without scanning the rest of the file.
- metadata() : Metadata
- rows() : Generator<int, Rows>
- Hot path: frames are walked in-buffer. offset skips whole leading sections using the footer, then the remaining rows inside the start section; limit stops the read after that many rows.
- schema() : Schema
- tail() : Generator<int, Rows>
- The last $count rows, decoding only from the boundary section onward (footer offsets, no scan). A file with fewer rows yields them all.
- totalRows() : int
Methods
__construct()
public
__construct(SourceStream $source, Codec $codec, int $chunkSize[, null|Hydrator $hydrator = null ][, FloeEngine $engine = FloeEngine::adaptive ]) : mixed
Parameters
- $source : SourceStream
- $codec : Codec
- $chunkSize : int
- $hydrator : null|Hydrator = null
-
null uses the adaptive hydrator
- $engine : FloeEngine = FloeEngine::adaptive
Tags
close()
public
close() : void
footer()
public
footer() : Footer
Tags
Return values
Footerhead()
The first $count rows, without scanning the rest of the file.
public
head(int $count[, int<1, max> $batchSize = 1000 ]) : Generator<int, Rows>
Parameters
- $count : int
- $batchSize : int<1, max> = 1000
Tags
Return values
Generator<int, Rows>metadata()
public
metadata() : Metadata
Tags
Return values
Metadatarows()
Hot path: frames are walked in-buffer. offset skips whole leading sections using the footer, then the remaining rows inside the start section; limit stops the read after that many rows.
public
rows([int<1, max> $batchSize = 1000 ][, int $offset = 0 ][, int|null $limit = null ][, bool $conform = true ]) : Generator<int, Rows>
Parameters
- $batchSize : int<1, max> = 1000
- $offset : int = 0
- $limit : int|null = null
- $conform : bool = true
-
pad/reorder every batch to the merged file schema (default); false yields rows verbatim per section (the raw read used by spill buckets)
Tags
Return values
Generator<int, Rows> —every batch conforms to the merged file schema unless $conform is false
schema()
public
schema() : Schema
Tags
Return values
Schematail()
The last $count rows, decoding only from the boundary section onward (footer offsets, no scan). A file with fewer rows yields them all.
public
tail(int $count[, int<1, max> $batchSize = 1000 ]) : Generator<int, Rows>
Parameters
- $count : int
- $batchSize : int<1, max> = 1000
Tags
Return values
Generator<int, Rows>totalRows()
public
totalRows() : int