Conditions | 6 |
Paths | 5 |
Total Lines | 28 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public static function convert(\Gedcom\Record\Indi\Famc &$famc, $level = 0) |
||
26 | { |
||
27 | $output = ''; |
||
28 | // NAME |
||
29 | $_famc = $famc->getFams(); |
||
|
|||
30 | if (empty($_fams)) { |
||
31 | return $output; |
||
32 | } |
||
33 | $output .= $level.' FAMC @'.$_famc."@\n"; |
||
34 | // level up |
||
35 | $level++; |
||
36 | |||
37 | // PEDI |
||
38 | $pedi = $famc->getPedi(); |
||
39 | if (!empty($pedi)) { |
||
40 | $output .= $level.' PEDI '.$pedi."\n"; |
||
41 | } |
||
42 | |||
43 | // note |
||
44 | $note = $famc->getSour(); |
||
45 | if (!empty($note) && count($note) > 0) { |
||
46 | foreach ($note as $item) { |
||
47 | $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); |
||
48 | $output .= $_convert; |
||
49 | } |
||
50 | } |
||
51 | |||
52 | return $output; |
||
53 | } |
||
55 |