Korin API

MediaObject extends RecordView
in package

FinalYes

A live view of an OBJE record: its files and title.

Table of Contents

Constants

EVENTS  : array<string, true> = []
TAG  : string = 'OBJE'

Properties

$file  : Document|IndexedDocument|null
$node  : Node

Methods

__construct()  : mixed
addEvent()  : Event
Adds an event of the record type; one without a date or place is "Y", it happened. The tree is not changed when the date cannot be written in the version.
addFile()  : MediaFile
Adds a FILE with its FORM: a media type in 7.0 ("image/jpeg"), a format in 5.x ("jpg").
files()  : array<int, MediaFile>
node()  : Node
of()  : self|null
tagIn()  : string
The tag of the record type in a version.
title()  : string|null
The title of the first file, or of the record (5.5).
typed()  : T|null
xref()  : string|null
eventsOf()  : array<int, Event>
lookUp()  : Node|null
The record of a pointer, or null when there is none of that type.
pointers()  : array<int, string>
setText()  : static
Replaces the value of the first substructure with this tag, adds one, or removes it for null.
text()  : string|null
The value of the first substructure with this tag.
version()  : Version

Constants

EVENTS

public array<string, true> EVENTS = []

events of the record type, by tag

TAG

public string TAG = 'OBJE'

the record's tag; see self::tagIn()

Properties

Methods

addEvent()

Adds an event of the record type; one without a date or place is "Y", it happened. The tree is not changed when the date cannot be written in the version.

public addEvent(string $tag[, GedcomDate|null $date = null ][, Place|null $place = null ]) : Event
Parameters
$tag : string
$date : GedcomDate|null = null
$place : Place|null = null
Tags
throws
InvalidValueException

for a tag that is not an event of the record type, or a date the version cannot write

Return values
Event

addFile()

Adds a FILE with its FORM: a media type in 7.0 ("image/jpeg"), a format in 5.x ("jpg").

public addFile(string $path, string $format[, string|null $title = null ]) : MediaFile
Parameters
$path : string
$format : string
$title : string|null = null
Return values
MediaFile

tagIn()

The tag of the record type in a version.

public static tagIn(Version $version) : string
Parameters
$version : Version
Return values
string

title()

The title of the first file, or of the record (5.5).

public title() : string|null
Return values
string|null

xref()

public xref() : string|null
Return values
string|null

eventsOf()

protected eventsOf(array<string, true> $tags) : array<int, Event>
Parameters
$tags : array<string, true>
Return values
array<int, Event> —

the events with these tags, in order

lookUp()

The record of a pointer, or null when there is none of that type.

protected lookUp(string $xref, string $tag) : Node|null
Parameters
$xref : string
$tag : string
Return values
Node|null

pointers()

protected pointers(string $tag) : array<int, string>
Parameters
$tag : string
Return values
array<int, string> —

the pointers of these substructures, null pointers left out

setText()

Replaces the value of the first substructure with this tag, adds one, or removes it for null.

protected setText(string $tag, string|null $value) : static
Parameters
$tag : string
$value : string|null
Return values
static

text()

The value of the first substructure with this tag.

protected text(string $tag) : string|null
Parameters
$tag : string
Return values
string|null
On this page

Search results