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
__construct()
public
__construct(NodeRule ...$rules) : mixed
Parameters
- $rules : NodeRule
needsPrepass()
Whether the rule needs Context::prepass(): facts about the whole input before the first record.
public
needsPrepass() : bool
Return values
boolrecord()
Converts one record (HEAD and TRLR included) of the document in place.
public
record(Document $document, int $record, Context $context) : void