Korin API

Source extends RecordView
in package

FinalYes

A live view of a SOUR record: title, author, publication, abbreviation, text and repositories.

Table of Contents

Constants

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

Properties

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

Methods

__construct()  : mixed
abbreviation()  : string|null
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.
addRepository()  : self
Adds a REPO pointer (with CALN), unless there is one to the repository.
author()  : string|null
callNumber()  : string|null
CALN under the REPO pointing to the repository: where the source is kept there.
content()  : string|null
TEXT: a transcription of the source.
node()  : Node
of()  : self|null
publication()  : string|null
repositories()  : array<int, Repository>
repositoryXrefs()  : array<int, string>
setAuthor()  : self
setPublication()  : self
setTitle()  : self
tagIn()  : string
The tag of the record type in a version.
title()  : string|null
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 = 'SOUR'

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

Properties

Methods

abbreviation()

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

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

addRepository()

Adds a REPO pointer (with CALN), unless there is one to the repository.

public addRepository(Repository $repository[, string|null $callNumber = null ]) : self
Parameters
$repository : Repository
$callNumber : string|null = null
Return values
self

author()

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

callNumber()

CALN under the REPO pointing to the repository: where the source is kept there.

public callNumber(Repository $repository) : string|null
Parameters
$repository : Repository
Return values
string|null

content()

TEXT: a transcription of the source.

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

publication()

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

repositoryXrefs()

public repositoryXrefs() : array<int, string>
Return values
array<int, string> —

REPO pointers; no other record is read

setAuthor()

public setAuthor(string|null $author) : self
Parameters
$author : string|null
Return values
self

setPublication()

public setPublication(string|null $publication) : self
Parameters
$publication : string|null
Return values
self

setTitle()

public setTitle(string|null $title) : self
Parameters
$title : string|null
Return values
self

tagIn()

The tag of the record type in a version.

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

title()

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