| Conditions | 8 |
| Paths | 32 |
| Total Lines | 41 |
| Code Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public static function convert(\Gedcom\Record\ObjeRef &$obje, $level) |
||
| 26 | { |
||
| 27 | $output = ''; |
||
| 28 | |||
| 29 | // $_note |
||
| 30 | $_obje = $obje->getObje(); |
||
|
|
|||
| 31 | if (!empty($_note)) { |
||
| 32 | $output .= $level.' OBJE '.$_obje."\n"; |
||
| 33 | } else { |
||
| 34 | $output .= $level." OBJE \n"; |
||
| 35 | } |
||
| 36 | |||
| 37 | $level++; |
||
| 38 | // _form |
||
| 39 | $_form = $obje->getForm(); |
||
| 40 | if (!empty($_form)) { |
||
| 41 | $output .= $level.' FORM '.$_form."\n"; |
||
| 42 | } |
||
| 43 | |||
| 44 | // _titl |
||
| 45 | $_titl = $obje->getTitl(); |
||
| 46 | if (!empty($_titl)) { |
||
| 47 | $output .= $level.' TITL '.$_titl."\n"; |
||
| 48 | } |
||
| 49 | |||
| 50 | // _file |
||
| 51 | $_file = $obje->getFile(); |
||
| 52 | if (!empty($_file)) { |
||
| 53 | $output .= $level.' FILE '.$_file."\n"; |
||
| 54 | } |
||
| 55 | |||
| 56 | // $_note = array() |
||
| 57 | $_note = $obje->getNote(); |
||
| 58 | if (!empty($_note) && count($_note) > 0) { |
||
| 59 | foreach ($_note as $item) { |
||
| 60 | $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); |
||
| 61 | $output .= $_convert; |
||
| 62 | } |
||
| 63 | } |
||
| 64 | |||
| 65 | return $output; |
||
| 66 | } |
||
| 68 |