Media
in package
implements
NodeRule
Media in the 5.5.1 structure, where FORM belongs to a FILE:
- a link (OBJE without a pointer): FORM moves into its FILE;
- a record: 5.5 has no FILE in it, only the object itself (BLOB). The conversion from 5.5.1 writes the file as _FILE and its FORM and TITL in the record (V551ToV55\Media); a record with _FILE, or with a FILE as some programs write in 5.5, gets them back in a FILE. A record without either keeps them, as extensions (Structures).
5.5.1 → 7.0 runs it on links ($links): a 5.5 NOTE.SOUR, which 5.5.1 makes _SOUR and 7.0 SOUR again, keeps the 5.5 link, as do 5.5.1 files of programs that write it so; one with several FILE, or with a FILE that has its FORM, is a 5.5.1 link with a FORM out of place (an extension, Structures).
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([bool $links = false ]) : mixed
Parameters
- $links : bool = false
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