Conditions | 1 |
Paths | 1 |
Total Lines | 38 |
Code Lines | 31 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public static function read($conn, \Gedcom\Record\Indi\Name\Fone $item, $group = '', $group_id = 0) |
||
15 | { |
||
16 | $type = $item->getType(); |
||
17 | $name = $item->getName(); |
||
18 | $npfx = $item->getNpfx(); |
||
19 | $givn = $item->getGivn(); |
||
20 | $nick = $item->getNick(); |
||
21 | $spfx = $item->getSpfx(); |
||
22 | $surn = $item->getSurn(); |
||
23 | $nsfx = $item->getNsfx(); |
||
24 | |||
25 | // store asso |
||
26 | $key = [ |
||
27 | 'group'=> $group, |
||
28 | 'gid' => $group_id, |
||
29 | 'type' => $type, |
||
30 | 'name' => $name, |
||
31 | 'npfx' => $npfx, |
||
32 | 'givn' => $givn, |
||
33 | 'nick' => $nick, |
||
34 | 'spfx' => $spfx, |
||
35 | 'surn' => $surn, |
||
36 | 'nsfx' => $nsfx, |
||
37 | ]; |
||
38 | $data = [ |
||
39 | 'group'=> $group, |
||
40 | 'gid' => $group_id, |
||
41 | 'type' => $type, |
||
42 | 'name' => $name, |
||
43 | 'npfx' => $npfx, |
||
44 | 'givn' => $givn, |
||
45 | 'nick' => $nick, |
||
46 | 'spfx' => $spfx, |
||
47 | 'surn' => $surn, |
||
48 | 'nsfx' => $nsfx, |
||
49 | ]; |
||
50 | |||
51 | $record = PersonNameFone::on($conn)->updateOrCreate($key, $data); |
||
|
|||
52 | } |
||
54 |