Profile
in package
The rules of one GEDCOM version as data: which structures exist, where they may appear and how often, their payload types, enumerations and calendars. Compiled from spec/ into resources/profiles by bin/generate-profiles.php.
Tags
Table of Contents
Methods
-
calendars()
: array<string, array{uri: string, months: list
, epochs: list }> - choices() : array<int, array<int, string>>
- 7.0: groups of substructures of which a structure allows one (spec/7.0/choices.yaml: HEAD has a NOTE or an SNOTE).
- deprecatedValue() : string|null
- 7.0: as deprecation(), for a value of an enumeration set.
- deprecatedWithout() : string|null
- 7.0: the tag of the substructure without which a structure is deprecated (EXID without TYPE).
- deprecation() : string|null
- 7.0: what to write instead of a deprecated structure (spec/7.0/deprecations.yaml); '' when the specification names nothing, null when the structure is not deprecated.
- enumeration() : array<int, string>
- for() : self
- has() : bool
- listed() : array<int, string>
- Values the specification lists for a 5.5.5 text element with a size, valid whatever their length: the printed size contradicts them ("<NAME_TYPE>" aka, {Size=5:30}).
- months() : array<string, string>
- record() : Substructure|null
- A top-level structure (record, HEAD or TRLR) by tag.
- records() : array<string, Substructure>
- resolve() : Structure|null
- The structure reached by a path of tags from the top level, e.g. ['INDI', 'BIRT', 'DATE']; null when some tag is not allowed there (an extension tag, or an error).
- size() : array{int, int}|null
- The minimum and maximum length of a 5.5.5 text element such as "<ADDRESS_CITY>", in characters; null when the version gives none (sizes are recommendations before 5.5.5).
- source() : string
- Where the profile was compiled from, e.g. "FamilySearch GEDCOM v7.0.18 (…)".
- structure() : Structure|null
- type() : string|null
- The kind of a 5.x primitive element such as "<SEX_VALUE>": "ENUM" (values from enumeration()) or the name of a grammar such as "DATE_VALUE"; null for text and in 7.0.
- version() : Version
Methods
calendars()
public
calendars() : array<string, array{uri: string, months: list, epochs: list}>
Return values
array<string, array{uri: string, months: listby calendar tag
choices()
7.0: groups of substructures of which a structure allows one (spec/7.0/choices.yaml: HEAD has a NOTE or an SNOTE).
public
choices(string $uri) : array<int, array<int, string>>
Parameters
- $uri : string
Return values
array<int, array<int, string>>deprecatedValue()
7.0: as deprecation(), for a value of an enumeration set.
public
deprecatedValue(string $enumerationSet, string $value) : string|null
Parameters
- $enumerationSet : string
- $value : string
Return values
string|nulldeprecatedWithout()
7.0: the tag of the substructure without which a structure is deprecated (EXID without TYPE).
public
deprecatedWithout(string $uri) : string|null
Parameters
- $uri : string
Return values
string|nulldeprecation()
7.0: what to write instead of a deprecated structure (spec/7.0/deprecations.yaml); '' when the specification names nothing, null when the structure is not deprecated.
public
deprecation(string $uri) : string|null
Parameters
- $uri : string
Return values
string|nullenumeration()
public
enumeration(string $uri) : array<int, string>
Parameters
- $uri : string
Return values
array<int, string> —values of an enumeration set (7.0 URI) or of a 5.x element ("<SEX_VALUE>")
for()
public
static for(Version $version) : self
Parameters
- $version : Version
Tags
Return values
selfhas()
public
static has(Version $version) : bool
Parameters
- $version : Version
Return values
boollisted()
Values the specification lists for a 5.5.5 text element with a size, valid whatever their length: the printed size contradicts them ("<NAME_TYPE>" aka, {Size=5:30}).
public
listed(string $element) : array<int, string>
Parameters
- $element : string
Return values
array<int, string>months()
public
months() : array<string, string>
Return values
array<string, string> —7.0: month URI => tag, of every calendar
record()
A top-level structure (record, HEAD or TRLR) by tag.
public
record(string $tag) : Substructure|null
Parameters
- $tag : string
Return values
Substructure|nullrecords()
public
records() : array<string, Substructure>
Return values
array<string, Substructure> —top-level structures by tag
resolve()
The structure reached by a path of tags from the top level, e.g. ['INDI', 'BIRT', 'DATE']; null when some tag is not allowed there (an extension tag, or an error).
public
resolve(array<int, string> $tags) : Structure|null
Parameters
- $tags : array<int, string>
Return values
Structure|nullsize()
The minimum and maximum length of a 5.5.5 text element such as "<ADDRESS_CITY>", in characters; null when the version gives none (sizes are recommendations before 5.5.5).
public
size(string $element) : array{int, int}|null
Parameters
- $element : string
Return values
array{int, int}|nullsource()
Where the profile was compiled from, e.g. "FamilySearch GEDCOM v7.0.18 (…)".
public
source() : string
Return values
stringstructure()
public
structure(string $uri) : Structure|null
Parameters
- $uri : string
Return values
Structure|nulltype()
The kind of a 5.x primitive element such as "<SEX_VALUE>": "ENUM" (values from enumeration()) or the name of a grammar such as "DATE_VALUE"; null for text and in 7.0.
public
type(string $element) : string|null
Parameters
- $element : string
Return values
string|nullversion()
public
version() : Version