Fam::addRefn()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * php-gedcom.
4
 *
5
 * php-gedcom is a library for parsing, manipulating, importing and exporting
6
 * GEDCOM 5.5 files in PHP 5.3+.
7
 *
8
 * @author          Kristopher Wilson <[email protected]>
9
 * @copyright       Copyright (c) 2010-2013, Kristopher Wilson
10
 * @license         MIT
11
 *
12
 * @link            http://github.com/mrkrstphr/php-gedcom
13
 */
14
15
namespace Gedcom\Record;
16
17
class Fam extends \Gedcom\Record implements Noteable, Sourceable, Objectable
18
{
19
    protected $_id;
20
21
    protected $_resn;
22
23
    protected $_even = [];
24
25
    protected $_husb;
26
27
    protected $_wife;
28
29
    protected $_chil = [];
30
31
    protected $_nchi;
32
33
    protected $_subm = [];
34
35
    protected $_slgs = [];
36
37
    protected $_refn = [];
38
39
    protected $_rin;
40
41
    protected $_chan;
42
43
    protected $_note = [];
44
45
    protected $_sour = [];
46
47
    protected $_obje = [];
48
49
    public function addEven($even)
50
    {
51
        $this->_even[$even->getType()] = $even;
52
    }
53
54
    /**
55
     * @return array
56
     */
57
    public function getAllEven()
58
    {
59
        return $this->_even;
60
    }
61
62
    /**
63
     * @return void|\Gedcom\Record\Fam\Even
64
     */
65
    public function getEven($key = '')
66
    {
67
        if (isset($this->_even[strtoupper($key)])) {
68
            return $this->_even[strtoupper($key)];
69
        }
70
    }
71
72
    public function addSlgs($slgs = [])
73
    {
74
        $this->_slgs[] = $slgs;
75
    }
76
77
    public function addRefn($refn = [])
78
    {
79
        $this->_refn[] = $refn;
80
    }
81
82
    public function addNote($note = [])
83
    {
84
        $this->_note[] = $note;
85
    }
86
87
    public function addSour($sour = [])
88
    {
89
        $this->_sour[] = $sour;
90
    }
91
92
    public function addObje($obje = [])
93
    {
94
        $this->_obje[] = $obje;
95
    }
96
}
97