EntryReader
in package
AbstractYes
Class EntryReader
Tags
Table of Contents
Methods
- read() : Generator
- A record is gathered before it is identified : a parser reads the identifier out of the lines it is handed, so handing it the whole file would identify every record of that file as its first one. Lines sitting before any record start - the header a data file may open with - belong to no record. A format closing no record leaves the previous one open.
- entry() : array<string|int, mixed>
Methods
read()
A record is gathered before it is identified : a parser reads the identifier out of the lines it is handed, so handing it the whole file would identify every record of that file as its first one. Lines sitting before any record start - the header a data file may open with - belong to no record. A format closing no record leaves the previous one open.
public
static read(array<string|int, mixed> $aFileLines, string $sDbFormat) : Generator
Parameters
- $aFileLines : array<string|int, mixed>
-
The lines of the data file
- $sDbFormat : string
-
Database format, e.g. "GENBANK"
Tags
Return values
Generator —Yields, for each record : "id", "lines" and "line_no"
entry()
private
static entry(array<string|int, mixed> $aEntryLines, string $sStartLine, int $iStartNo, string $sDbFormat) : array<string|int, mixed>
Parameters
- $aEntryLines : array<string|int, mixed>
- $sStartLine : string
- $iStartNo : int
- $sDbFormat : string