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
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
$given
public
string
$given
= ''
$suffix
public
string
$suffix
= ''
$surname
public
string|null
$surname
= null
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
stringfull()
The name as it is read: "Анна Коваль", without slashes.
public
full() : string
Return values
stringof()
"Анна", "Коваль": "Анна /Коваль/".
public
static of(string $given[, string|null $surname = null ][, string $suffix = '' ]) : self
Parameters
- $given : string
- $surname : string|null = null
- $suffix : string = ''
Return values
selfparse()
public
static parse(string $value) : self
Parameters
- $value : string
Tags
Return values
selftoGedcom()
The NAME value: "Анна /Коваль/".
public
toGedcom() : string
Return values
stringtryParse()
public
static tryParse(string $value) : self|null
Parameters
- $value : string
Return values
self|nullwithGiven()
public
withGiven(string $given) : self
Parameters
- $given : string
Return values
selfwithSurname()
public
withSurname(string|null $surname) : self
Parameters
- $surname : string|null