1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Samwilson\SimpleWikidata\Items; |
4
|
|
|
|
5
|
|
|
use Samwilson\SimpleWikidata\Item; |
6
|
|
|
|
7
|
|
|
/** |
8
|
|
|
* @link https://www.wikidata.org/wiki/Q5 |
9
|
|
|
*/ |
10
|
|
|
class Human extends Item { |
11
|
|
|
|
12
|
|
|
const PROP_DATE_OF_BIRTH = 'P569'; |
13
|
|
|
const PROP_PLACE_OF_BIRTH = 'P19'; |
14
|
|
|
|
15
|
|
|
const PROP_DATE_OF_DEATH = 'P570'; |
16
|
|
|
const PROP_PLACE_OF_DEATH = 'P20'; |
17
|
|
|
|
18
|
|
|
const PROP_FATHER = 'P22'; |
19
|
|
|
const PROP_MOTHER = 'P25'; |
20
|
|
|
const PROP_SPOUSE = 'P26'; |
21
|
|
|
const PROP_CHILD = 'P40'; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @return bool|\Samwilson\SimpleWikidata\Properties\Time[] |
25
|
|
|
*/ |
26
|
|
|
public function getDatesOfBirth() { |
27
|
|
|
return $this->getPropertyOfTypeTime( self::PROP_DATE_OF_BIRTH ); |
28
|
|
|
} |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @return bool|\Samwilson\SimpleWikidata\Properties\Time[] |
32
|
|
|
*/ |
33
|
|
|
public function getDatesOfDeath() { |
34
|
|
|
return $this->getPropertyOfTypeTime( self::PROP_DATE_OF_DEATH ); |
35
|
|
|
} |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* @return \Samwilson\SimpleWikidata\Properties\Item[] |
39
|
|
|
*/ |
40
|
|
|
public function fathers() { |
41
|
|
|
return $this->getPropertyOfTypeItem( self::PROP_FATHER ); |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* @return \Samwilson\SimpleWikidata\Properties\Item[] |
46
|
|
|
*/ |
47
|
|
|
public function mothers() { |
48
|
|
|
return $this->getPropertyOfTypeItem( self::PROP_FATHER ); |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @return \Samwilson\SimpleWikidata\Properties\Item[] |
53
|
|
|
*/ |
54
|
|
|
public function spouses() { |
55
|
|
|
return $this->getPropertyOfTypeItem( self::PROP_SPOUSE ); |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @return \Samwilson\SimpleWikidata\Properties\Item[] |
60
|
|
|
*/ |
61
|
|
|
public function children() { |
62
|
|
|
return $this->getPropertyOfTypeItem( self::PROP_CHILD ); |
63
|
|
|
} |
64
|
|
|
} |
65
|
|
|
|