-
Notifications
You must be signed in to change notification settings - Fork 4
/
SurnameWithPatriarch.php
50 lines (38 loc) · 1.03 KB
/
SurnameWithPatriarch.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
namespace Cissee\Webtrees\Module\ExtendedRelationships;
class SurnameWithPatriarch {
protected $actualSurname;
protected $patriarchXref;
protected $same;
protected $count;
protected $helpLink;
public function getActualSurname(): string {
return $this->actualSurname;
}
public function getPatriarchXref(): string {
return $this->patriarchXref;
}
public function isSame(): bool {
return $this->same && ($this->count == 1);
}
public function getCount(): int {
return $this->count;
}
public function increment() {
$this->count++;
}
public function getHelpLink() {
return $this->helpLink;
}
public function __construct(
string $actualSurname,
string $patriarchXref,
bool $same,
string $helpLink) {
$this->actualSurname = $actualSurname;
$this->patriarchXref = $patriarchXref;
$this->same = $same;
$this->count = 1;
$this->helpLink = $helpLink;
}
}