Korin API

Nodes
in package
implements Rule

Read onlyYes
FinalYes

Walks a record once, in document order, and gives every structure to each of its rules for that tag in turn; CONC/CONT lines are part of their structure's value and are not visited. A structure a rule removes is not given to the rules after it, nor are its substructures. An extension a rule makes a structure again is given to the rules of its new tag, that rule but, from the first: those that saw it as an extension passed it by, so a rule for every tag sees it twice.

Table of Contents

Interfaces

Rule
One conversion rule. It changes one record at a time, so that a conversion can stream: what it must know about the whole input comes from the Prepass, which runs only when a rule needs it.

Methods

__construct()  : mixed
needsPrepass()  : bool
Whether the rule needs Context::prepass(): facts about the whole input before the first record.
record()  : void
Converts one record (HEAD and TRLR included) of the document in place.

Methods

needsPrepass()

Whether the rule needs Context::prepass(): facts about the whole input before the first record.

public needsPrepass() : bool
Return values
bool

record()

Converts one record (HEAD and TRLR included) of the document in place.

public record(Document $document, int $record, Context $context) : void
Parameters
$document : Document
$record : int
$context : Context
On this page

Search results