Korin API

Payloads5
in package
implements PayloadTypes

Read onlyYes
FinalYes

GEDCOM 5.x payload types: the primitive elements of the profile ("<SEX_VALUE>") as enumerations or grammars (Grammar5, DateGrammar5); other elements are text. Enumerations are case-insensitive. An empty payload needs "<NULL>" among the alternatives. A payload written without angle brackets is a literal ("Y", 5.5.5 "LINEAGE-LINKED").

5.5.5 adds the lengths of text values ({Size=min:max}, KV3010) and "every GEDCOM record without subrecords must have a line value" (KV3007).

Table of Contents

Interfaces

PayloadTypes
The payload types of one GEDCOM version for ValueRule. A type is one alternative of a structure's payload: a 7.0 type URI, a 5.x element such as "<SEX_VALUE>", or "Y".

Methods

__construct()  : mixed
isOptional()  : bool
Whether the type allows an empty payload without saying so with "<NULL>".
problems()  : array<int, Severity, string}>
Why the value is not of the type: code, severity and a message that follows the tag.
requiresContent()  : bool
Whether a structure needs a value or a substructure (KV3007).

Methods

isOptional()

Whether the type allows an empty payload without saying so with "<NULL>".

public isOptional(string $type) : bool
Parameters
$type : string
Return values
bool

problems()

Why the value is not of the type: code, severity and a message that follows the tag.

public problems(Structure $structure, string $type, string $value) : array<int, Severity, string}>
Parameters
$structure : Structure
$type : string
$value : string
Return values
array<int, Severity, string}> —

empty when the value is of the type

requiresContent()

Whether a structure needs a value or a substructure (KV3007).

public requiresContent() : bool
Return values
bool
On this page

Search results