Enumerations
in package
implements
NodeRule
Enumeration values in 5.5.1 case and spelling (BIRTH → birth, PRE_1970 → PRE-1970, DNS_CAN → DNS/CAN); OTHER with a PHRASE → the PHRASE (TYPE OTHER + PHRASE Screen → Screen), and a role description in parentheses where 5.5.1 has one (ROLE OTHER + PHRASE midwife → (midwife)).
ASSO.ROLE becomes RELA (FRIEND → Friend, GODP + PHRASE godmother → godmother), FORM.MEDI becomes FORM.TYPE.
Every value is one that converts up to the same value and PHRASE again. A PHRASE that cannot join the value stays for the structures rule. A value the 5.5.1 structure does not take (MEDI OTHER + PHRASE Portrait: FORM.TYPE is a closed list; STAT INFANT) keeps the 7.0 structure as an extension (_MEDI, KL3001); one it takes although 5.5.1 does not list it (PEDI OTHER) is written in 5.5.1 case. SEX X is left to the structures rule.
Table of Contents
Interfaces
- NodeRule
- A rule for one structure at a time. Rules that look at every line of a record are grouped in {@see Rule\Nodes}, which walks each record once for all of them.
Methods
- __construct() : mixed
- needsPrepass() : bool
- Whether the rule needs Context::prepass(): facts about the whole input before the first record.
- node() : bool
- Converts one structure (a record or a substructure; never a CONC/CONT line) with one of the rule's tags, as the structure is tagged when the walk reaches it, in place. Its substructures are visited after it, as they are when this returns.
- tags() : array<int, string>|null
Methods
__construct()
public
__construct() : mixed
needsPrepass()
Whether the rule needs Context::prepass(): facts about the whole input before the first record.
public
needsPrepass() : bool
Return values
boolnode()
Converts one structure (a record or a substructure; never a CONC/CONT line) with one of the rule's tags, as the structure is tagged when the walk reaches it, in place. Its substructures are visited after it, as they are when this returns.
public
node(Document $document, int $id, Context $context) : bool
Parameters
Return values
bool —false when the rule removed the structure: the rules after it and its substructures are skipped
tags()
public
tags() : array<int, string>|null
Return values
array<int, string>|null —the tags of the structures the rule converts; null for every structure