Korin API

PersonalName
in package
implements Stringable

Read onlyYes
FinalYes

The value of a personal NAME: the text before the surname, the surname between slashes and the text after it ("Анна /Коваль/", "Ivan /Petrenko/ Jr."). The same in every version. The name pieces (GIVN, SURN, NPFX and the others) are substructures, not part of the value.

Table of Contents

Interfaces

Stringable

Properties

$given  : string
$suffix  : string
$surname  : string|null

Methods

__construct()  : mixed
__toString()  : string
full()  : string
The name as it is read: "Анна Коваль", without slashes.
of()  : self
"Анна", "Коваль": "Анна /Коваль/".
parse()  : self
toGedcom()  : string
The NAME value: "Анна /Коваль/".
tryParse()  : self|null
withGiven()  : self
withSurname()  : self

Properties

Methods

__construct()

public __construct([string $given = '' ][, string|null $surname = null ][, string $suffix = '' ]) : mixed
Parameters
$given : string = ''
$surname : string|null = null

null when the name has no slashes; "" for "//"

$suffix : string = ''

__toString()

public __toString() : string
Return values
string

full()

The name as it is read: "Анна Коваль", without slashes.

public full() : string
Return values
string

of()

"Анна", "Коваль": "Анна /Коваль/".

public static of(string $given[, string|null $surname = null ][, string $suffix = '' ]) : self
Parameters
$given : string
$surname : string|null = null
$suffix : string = ''
Return values
self

parse()

public static parse(string $value) : self
Parameters
$value : string
Tags
throws
InvalidValueException

when the value has other than none or two slashes, or control characters

Return values
self

toGedcom()

The NAME value: "Анна /Коваль/".

public toGedcom() : string
Return values
string

tryParse()

public static tryParse(string $value) : self|null
Parameters
$value : string
Return values
self|null

withGiven()

public withGiven(string $given) : self
Parameters
$given : string
Return values
self

withSurname()

public withSurname(string|null $surname) : self
Parameters
$surname : string|null
Return values
self
On this page

Search results