From 598b5c4a728027224abfced662f6deb6ed539de4 Mon Sep 17 00:00:00 2001 From: Kristopher Wilson Date: Sun, 30 Apr 2017 16:09:32 -0400 Subject: [PATCH 1/2] =?UTF-8?q?A=20Fresh=20Start=E2=84=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 5 +- .php_cs | 18 + CONTRIBUTING.md | 31 + LICENSE.md | 21 + README.md | 58 +- composer.json | 43 +- composer.lock | 1743 ++++++++++++++--- library/PhpGedcom/Gedcom.php | 265 --- library/PhpGedcom/Parser.php | 324 --- library/PhpGedcom/Parser/Addr.php | 67 - library/PhpGedcom/Parser/Caln.php | 60 - library/PhpGedcom/Parser/Chan.php | 69 - library/PhpGedcom/Parser/Component.php | 30 - library/PhpGedcom/Parser/Fam.php | 134 -- library/PhpGedcom/Parser/Fam/Anul.php | 23 - library/PhpGedcom/Parser/Fam/Cens.php | 23 - library/PhpGedcom/Parser/Fam/Div.php | 23 - library/PhpGedcom/Parser/Fam/Divf.php | 23 - library/PhpGedcom/Parser/Fam/Enga.php | 23 - library/PhpGedcom/Parser/Fam/Even.php | 110 -- library/PhpGedcom/Parser/Fam/Even/Husb.php | 60 - library/PhpGedcom/Parser/Fam/Even/Wife.php | 60 - library/PhpGedcom/Parser/Fam/Marb.php | 23 - library/PhpGedcom/Parser/Fam/Marc.php | 23 - library/PhpGedcom/Parser/Fam/Marl.php | 23 - library/PhpGedcom/Parser/Fam/Marr.php | 23 - library/PhpGedcom/Parser/Fam/Mars.php | 23 - library/PhpGedcom/Parser/Fam/Slgs.php | 79 - library/PhpGedcom/Parser/Head.php | 106 - library/PhpGedcom/Parser/Head/Char.php | 61 - library/PhpGedcom/Parser/Head/Date.php | 61 - library/PhpGedcom/Parser/Head/Gedc.php | 63 - library/PhpGedcom/Parser/Head/Plac.php | 60 - library/PhpGedcom/Parser/Head/Sour.php | 72 - library/PhpGedcom/Parser/Head/Sour/Corp.php | 64 - library/PhpGedcom/Parser/Head/Sour/Data.php | 64 - library/PhpGedcom/Parser/Indi.php | 187 -- library/PhpGedcom/Parser/Indi/Adop.php | 34 - library/PhpGedcom/Parser/Indi/Asso.php | 71 - library/PhpGedcom/Parser/Indi/Attr.php | 104 - library/PhpGedcom/Parser/Indi/Bapl.php | 22 - library/PhpGedcom/Parser/Indi/Bapm.php | 23 - library/PhpGedcom/Parser/Indi/Barm.php | 23 - library/PhpGedcom/Parser/Indi/Basm.php | 23 - library/PhpGedcom/Parser/Indi/Birt.php | 28 - library/PhpGedcom/Parser/Indi/Bles.php | 23 - library/PhpGedcom/Parser/Indi/Buri.php | 23 - library/PhpGedcom/Parser/Indi/Cast.php | 23 - library/PhpGedcom/Parser/Indi/Cens.php | 23 - library/PhpGedcom/Parser/Indi/Chr.php | 28 - library/PhpGedcom/Parser/Indi/Chra.php | 23 - library/PhpGedcom/Parser/Indi/Conf.php | 23 - library/PhpGedcom/Parser/Indi/Conl.php | 23 - library/PhpGedcom/Parser/Indi/Crem.php | 23 - library/PhpGedcom/Parser/Indi/Deat.php | 23 - library/PhpGedcom/Parser/Indi/Dscr.php | 23 - library/PhpGedcom/Parser/Indi/Educ.php | 23 - library/PhpGedcom/Parser/Indi/Emig.php | 23 - library/PhpGedcom/Parser/Indi/Endl.php | 23 - library/PhpGedcom/Parser/Indi/Even.php | 122 -- library/PhpGedcom/Parser/Indi/Even/Plac.php | 74 - library/PhpGedcom/Parser/Indi/Famc.php | 75 - library/PhpGedcom/Parser/Indi/Fams.php | 72 - library/PhpGedcom/Parser/Indi/Fcom.php | 23 - library/PhpGedcom/Parser/Indi/Grad.php | 23 - library/PhpGedcom/Parser/Indi/Idno.php | 23 - library/PhpGedcom/Parser/Indi/Immi.php | 23 - library/PhpGedcom/Parser/Indi/Lds.php | 87 - library/PhpGedcom/Parser/Indi/Name.php | 86 - library/PhpGedcom/Parser/Indi/Nati.php | 23 - library/PhpGedcom/Parser/Indi/Natu.php | 23 - library/PhpGedcom/Parser/Indi/Nchi.php | 23 - library/PhpGedcom/Parser/Indi/Nmr.php | 23 - library/PhpGedcom/Parser/Indi/Occu.php | 23 - library/PhpGedcom/Parser/Indi/Ordn.php | 23 - library/PhpGedcom/Parser/Indi/Prob.php | 23 - library/PhpGedcom/Parser/Indi/Prop.php | 22 - library/PhpGedcom/Parser/Indi/Reli.php | 23 - library/PhpGedcom/Parser/Indi/Resi.php | 23 - library/PhpGedcom/Parser/Indi/Reti.php | 23 - library/PhpGedcom/Parser/Indi/Slgc.php | 31 - library/PhpGedcom/Parser/Indi/Ssn.php | 23 - library/PhpGedcom/Parser/Indi/Titl.php | 23 - library/PhpGedcom/Parser/Indi/Will.php | 23 - library/PhpGedcom/Parser/Note.php | 96 - library/PhpGedcom/Parser/NoteRef.php | 73 - library/PhpGedcom/Parser/Obje.php | 90 - library/PhpGedcom/Parser/ObjeRef.php | 77 - library/PhpGedcom/Parser/Phon.php | 58 - library/PhpGedcom/Parser/Refn.php | 61 - library/PhpGedcom/Parser/Repo.php | 87 - library/PhpGedcom/Parser/RepoRef.php | 68 - library/PhpGedcom/Parser/Sour.php | 103 - library/PhpGedcom/Parser/Sour/Data.php | 75 - library/PhpGedcom/Parser/Sour/Data/Even.php | 63 - library/PhpGedcom/Parser/SourRef.php | 92 - library/PhpGedcom/Parser/SourRef/Even.php | 61 - library/PhpGedcom/Parser/Subm.php | 95 - library/PhpGedcom/Parser/Subn.php | 82 - library/PhpGedcom/Record.php | 96 - library/PhpGedcom/Record/Addr.php | 185 -- library/PhpGedcom/Record/Caln.php | 70 - library/PhpGedcom/Record/Chan.php | 93 - library/PhpGedcom/Record/Data.php | 70 - library/PhpGedcom/Record/Fam.php | 141 -- library/PhpGedcom/Record/Fam/Anul.php | 22 - library/PhpGedcom/Record/Fam/Cens.php | 22 - library/PhpGedcom/Record/Fam/Div.php | 22 - library/PhpGedcom/Record/Fam/Enga.php | 22 - library/PhpGedcom/Record/Fam/Even.php | 87 - library/PhpGedcom/Record/Fam/Even/Husb.php | 23 - library/PhpGedcom/Record/Fam/Even/Wife.php | 23 - library/PhpGedcom/Record/Fam/Marb.php | 22 - library/PhpGedcom/Record/Fam/Marc.php | 22 - library/PhpGedcom/Record/Fam/Marl.php | 22 - library/PhpGedcom/Record/Fam/Marr.php | 22 - library/PhpGedcom/Record/Fam/Mars.php | 22 - library/PhpGedcom/Record/Fam/Slgs.php | 55 - library/PhpGedcom/Record/Head.php | 299 --- library/PhpGedcom/Record/Head/Char.php | 23 - library/PhpGedcom/Record/Head/Date.php | 24 - library/PhpGedcom/Record/Head/Gedc.php | 31 - library/PhpGedcom/Record/Head/Plac.php | 26 - library/PhpGedcom/Record/Head/Sour.php | 82 - library/PhpGedcom/Record/Head/Sour/Corp.php | 35 - library/PhpGedcom/Record/Head/Sour/Data.php | 24 - library/PhpGedcom/Record/Indi.php | 603 ------ library/PhpGedcom/Record/Indi/Adop.php | 24 - library/PhpGedcom/Record/Indi/Asso.php | 53 - library/PhpGedcom/Record/Indi/Attr.php | 67 - library/PhpGedcom/Record/Indi/Bapl.php | 22 - library/PhpGedcom/Record/Indi/Bapm.php | 22 - library/PhpGedcom/Record/Indi/Barm.php | 22 - library/PhpGedcom/Record/Indi/Basm.php | 22 - library/PhpGedcom/Record/Indi/Birt.php | 47 - library/PhpGedcom/Record/Indi/Bles.php | 22 - library/PhpGedcom/Record/Indi/Buri.php | 22 - library/PhpGedcom/Record/Indi/Cast.php | 22 - library/PhpGedcom/Record/Indi/Cens.php | 22 - library/PhpGedcom/Record/Indi/Chr.php | 23 - library/PhpGedcom/Record/Indi/Chra.php | 22 - library/PhpGedcom/Record/Indi/Conf.php | 22 - library/PhpGedcom/Record/Indi/Conl.php | 22 - library/PhpGedcom/Record/Indi/Crem.php | 22 - library/PhpGedcom/Record/Indi/Deat.php | 22 - library/PhpGedcom/Record/Indi/Dscr.php | 22 - library/PhpGedcom/Record/Indi/Educ.php | 22 - library/PhpGedcom/Record/Indi/Emig.php | 21 - library/PhpGedcom/Record/Indi/Endl.php | 22 - library/PhpGedcom/Record/Indi/Even.php | 323 --- library/PhpGedcom/Record/Indi/Even/Plac.php | 116 -- library/PhpGedcom/Record/Indi/Famc.php | 39 - library/PhpGedcom/Record/Indi/Fams.php | 41 - library/PhpGedcom/Record/Indi/Fcom.php | 22 - library/PhpGedcom/Record/Indi/Grad.php | 22 - library/PhpGedcom/Record/Indi/Idno.php | 22 - library/PhpGedcom/Record/Indi/Immi.php | 22 - library/PhpGedcom/Record/Indi/Lds.php | 55 - library/PhpGedcom/Record/Indi/Name.php | 55 - library/PhpGedcom/Record/Indi/Nati.php | 22 - library/PhpGedcom/Record/Indi/Natu.php | 22 - library/PhpGedcom/Record/Indi/Nchi.php | 22 - library/PhpGedcom/Record/Indi/Nmr.php | 22 - library/PhpGedcom/Record/Indi/Note.php | 18 - library/PhpGedcom/Record/Indi/Occu.php | 22 - library/PhpGedcom/Record/Indi/Ordn.php | 22 - library/PhpGedcom/Record/Indi/Prob.php | 22 - library/PhpGedcom/Record/Indi/Prop.php | 22 - library/PhpGedcom/Record/Indi/Reli.php | 22 - library/PhpGedcom/Record/Indi/Resi.php | 22 - library/PhpGedcom/Record/Indi/Reti.php | 22 - library/PhpGedcom/Record/Indi/Slgc.php | 26 - library/PhpGedcom/Record/Indi/Ssn.php | 22 - library/PhpGedcom/Record/Indi/Titl.php | 21 - library/PhpGedcom/Record/Indi/Will.php | 22 - library/PhpGedcom/Record/Note.php | 51 - library/PhpGedcom/Record/NoteRef.php | 62 - library/PhpGedcom/Record/Noteable.php | 26 - library/PhpGedcom/Record/Obje.php | 52 - library/PhpGedcom/Record/ObjeRef.php | 75 - library/PhpGedcom/Record/Objectable.php | 26 - library/PhpGedcom/Record/Phon.php | 47 - library/PhpGedcom/Record/Refn.php | 70 - library/PhpGedcom/Record/Repo.php | 208 -- library/PhpGedcom/Record/RepoRef.php | 38 - library/PhpGedcom/Record/Sour.php | 323 --- library/PhpGedcom/Record/Sour/Data.php | 50 - library/PhpGedcom/Record/Sour/Data/Even.php | 24 - library/PhpGedcom/Record/SourRef.php | 33 - library/PhpGedcom/Record/SourRef/Even.php | 24 - library/PhpGedcom/Record/Sourceable.php | 26 - library/PhpGedcom/Record/Subm.php | 241 --- library/PhpGedcom/Record/Subn.php | 208 -- library/PhpGedcom/Writer.php | 43 - library/PhpGedcom/Writer/Addr.php | 49 - library/PhpGedcom/Writer/Head.php | 55 - library/PhpGedcom/Writer/Head/Sour.php | 44 - library/PhpGedcom/Writer/Head/Sour/Corp.php | 39 - library/PhpGedcom/Writer/Phon.php | 34 - peridot.php | 9 + .../data/gedcom}/TGC551.ged | 0 .../data/gedcom}/TGC551LF.ged | 0 .../data/gedcom}/TGC55C.ged | 0 .../data/gedcom}/TGC55CLF.ged | 0 tests/bootstrap.php | 10 - tests/issue/Issue00012Test.php | 24 - tests/issue/Issue00017Test.php | 28 - tests/issue/Issue00018Test.php | 28 - tests/issue/files/issue00012.ged | 22 - tests/issue/files/issue00017.ged | 7 - tests/issue/files/issue00018.ged | 7 - tests/library/Gedcom/ParserTest.php | 271 --- tests/phpunit.xml | 8 - 213 files changed, 1651 insertions(+), 11395 deletions(-) create mode 100644 .php_cs create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE.md delete mode 100644 library/PhpGedcom/Gedcom.php delete mode 100644 library/PhpGedcom/Parser.php delete mode 100644 library/PhpGedcom/Parser/Addr.php delete mode 100644 library/PhpGedcom/Parser/Caln.php delete mode 100644 library/PhpGedcom/Parser/Chan.php delete mode 100644 library/PhpGedcom/Parser/Component.php delete mode 100644 library/PhpGedcom/Parser/Fam.php delete mode 100644 library/PhpGedcom/Parser/Fam/Anul.php delete mode 100644 library/PhpGedcom/Parser/Fam/Cens.php delete mode 100644 library/PhpGedcom/Parser/Fam/Div.php delete mode 100644 library/PhpGedcom/Parser/Fam/Divf.php delete mode 100644 library/PhpGedcom/Parser/Fam/Enga.php delete mode 100644 library/PhpGedcom/Parser/Fam/Even.php delete mode 100644 library/PhpGedcom/Parser/Fam/Even/Husb.php delete mode 100644 library/PhpGedcom/Parser/Fam/Even/Wife.php delete mode 100644 library/PhpGedcom/Parser/Fam/Marb.php delete mode 100644 library/PhpGedcom/Parser/Fam/Marc.php delete mode 100644 library/PhpGedcom/Parser/Fam/Marl.php delete mode 100644 library/PhpGedcom/Parser/Fam/Marr.php delete mode 100644 library/PhpGedcom/Parser/Fam/Mars.php delete mode 100644 library/PhpGedcom/Parser/Fam/Slgs.php delete mode 100644 library/PhpGedcom/Parser/Head.php delete mode 100644 library/PhpGedcom/Parser/Head/Char.php delete mode 100644 library/PhpGedcom/Parser/Head/Date.php delete mode 100644 library/PhpGedcom/Parser/Head/Gedc.php delete mode 100644 library/PhpGedcom/Parser/Head/Plac.php delete mode 100644 library/PhpGedcom/Parser/Head/Sour.php delete mode 100644 library/PhpGedcom/Parser/Head/Sour/Corp.php delete mode 100644 library/PhpGedcom/Parser/Head/Sour/Data.php delete mode 100644 library/PhpGedcom/Parser/Indi.php delete mode 100644 library/PhpGedcom/Parser/Indi/Adop.php delete mode 100644 library/PhpGedcom/Parser/Indi/Asso.php delete mode 100644 library/PhpGedcom/Parser/Indi/Attr.php delete mode 100644 library/PhpGedcom/Parser/Indi/Bapl.php delete mode 100644 library/PhpGedcom/Parser/Indi/Bapm.php delete mode 100644 library/PhpGedcom/Parser/Indi/Barm.php delete mode 100644 library/PhpGedcom/Parser/Indi/Basm.php delete mode 100644 library/PhpGedcom/Parser/Indi/Birt.php delete mode 100644 library/PhpGedcom/Parser/Indi/Bles.php delete mode 100644 library/PhpGedcom/Parser/Indi/Buri.php delete mode 100644 library/PhpGedcom/Parser/Indi/Cast.php delete mode 100644 library/PhpGedcom/Parser/Indi/Cens.php delete mode 100644 library/PhpGedcom/Parser/Indi/Chr.php delete mode 100644 library/PhpGedcom/Parser/Indi/Chra.php delete mode 100644 library/PhpGedcom/Parser/Indi/Conf.php delete mode 100644 library/PhpGedcom/Parser/Indi/Conl.php delete mode 100644 library/PhpGedcom/Parser/Indi/Crem.php delete mode 100644 library/PhpGedcom/Parser/Indi/Deat.php delete mode 100644 library/PhpGedcom/Parser/Indi/Dscr.php delete mode 100644 library/PhpGedcom/Parser/Indi/Educ.php delete mode 100644 library/PhpGedcom/Parser/Indi/Emig.php delete mode 100644 library/PhpGedcom/Parser/Indi/Endl.php delete mode 100644 library/PhpGedcom/Parser/Indi/Even.php delete mode 100644 library/PhpGedcom/Parser/Indi/Even/Plac.php delete mode 100644 library/PhpGedcom/Parser/Indi/Famc.php delete mode 100644 library/PhpGedcom/Parser/Indi/Fams.php delete mode 100644 library/PhpGedcom/Parser/Indi/Fcom.php delete mode 100644 library/PhpGedcom/Parser/Indi/Grad.php delete mode 100644 library/PhpGedcom/Parser/Indi/Idno.php delete mode 100644 library/PhpGedcom/Parser/Indi/Immi.php delete mode 100644 library/PhpGedcom/Parser/Indi/Lds.php delete mode 100644 library/PhpGedcom/Parser/Indi/Name.php delete mode 100644 library/PhpGedcom/Parser/Indi/Nati.php delete mode 100644 library/PhpGedcom/Parser/Indi/Natu.php delete mode 100644 library/PhpGedcom/Parser/Indi/Nchi.php delete mode 100644 library/PhpGedcom/Parser/Indi/Nmr.php delete mode 100644 library/PhpGedcom/Parser/Indi/Occu.php delete mode 100644 library/PhpGedcom/Parser/Indi/Ordn.php delete mode 100644 library/PhpGedcom/Parser/Indi/Prob.php delete mode 100644 library/PhpGedcom/Parser/Indi/Prop.php delete mode 100644 library/PhpGedcom/Parser/Indi/Reli.php delete mode 100644 library/PhpGedcom/Parser/Indi/Resi.php delete mode 100644 library/PhpGedcom/Parser/Indi/Reti.php delete mode 100644 library/PhpGedcom/Parser/Indi/Slgc.php delete mode 100644 library/PhpGedcom/Parser/Indi/Ssn.php delete mode 100644 library/PhpGedcom/Parser/Indi/Titl.php delete mode 100644 library/PhpGedcom/Parser/Indi/Will.php delete mode 100644 library/PhpGedcom/Parser/Note.php delete mode 100644 library/PhpGedcom/Parser/NoteRef.php delete mode 100644 library/PhpGedcom/Parser/Obje.php delete mode 100644 library/PhpGedcom/Parser/ObjeRef.php delete mode 100644 library/PhpGedcom/Parser/Phon.php delete mode 100644 library/PhpGedcom/Parser/Refn.php delete mode 100644 library/PhpGedcom/Parser/Repo.php delete mode 100644 library/PhpGedcom/Parser/RepoRef.php delete mode 100644 library/PhpGedcom/Parser/Sour.php delete mode 100644 library/PhpGedcom/Parser/Sour/Data.php delete mode 100644 library/PhpGedcom/Parser/Sour/Data/Even.php delete mode 100644 library/PhpGedcom/Parser/SourRef.php delete mode 100644 library/PhpGedcom/Parser/SourRef/Even.php delete mode 100644 library/PhpGedcom/Parser/Subm.php delete mode 100644 library/PhpGedcom/Parser/Subn.php delete mode 100644 library/PhpGedcom/Record.php delete mode 100644 library/PhpGedcom/Record/Addr.php delete mode 100644 library/PhpGedcom/Record/Caln.php delete mode 100644 library/PhpGedcom/Record/Chan.php delete mode 100644 library/PhpGedcom/Record/Data.php delete mode 100644 library/PhpGedcom/Record/Fam.php delete mode 100644 library/PhpGedcom/Record/Fam/Anul.php delete mode 100644 library/PhpGedcom/Record/Fam/Cens.php delete mode 100644 library/PhpGedcom/Record/Fam/Div.php delete mode 100644 library/PhpGedcom/Record/Fam/Enga.php delete mode 100644 library/PhpGedcom/Record/Fam/Even.php delete mode 100644 library/PhpGedcom/Record/Fam/Even/Husb.php delete mode 100644 library/PhpGedcom/Record/Fam/Even/Wife.php delete mode 100644 library/PhpGedcom/Record/Fam/Marb.php delete mode 100644 library/PhpGedcom/Record/Fam/Marc.php delete mode 100644 library/PhpGedcom/Record/Fam/Marl.php delete mode 100644 library/PhpGedcom/Record/Fam/Marr.php delete mode 100644 library/PhpGedcom/Record/Fam/Mars.php delete mode 100644 library/PhpGedcom/Record/Fam/Slgs.php delete mode 100644 library/PhpGedcom/Record/Head.php delete mode 100644 library/PhpGedcom/Record/Head/Char.php delete mode 100644 library/PhpGedcom/Record/Head/Date.php delete mode 100644 library/PhpGedcom/Record/Head/Gedc.php delete mode 100644 library/PhpGedcom/Record/Head/Plac.php delete mode 100644 library/PhpGedcom/Record/Head/Sour.php delete mode 100644 library/PhpGedcom/Record/Head/Sour/Corp.php delete mode 100644 library/PhpGedcom/Record/Head/Sour/Data.php delete mode 100644 library/PhpGedcom/Record/Indi.php delete mode 100644 library/PhpGedcom/Record/Indi/Adop.php delete mode 100644 library/PhpGedcom/Record/Indi/Asso.php delete mode 100644 library/PhpGedcom/Record/Indi/Attr.php delete mode 100644 library/PhpGedcom/Record/Indi/Bapl.php delete mode 100644 library/PhpGedcom/Record/Indi/Bapm.php delete mode 100644 library/PhpGedcom/Record/Indi/Barm.php delete mode 100644 library/PhpGedcom/Record/Indi/Basm.php delete mode 100644 library/PhpGedcom/Record/Indi/Birt.php delete mode 100644 library/PhpGedcom/Record/Indi/Bles.php delete mode 100644 library/PhpGedcom/Record/Indi/Buri.php delete mode 100644 library/PhpGedcom/Record/Indi/Cast.php delete mode 100644 library/PhpGedcom/Record/Indi/Cens.php delete mode 100644 library/PhpGedcom/Record/Indi/Chr.php delete mode 100644 library/PhpGedcom/Record/Indi/Chra.php delete mode 100644 library/PhpGedcom/Record/Indi/Conf.php delete mode 100644 library/PhpGedcom/Record/Indi/Conl.php delete mode 100644 library/PhpGedcom/Record/Indi/Crem.php delete mode 100644 library/PhpGedcom/Record/Indi/Deat.php delete mode 100644 library/PhpGedcom/Record/Indi/Dscr.php delete mode 100644 library/PhpGedcom/Record/Indi/Educ.php delete mode 100644 library/PhpGedcom/Record/Indi/Emig.php delete mode 100644 library/PhpGedcom/Record/Indi/Endl.php delete mode 100644 library/PhpGedcom/Record/Indi/Even.php delete mode 100644 library/PhpGedcom/Record/Indi/Even/Plac.php delete mode 100644 library/PhpGedcom/Record/Indi/Famc.php delete mode 100644 library/PhpGedcom/Record/Indi/Fams.php delete mode 100644 library/PhpGedcom/Record/Indi/Fcom.php delete mode 100644 library/PhpGedcom/Record/Indi/Grad.php delete mode 100644 library/PhpGedcom/Record/Indi/Idno.php delete mode 100644 library/PhpGedcom/Record/Indi/Immi.php delete mode 100644 library/PhpGedcom/Record/Indi/Lds.php delete mode 100644 library/PhpGedcom/Record/Indi/Name.php delete mode 100644 library/PhpGedcom/Record/Indi/Nati.php delete mode 100644 library/PhpGedcom/Record/Indi/Natu.php delete mode 100644 library/PhpGedcom/Record/Indi/Nchi.php delete mode 100644 library/PhpGedcom/Record/Indi/Nmr.php delete mode 100644 library/PhpGedcom/Record/Indi/Note.php delete mode 100644 library/PhpGedcom/Record/Indi/Occu.php delete mode 100644 library/PhpGedcom/Record/Indi/Ordn.php delete mode 100644 library/PhpGedcom/Record/Indi/Prob.php delete mode 100644 library/PhpGedcom/Record/Indi/Prop.php delete mode 100644 library/PhpGedcom/Record/Indi/Reli.php delete mode 100644 library/PhpGedcom/Record/Indi/Resi.php delete mode 100644 library/PhpGedcom/Record/Indi/Reti.php delete mode 100644 library/PhpGedcom/Record/Indi/Slgc.php delete mode 100644 library/PhpGedcom/Record/Indi/Ssn.php delete mode 100644 library/PhpGedcom/Record/Indi/Titl.php delete mode 100644 library/PhpGedcom/Record/Indi/Will.php delete mode 100644 library/PhpGedcom/Record/Note.php delete mode 100644 library/PhpGedcom/Record/NoteRef.php delete mode 100644 library/PhpGedcom/Record/Noteable.php delete mode 100644 library/PhpGedcom/Record/Obje.php delete mode 100644 library/PhpGedcom/Record/ObjeRef.php delete mode 100644 library/PhpGedcom/Record/Objectable.php delete mode 100644 library/PhpGedcom/Record/Phon.php delete mode 100644 library/PhpGedcom/Record/Refn.php delete mode 100644 library/PhpGedcom/Record/Repo.php delete mode 100644 library/PhpGedcom/Record/RepoRef.php delete mode 100644 library/PhpGedcom/Record/Sour.php delete mode 100644 library/PhpGedcom/Record/Sour/Data.php delete mode 100644 library/PhpGedcom/Record/Sour/Data/Even.php delete mode 100644 library/PhpGedcom/Record/SourRef.php delete mode 100644 library/PhpGedcom/Record/SourRef/Even.php delete mode 100644 library/PhpGedcom/Record/Sourceable.php delete mode 100644 library/PhpGedcom/Record/Subm.php delete mode 100644 library/PhpGedcom/Record/Subn.php delete mode 100644 library/PhpGedcom/Writer.php delete mode 100644 library/PhpGedcom/Writer/Addr.php delete mode 100644 library/PhpGedcom/Writer/Head.php delete mode 100644 library/PhpGedcom/Writer/Head/Sour.php delete mode 100644 library/PhpGedcom/Writer/Head/Sour/Corp.php delete mode 100644 library/PhpGedcom/Writer/Phon.php create mode 100644 peridot.php rename {tests/stresstestfiles => specs/data/gedcom}/TGC551.ged (100%) rename {tests/stresstestfiles => specs/data/gedcom}/TGC551LF.ged (100%) rename {tests/stresstestfiles => specs/data/gedcom}/TGC55C.ged (100%) rename {tests/stresstestfiles => specs/data/gedcom}/TGC55CLF.ged (100%) delete mode 100644 tests/bootstrap.php delete mode 100644 tests/issue/Issue00012Test.php delete mode 100644 tests/issue/Issue00017Test.php delete mode 100644 tests/issue/Issue00018Test.php delete mode 100644 tests/issue/files/issue00012.ged delete mode 100644 tests/issue/files/issue00017.ged delete mode 100644 tests/issue/files/issue00018.ged delete mode 100644 tests/library/Gedcom/ParserTest.php delete mode 100644 tests/phpunit.xml diff --git a/.gitignore b/.gitignore index 2375a4fb..771775b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.php_cs +tmp/* vendor/* -.idea/* -tmp/* \ No newline at end of file + diff --git a/.php_cs b/.php_cs new file mode 100644 index 00000000..e815dc81 --- /dev/null +++ b/.php_cs @@ -0,0 +1,18 @@ +in(__DIR__ . '/src'); + +return PhpCsFixer\Config::create() + ->setRiskyAllowed(true) + ->setRules([ + '@PSR2' => true, + 'array_syntax' => ['syntax' => 'short'], + 'heredoc_to_nowdoc' => true, + 'no_useless_else' => true, + 'no_useless_return' => true, + 'ordered_imports' => true, + 'phpdoc_add_missing_param_annotation' => true, + 'psr4' => true, + ]) + ->setFinder($finder); diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..89c504d1 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing + +Contributions are **welcome** and will be fully **credited**. + +We accept contributions via Pull Requests on +[Github](https://github.com/mrkrstphr/php-gedcom). + + +## Pull Requests + +- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - + Check the code style with ``$ composer check-style`` and fix it with ``$ composer fix-style``. + +- **Add tests!** - Your patch won't be accepted if it doesn't have tests. + +- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept +up-to-date. + +- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs +is not an option. + +- **Create feature branches** - Don't ask us to pull from your master branch. + +- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. + +- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make +multiple intermediate commits while developing, please +[squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before +submitting. + +**Happy coding**! diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..d13f3773 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +# The MIT License (MIT) + +Copyright (c) 2010-2017 Kristopher Wilson + +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. diff --git a/README.md b/README.md index 1cb019a2..cf38647a 100644 --- a/README.md +++ b/README.md @@ -1,56 +1,34 @@ # php-gedcom -## This project is no longer actively maintained. I may pick it back up in the future, but right now I have no need. +[![Build Status](https://secure.travis-ci.org/mrkrstphr/php-gedcom.png?branch=2.0-dev)](https://travis-ci.org/mrkrstphr/php-gedcom) -[![Build Status](https://secure.travis-ci.org/mrkrstphr/php-gedcom.png?branch=master)](https://travis-ci.org/mrkrstphr/php-gedcom) - -## Requirements - -* php-gedcom 1.0+ requires PHP 5.3 (or later). +php-gedcom helps parse GEDCOM data files in PHP. It's purpose is to provide a mechanism +for converting GEDCOM files into other formats, or loading them into a database. ## Installation -There are two ways of installing php-gedcom. - -### Composer - -To install php-gedcom in your project using composer, simply add the following require line to your project's `composer.json` file: - - { - "require": { - "mrkrstphr/php-gedcom": "1.0.*" - } - } +```bash +composer install mrkrstphr/php-gedcom +``` -### Download and __autoload +## Usage -If you are not using composer, you can download an archive of the source from GitHub and extract it into your project. You'll need to setup an autoloader for the files, unless you go through the painstaking process if requiring all the needed files one-by-one. Something like the following should suffice: +TODO -```php -spl_autoload_register(function ($class) { - $pathToPhpGedcom = __DIR__ . '/library/'; // TODO FIXME +## Tests - if (!substr(ltrim($class, '\\'), 0, 7) == 'PhpGedcom\\') { - return; - } +To run the tests: - $class = str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php'; - if (file_exists($pathToPhpGedcom . $class)) { - require_once($pathToPhpGedcom . $class); - } -}); +```bash +composer test ``` -### Usage +To check code style: -To parse a GEDCOM file and load it into a collection of PHP Objects, simply instantiate a new Parser object and pass it the file name to parse. The resulting Gedcom object will contain all the information stored within the supplied GEDCOM file: +```bash +composer check-style +``` -```php -$parser = new \PhpGedcom\Parser(); -$gedcom = $parser->parse('tmp\gedcom.ged'); +## Contributing -foreach ($gedcom->getIndi() as $individual) { - echo $individual->getId() . ': ' . current($individual->getName())->getSurn() . - ', ' . current($indi->$individual())->getGivn(); -} -``` +See [CONTRIBUTING.md](CONTRIBUTING.md). diff --git a/composer.json b/composer.json index 3221948d..bc19c6e4 100644 --- a/composer.json +++ b/composer.json @@ -1,20 +1,29 @@ { - "name": "mrkrstphr/php-gedcom", - "description": "A GEDCOM file parser (read + write) for PHP 5.3+", - "type": "library", - "keywords": ["gedcom","parser"], - "homepage": "http://github.com/mrkrstphr/php-gedcom", - "license": "GPL-3.0", - "require": { - "php": ">=5.3" - }, - "require-dev": { - "phpunit/PHPUnit": "3.7.*", - "squizlabs/php_codesniffer": "1.*" - }, - "autoload": { - "psr-0": { - "PhpGedcom\\": "library/" - } + "name": "mrkrstphr/php-gedcom", + "description": "A GEDCOM file parser for PHP", + "type": "library", + "keywords": [ + "gedcom", + "parser" + ], + "homepage": "http://github.com/mrkrstphr/php-gedcom", + "license": "MIT", + "require": { + "php": ">=7.0, <=8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.3", + "peridot-php/leo": "^1.6", + "peridot-php/peridot": "^1.19" + }, + "autoload": { + "psr-4": { + "PhpGedcom\\": "src/" } + }, + "scripts": { + "check-style": "vendor/bin/php-cs-fixer fix --dry-run --verbose --ansi", + "fix-style": "vendor/bin/php-cs-fixer fix", + "test": "vendor/bin/peridot --force-colors" + } } diff --git a/composer.lock b/composer.lock index 8e907109..a74c89fd 100644 --- a/composer.lock +++ b/composer.lock @@ -1,403 +1,1708 @@ { - "hash": "7a6ddf88d4aa9ca90a3535cce0bace3d", - "packages": [ - + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" ], + "content-hash": "922399df98c5d4c3584fab6a6eb38028", + "packages": [], "packages-dev": [ + { + "name": "doctrine/annotations", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "54cacc9b81758b14e3ce750f205a393d52339e97" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/54cacc9b81758b14e3ce750f205a393d52339e97", + "reference": "54cacc9b81758b14e3ce750f205a393d52339e97", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "doctrine/cache": "1.*", + "phpunit/phpunit": "^5.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "time": "2017-02-24T16:22:25+00:00" + }, + { + "name": "doctrine/lexer", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Lexer\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "lexer", + "parser" + ], + "time": "2014-09-09T13:34:57+00:00" + }, + { + "name": "evenement/evenement", + "version": "v2.0.0", + "source": { + "type": "git", + "url": "https://github.com/igorw/evenement.git", + "reference": "f6e843799fd4f4184d54d8fc7b5b3551c9fa803e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/igorw/evenement/zipball/f6e843799fd4f4184d54d8fc7b5b3551c9fa803e", + "reference": "f6e843799fd4f4184d54d8fc7b5b3551c9fa803e", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-0": { + "Evenement": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch", + "homepage": "http://wiedler.ch/igor/" + } + ], + "description": "Événement is a very simple event dispatching library for PHP", + "keywords": [ + "event-dispatcher", + "event-emitter" + ], + "time": "2012-11-02T14:49:47+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v2.3.1", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", + "reference": "d5257f7433bb490299c4f300d95598fd911a8ab0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/d5257f7433bb490299c4f300d95598fd911a8ab0", + "reference": "d5257f7433bb490299c4f300d95598fd911a8ab0", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.2", + "ext-tokenizer": "*", + "php": "^5.6 || >=7.0 <7.2", + "sebastian/diff": "^1.4", + "symfony/console": "^3.0", + "symfony/event-dispatcher": "^3.0", + "symfony/filesystem": "^3.0", + "symfony/finder": "^3.0", + "symfony/options-resolver": "^3.0", + "symfony/polyfill-php54": "^1.0", + "symfony/polyfill-php55": "^1.3", + "symfony/polyfill-php70": "^1.0", + "symfony/polyfill-xml": "^1.3", + "symfony/process": "^3.0", + "symfony/stopwatch": "^3.0" + }, + "conflict": { + "hhvm": "<3.18" + }, + "require-dev": { + "gecko-packages/gecko-php-unit": "^2.0", + "justinrainbow/json-schema": "^5.0", + "phpunit/phpunit": "^4.5 || ^5.0", + "satooshi/php-coveralls": "^1.0", + "symfony/phpunit-bridge": "^3.2.2" + }, + "suggest": { + "ext-mbstring": "For handling non-UTF8 characters in cache signature.", + "ext-xml": "For better performance.", + "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "time": "2017-04-25T20:50:30+00:00" + }, + { + "name": "ircmaxell/password-compat", + "version": "v1.0.4", + "source": { + "type": "git", + "url": "https://github.com/ircmaxell/password_compat.git", + "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/5c5cde8822a69545767f7c7f3058cb15ff84614c", + "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, + "type": "library", + "autoload": { + "files": [ + "lib/password.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anthony Ferrara", + "email": "ircmaxell@php.net", + "homepage": "http://blog.ircmaxell.com" + } + ], + "description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash", + "homepage": "https://github.com/ircmaxell/password_compat", + "keywords": [ + "hashing", + "password" + ], + "time": "2014-11-20T16:49:30+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v2.0.10", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "pseudorandom", + "random" + ], + "time": "2017-03-13T16:27:32+00:00" + }, + { + "name": "peridot-php/leo", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/peridot-php/leo.git", + "reference": "31dbdcbcd8383864caae1996ce62ad9f133d8de5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/peridot-php/leo/zipball/31dbdcbcd8383864caae1996ce62ad9f133d8de5", + "reference": "31dbdcbcd8383864caae1996ce62ad9f133d8de5", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "apigen/apigen": "^4", + "friendsofphp/php-cs-fixer": "^1", + "peridot-php/peridot-jumpstart": "^1", + "peridot-php/peridot-prophecy-plugin": "^1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Peridot\\Leo\\": "src" + }, + "files": [ + "src/Interfaces/_interface.bdd.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Scaturro", + "email": "scaturrob@gmail.com" + } + ], + "description": "Next level assertion and matcher library for PHP", + "keywords": [ + "assert", + "expect", + "expectation", + "matcher", + "testing" + ], + "time": "2016-09-21T03:52:31+00:00" + }, + { + "name": "peridot-php/peridot", + "version": "1.19.0", + "source": { + "type": "git", + "url": "https://github.com/peridot-php/peridot.git", + "reference": "1c573868d856cee7fc9ba89f6a82730f79a3685e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/peridot-php/peridot/zipball/1c573868d856cee7fc9ba89f6a82730f79a3685e", + "reference": "1c573868d856cee7fc9ba89f6a82730f79a3685e", + "shasum": "" + }, + "require": { + "evenement/evenement": "^2", + "peridot-php/peridot-scope": "^1", + "php": ">=5.4", + "phpunit/php-timer": "^1", + "symfony/console": "^2|^3" + }, + "require-dev": { + "consolidation/robo": "^0.4", + "phpunit/php-code-coverage": "^2" + }, + "bin": [ + "bin/peridot" + ], + "type": "library", + "autoload": { + "psr-4": { + "Peridot\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Austin Morris", + "email": "austin.morris@gmail.com" + }, + { + "name": "Brian Scaturro", + "email": "scaturrob@gmail.com" + } + ], + "description": "Event driven BDD test framework for PHP 5.4+", + "keywords": [ + "BDD", + "TDD", + "php", + "testing" + ], + "time": "2017-01-19T01:11:09+00:00" + }, + { + "name": "peridot-php/peridot-scope", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/peridot-php/peridot-scope.git", + "reference": "b5cc7ac35b2116d0f495b326218e7e93a823ab8e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/peridot-php/peridot-scope/zipball/b5cc7ac35b2116d0f495b326218e7e93a823ab8e", + "reference": "b5cc7ac35b2116d0f495b326218e7e93a823ab8e", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "peridot-php/peridot-jumpstart": "~1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Peridot\\Scope\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Scaturro", + "email": "scaturrob@gmail.com" + } + ], + "description": "Scopes for function binding and mixins", + "time": "2016-02-22T13:27:54+00:00" + }, { "name": "phpunit/php-code-coverage", "version": "1.2.7", "source": { "type": "git", - "url": "git://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "1.2.7" + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "348b5d2ab7d3946a932c72a8165e64dde3cf4ec3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/348b5d2ab7d3946a932c72a8165e64dde3cf4ec3", + "reference": "348b5d2ab7d3946a932c72a8165e64dde3cf4ec3", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": ">=1.3.0@stable", + "phpunit/php-text-template": ">=1.1.1@stable", + "phpunit/php-token-stream": ">=1.1.3@stable" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.0.5" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHP/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2012-12-02T14:54:55+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.3.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "16a78140ed2fc01b945cfa539665fadc6a038029" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/16a78140ed2fc01b945cfa539665fadc6a038029", + "reference": "16a78140ed2fc01b945cfa539665fadc6a038029", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "File/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "http://www.phpunit.de/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2012-10-11T11:44:38+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5180896f51c5b3648ac946b05f9ec02be78a0b23" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5180896f51c5b3648ac946b05f9ec02be78a0b23", + "reference": "5180896f51c5b3648ac946b05f9ec02be78a0b23", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "Text/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2012-10-31T18:15:28+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "19fa03d75db7eb732db5256fe7f08a66116ace90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19fa03d75db7eb732db5256fe7f08a66116ace90", + "reference": "19fa03d75db7eb732db5256fe7f08a66116ace90", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHP/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "http://www.phpunit.de/", + "keywords": [ + "timer" + ], + "time": "2012-10-11T11:45:58+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.1.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "ffb5e70adbc7cb1d4091ac0f8335b6fcff52cd75" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ffb5e70adbc7cb1d4091ac0f8335b6fcff52cd75", + "reference": "ffb5e70adbc7cb1d4091ac0f8335b6fcff52cd75", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHP/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "http://www.phpunit.de/", + "keywords": [ + "tokenizer" + ], + "time": "2012-10-11T11:47:14+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "3.7.13", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "a4583a95d5c436e392d210ee0bde265a8f742096" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a4583a95d5c436e392d210ee0bde265a8f742096", + "reference": "a4583a95d5c436e392d210ee0bde265a8f742096", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpunit/php-code-coverage": ">=1.2.1", + "phpunit/php-file-iterator": ">=1.3.1", + "phpunit/php-text-template": ">=1.1.1", + "phpunit/php-timer": ">=1.0.2", + "phpunit/phpunit-mock-objects": ">=1.2.0,<1.3.0", + "symfony/yaml": ">=2.1.0,<2.2.0" + }, + "suggest": { + "ext-json": "*", + "ext-simplexml": "*", + "ext-tokenizer": "*", + "phpunit/php-invoker": ">=1.1.0" + }, + "bin": [ + "composer/bin/phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.7.x-dev" + } + }, + "autoload": { + "classmap": [ + "PHPUnit/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "", + "../../symfony/yaml/" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "http://www.phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2013-01-13T10:26:08+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "5794e3c5c5ba0fb037b11d8151add2a07fa82875" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/5794e3c5c5ba0fb037b11d8151add2a07fa82875", + "reference": "5794e3c5c5ba0fb037b11d8151add2a07fa82875", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-text-template": ">=1.1.1@stable" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHPUnit/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2013-01-13T10:24:48+00:00" + }, + { + "name": "psr/log", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2016-10-10T12:19:37+00:00" + }, + { + "name": "sebastian/diff", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2015-12-08T07:14:41+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "1.4.3", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "bef13221b72f7a40315d06d25c4789a24c78fb6f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/bef13221b72f7a40315d06d25c4789a24c78fb6f", + "reference": "bef13221b72f7a40315d06d25c4789a24c78fb6f", + "shasum": "" + }, + "require": { + "php": ">=5.1.2" + }, + "bin": [ + "scripts/phpcs" + ], + "type": "library", + "autoload": { + "classmap": [ + "." + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2012-12-04T03:15:31+00:00" + }, + { + "name": "symfony/console", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "c30243cc51f726812be3551316b109a2f5deaf8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/c30243cc51f726812be3551316b109a2f5deaf8d", + "reference": "c30243cc51f726812be3551316b109a2f5deaf8d", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/debug": "~2.8|~3.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/filesystem": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/filesystem": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2017-04-04T14:33:42+00:00" + }, + { + "name": "symfony/debug", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "56f613406446a4a0a031475cfd0a01751de22659" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/56f613406446a4a0a031475cfd0a01751de22659", + "reference": "56f613406446a4a0a031475cfd0a01751de22659", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/class-loader": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2017-03-28T21:38:24+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "154bb1ef7b0e42ccc792bd53edbce18ed73440ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/154bb1ef7b0e42ccc792bd53edbce18ed73440ca", + "reference": "154bb1ef7b0e42ccc792bd53edbce18ed73440ca", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2017-04-04T07:26:27+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "64421e6479c4a8e60d790fb666bd520992861b66" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/64421e6479c4a8e60d790fb666bd520992861b66", + "reference": "64421e6479c4a8e60d790fb666bd520992861b66", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2017-03-26T15:47:15+00:00" + }, + { + "name": "symfony/finder", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "b20900ce5ea164cd9314af52725b0bb5a758217a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/b20900ce5ea164cd9314af52725b0bb5a758217a", + "reference": "b20900ce5ea164cd9314af52725b0bb5a758217a", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2017-03-20T09:32:19+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "6a19be85237fe8bbd4975f86942b4763bb0da6ca" }, "dist": { "type": "zip", - "url": "https://github.com/sebastianbergmann/php-code-coverage/archive/1.2.7.zip", - "reference": "1.2.7", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/6a19be85237fe8bbd4975f86942b4763bb0da6ca", + "reference": "6a19be85237fe8bbd4975f86942b4763bb0da6ca", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": ">=1.3.0@stable", - "phpunit/php-token-stream": ">=1.1.3@stable", - "phpunit/php-text-template": ">=1.1.1@stable" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.0.5" + "php": ">=5.5.9" }, - "time": "2012-12-02 14:54:55", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, "autoload": { - "classmap": [ - "PHP/" + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "description": "Symfony OptionsResolver Component", + "homepage": "https://symfony.com", "keywords": [ - "testing", - "coverage", - "xunit" - ] + "config", + "configuration", + "options" + ], + "time": "2017-03-21T21:44:32+00:00" }, { - "name": "phpunit/php-file-iterator", - "version": "1.3.3", + "name": "symfony/polyfill-mbstring", + "version": "v1.3.0", "source": { "type": "git", - "url": "git://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "1.3.3" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" }, "dist": { "type": "zip", - "url": "https://github.com/sebastianbergmann/php-file-iterator/zipball/1.3.3", - "reference": "1.3.3", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2012-10-11 04:44:38", + "suggest": { + "ext-mbstring": "For best performance" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, "autoload": { - "classmap": [ - "File/" + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "http://www.phpunit.de/", + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", "keywords": [ - "filesystem", - "iterator" - ] + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2016-11-14T01:06:16+00:00" }, { - "name": "phpunit/php-text-template", - "version": "1.1.4", + "name": "symfony/polyfill-php54", + "version": "v1.3.0", "source": { "type": "git", - "url": "git://github.com/sebastianbergmann/php-text-template.git", - "reference": "1.1.4" + "url": "https://github.com/symfony/polyfill-php54.git", + "reference": "90e085822963fdcc9d1c5b73deb3d2e5783b16a0" }, "dist": { "type": "zip", - "url": "https://github.com/sebastianbergmann/php-text-template/zipball/1.1.4", - "reference": "1.1.4", + "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/90e085822963fdcc9d1c5b73deb3d2e5783b16a0", + "reference": "90e085822963fdcc9d1c5b73deb3d2e5783b16a0", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2012-10-31 11:15:28", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php54\\": "" + }, + "files": [ + "bootstrap.php" + ], "classmap": [ - "Text/" + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "description": "Symfony polyfill backporting some PHP 5.4+ features to lower PHP versions", + "homepage": "https://symfony.com", "keywords": [ - "template" - ] + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2016-11-14T01:06:16+00:00" }, { - "name": "phpunit/php-timer", - "version": "1.0.4", + "name": "symfony/polyfill-php55", + "version": "v1.3.0", "source": { "type": "git", - "url": "git://github.com/sebastianbergmann/php-timer.git", - "reference": "1.0.4" + "url": "https://github.com/symfony/polyfill-php55.git", + "reference": "03e3f0350bca2220e3623a0e340eef194405fc67" }, "dist": { "type": "zip", - "url": "https://github.com/sebastianbergmann/php-timer/zipball/1.0.4", - "reference": "1.0.4", + "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/03e3f0350bca2220e3623a0e340eef194405fc67", + "reference": "03e3f0350bca2220e3623a0e340eef194405fc67", "shasum": "" }, "require": { + "ircmaxell/password-compat": "~1.0", "php": ">=5.3.3" }, - "time": "2012-10-11 04:45:58", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, "autoload": { - "classmap": [ - "PHP/" + "psr-4": { + "Symfony\\Polyfill\\Php55\\": "" + }, + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Utility class for timing", - "homepage": "http://www.phpunit.de/", + "description": "Symfony polyfill backporting some PHP 5.5+ features to lower PHP versions", + "homepage": "https://symfony.com", "keywords": [ - "timer" - ] + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2016-11-14T01:06:16+00:00" }, { - "name": "phpunit/php-token-stream", - "version": "1.1.5", + "name": "symfony/polyfill-php70", + "version": "v1.3.0", "source": { "type": "git", - "url": "git://github.com/sebastianbergmann/php-token-stream.git", - "reference": "1.1.5" + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "13ce343935f0f91ca89605a2f6ca6f5c2f3faac2" }, "dist": { "type": "zip", - "url": "https://github.com/sebastianbergmann/php-token-stream/zipball/1.1.5", - "reference": "1.1.5", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/13ce343935f0f91ca89605a2f6ca6f5c2f3faac2", + "reference": "13ce343935f0f91ca89605a2f6ca6f5c2f3faac2", "shasum": "" }, "require": { - "ext-tokenizer": "*", + "paragonie/random_compat": "~1.0|~2.0", "php": ">=5.3.3" }, - "time": "2012-10-11 04:47:14", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "files": [ + "bootstrap.php" + ], "classmap": [ - "PHP/" + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "http://www.phpunit.de/", + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", "keywords": [ - "tokenizer" - ] + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2016-11-14T01:06:16+00:00" }, { - "name": "phpunit/phpunit", - "version": "3.7.13", + "name": "symfony/polyfill-xml", + "version": "v1.3.0", "source": { "type": "git", - "url": "git://github.com/sebastianbergmann/phpunit.git", - "reference": "3.7.13" + "url": "https://github.com/symfony/polyfill-xml.git", + "reference": "64b6a864f18ab4fddad49f5025f805f6781dfabd" }, "dist": { "type": "zip", - "url": "https://github.com/sebastianbergmann/phpunit/archive/3.7.13.zip", - "reference": "3.7.13", + "url": "https://api.github.com/repos/symfony/polyfill-xml/zipball/64b6a864f18ab4fddad49f5025f805f6781dfabd", + "reference": "64b6a864f18ab4fddad49f5025f805f6781dfabd", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": ">=1.3.1", - "phpunit/php-text-template": ">=1.1.1", - "phpunit/php-code-coverage": ">=1.2.1", - "phpunit/php-timer": ">=1.0.2", - "phpunit/phpunit-mock-objects": ">=1.2.0,<1.3.0", - "symfony/yaml": ">=2.1.0,<2.2.0", - "ext-dom": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*" + "php": ">=5.3.3" }, "suggest": { - "phpunit/php-invoker": ">=1.1.0", - "ext-json": "*", - "ext-simplexml": "*", - "ext-tokenizer": "*" + "ext-xml": "For best performance" }, - "time": "2013-01-13 10:21:19", - "bin": [ - "composer/bin/phpunit" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "3.7.x-dev" + "dev-master": "1.3-dev" } }, "autoload": { - "classmap": [ - "PHPUnit/" + "psr-4": { + "Symfony\\Polyfill\\Xml\\": "" + }, + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "", - "../../symfony/yaml/" - ], "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "The PHP Unit Testing framework.", - "homepage": "http://www.phpunit.de/", + "description": "Symfony polyfill for xml's utf8_encode and utf8_decode functions", + "homepage": "https://symfony.com", "keywords": [ - "testing", - "phpunit", - "xunit" - ] + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2016-11-14T01:06:16+00:00" }, { - "name": "phpunit/phpunit-mock-objects", - "version": "1.2.3", + "name": "symfony/process", + "version": "v3.2.7", "source": { "type": "git", - "url": "git://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "1.2.3" + "url": "https://github.com/symfony/process.git", + "reference": "57fdaa55827ae14d617550ebe71a820f0a5e2282" }, "dist": { "type": "zip", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects/archive/1.2.3.zip", - "reference": "1.2.3", + "url": "https://api.github.com/repos/symfony/process/zipball/57fdaa55827ae14d617550ebe71a820f0a5e2282", + "reference": "57fdaa55827ae14d617550ebe71a820f0a5e2282", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/php-text-template": ">=1.1.1@stable" - }, - "suggest": { - "ext-soap": "*" + "php": ">=5.5.9" }, - "time": "2013-01-13 10:24:48", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, "autoload": { - "classmap": [ - "PHPUnit/" + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ] + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2017-03-27T18:07:02+00:00" }, { - "name": "squizlabs/php_codesniffer", - "version": "1.4.3", + "name": "symfony/stopwatch", + "version": "v3.2.7", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer", - "reference": "1.4.3" + "url": "https://github.com/symfony/stopwatch.git", + "reference": "c5ee0f8650c84b4d36a5f76b3b504233feaabf75" }, "dist": { "type": "zip", - "url": "https://github.com/squizlabs/PHP_CodeSniffer/archive/1.4.3.zip", - "reference": "1.4.3", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/c5ee0f8650c84b4d36a5f76b3b504233feaabf75", + "reference": "c5ee0f8650c84b4d36a5f76b3b504233feaabf75", "shasum": "" }, "require": { - "php": ">=5.1.2" + "php": ">=5.5.9" }, - "time": "2012-12-04 03:15:31", - "bin": [ - "scripts/phpcs" - ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, "autoload": { - "classmap": [ - "." + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Greg Sherwood", - "role": "lead" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", - "keywords": [ - "standards", - "phpcs" - ] + "description": "Symfony Stopwatch Component", + "homepage": "https://symfony.com", + "time": "2017-02-18T17:28:00+00:00" }, { "name": "symfony/yaml", @@ -405,19 +1710,18 @@ "target-dir": "Symfony/Component/Yaml", "source": { "type": "git", - "url": "https://github.com/symfony/Yaml", - "reference": "v2.1.7" + "url": "https://github.com/symfony/yaml.git", + "reference": "1ab2bd470518b75daca8b43d4293b4c0fafe6bca" }, "dist": { "type": "zip", - "url": "https://github.com/symfony/Yaml/archive/v2.1.7.zip", - "reference": "v2.1.7", + "url": "https://api.github.com/repos/symfony/yaml/zipball/1ab2bd470518b75daca8b43d4293b4c0fafe6bca", + "reference": "1ab2bd470518b75daca8b43d4293b4c0fafe6bca", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2013-01-17 21:21:51", "type": "library", "autoload": { "psr-0": { @@ -429,24 +1733,27 @@ "MIT" ], "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Symfony Yaml Component", - "homepage": "http://symfony.com" + "homepage": "http://symfony.com", + "time": "2013-01-17T21:21:51+00:00" } ], - "aliases": [ - - ], + "aliases": [], "minimum-stability": "stable", - "stability-flags": [ - - ] + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=7.0, <=8.0" + }, + "platform-dev": [] } diff --git a/library/PhpGedcom/Gedcom.php b/library/PhpGedcom/Gedcom.php deleted file mode 100644 index 125ba89e..00000000 --- a/library/PhpGedcom/Gedcom.php +++ /dev/null @@ -1,265 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom; - -/** - * Class Gedcom - * @package PhpGedcom - */ -class Gedcom -{ - /** - * Stores the header information of the GEDCOM file. - * - * @var \PhpGedcom\Record\Head - */ - protected $head; - - /** - * Stores the submission information for the GEDCOM file. - * - * @var \PhpGedcom\Record\Subn - */ - protected $subn; - - /** - * Stores sources cited throughout the GEDCOM file. - * - * @var array - */ - protected $sour = array(); - - /** - * Stores all the individuals contained within the GEDCOM file. - * - * @var array - */ - protected $indi = array(); - - /** - * Stores all the families contained within the GEDCOM file. - * - * @var array - */ - protected $fam = array(); - - /** - * Stores all the notes contained within the GEDCOM file that are not inline. - * - * @var array - */ - protected $note = array(); - - /** - * Stores all repositories that are contained within the GEDCOM file and referenced by sources. - * - * @var array - */ - protected $repo = array(); - - /** - * Stores all the media objects that are contained within the GEDCOM file. - * - * @var array - */ - protected $obje = array(); - - /** - * Stores information about all the submitters to the GEDCOM file. - * - * @var array - */ - protected $subm = array(); - - /** - * Retrieves the header record of the GEDCOM file. - * - * @param Record\Head $head - */ - public function setHead(Record\Head $head) - { - $this->head = $head; - } - - /** - * Retrieves the submission record of the GEDCOM file. - * - * @param Record\Subn $subn - */ - public function setSubn(Record\Subn $subn) - { - $this->subn = $subn; - } - - /** - * Adds a source to the collection of sources. - * - * @param Record\Sour $sour - */ - public function addSour(Record\Sour $sour) - { - $this->sour[$sour->getSour()] = $sour; - } - - /** - * Adds an individual to the collection of individuals. - * - * @param Record\Indi $indi - */ - public function addIndi(Record\Indi $indi) - { - $this->indi[$indi->getId()] = $indi; - } - - /** - * Adds a family to the collection of families. - * - * @param Record\Fam $fam - */ - public function addFam(Record\Fam $fam) - { - $this->fam[$fam->getId()] = $fam; - } - - /** - * Adds a note to the collection of notes. - * - * @param Record\Note $note - */ - public function addNote(Record\Note $note) - { - $this->note[$note->getId()] = $note; - } - - /** - * Adds a repository to the collection of repositories. - * - * @param Record\Repo $repo - */ - public function addRepo(Record\Repo $repo) - { - $this->repo[$repo->getRepo()] = $repo; - } - - /** - * Adds an object to the collection of objects. - * - * @param Record\Obje $obje - */ - public function addObje(Record\Obje $obje) - { - $this->obje[$obje->getId()] = $obje; - } - - /** - * Adds a submitter record to the collection of submitters. - * - * @param Record\Subm $subm - */ - public function addSubm(Record\Subm $subm) - { - $this->subm[$subm->getSubm()] = $subm; - } - - /** - * Gets the header information of the GEDCOM file. - * - * @return Record\Head - */ - public function getHead() - { - return $this->head; - } - - /** - * Gets the submission record of the GEDCOM file. - * - * @return Record\Subn - */ - public function getSubn() - { - return $this->subn; - } - - /** - * Gets the collection of submitters to the GEDCOM file. - * - * @return array - */ - public function getSubm() - { - return $this->subm; - } - - /** - * Gets the collection of individuals stored in the GEDCOM file. - * - * @return array - */ - public function getIndi() - { - return $this->indi; - } - - /** - * Gets the collection of families stored in the GEDCOM file. - * - * @return array - */ - public function getFam() - { - return $this->fam; - } - - /** - * Gets the collection of repositories stored in the GEDCOM file. - * - * @return array - */ - public function getRepo() - { - return $this->repo; - } - - /** - * Gets the collection of sources stored in the GEDCOM file. - * - * @return array - */ - public function getSour() - { - return $this->sour; - } - - /** - * Gets the collection of note stored in the GEDCOM file. - * - * @return array - */ - public function getNote() - { - return $this->note; - } - - /** - * Gets the collection of objects stored in the GEDCOM file. - * - * @return array - */ - public function getObje() - { - return $this->obje; - } -} diff --git a/library/PhpGedcom/Parser.php b/library/PhpGedcom/Parser.php deleted file mode 100644 index 7498dcea..00000000 --- a/library/PhpGedcom/Parser.php +++ /dev/null @@ -1,324 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom; - -/** - * - */ -class Parser -{ - /** - * - */ - protected $_file = null; - - /** - * - */ - protected $_gedcom = null; - - /** - * - */ - protected $_errorLog = array(); - - /** - * - */ - protected $_linesParsed = 0; - - /** - * - */ - protected $_line = ''; - - /** - * - */ - protected $_lineRecord = null; - - /** - * - */ - protected $_returnedLine = ''; - - /** - * - */ - public function __construct(\PhpGedcom\Gedcom $gedcom = null) - { - if (!is_null($gedcom)) { - $this->_gedcom = $gedcom; - } else { - $this->_gedcom = new \PhpGedcom\Gedcom(); - } - } - - /** - * - */ - public function forward() - { - // if there was a returned line by back(), set that as our current - // line and blank out the returnedLine variable, otherwise grab - // the next line from the file - - if (!empty($this->_returnedLine)) { - $this->_line = $this->_returnedLine; - $this->_returnedLine = ''; - } else { - $this->_line = fgets($this->_file); - $this->_lineRecord = null; - $this->_linesParsed++; - } - - return $this; - } - - /** - * - */ - public function back() - { - // our parser object encountered a line it wasn't meant to parse - // store this line for the previous parser to analyze - - $this->_returnedLine = $this->_line; - - return $this; - } - - /** - * Jump to the next level in the GEDCOM that is <= $level. This will leave the parser at the line above - * this level, such that calling $parser->forward() will result in landing at the correct level. - * - * @param int $level - */ - public function skipToNextLevel($level) - { - $currentDepth = 999; - - while ($currentDepth > $level) { - $this->forward(); - $record = $this->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; - } - - $this->back(); - } - - /** - * - */ - public function getGedcom() - { - return $this->_gedcom; - } - - /** - * - */ - public function eof() - { - return feof($this->_file); - } - - /** - * - * @return string - */ - public function parseMultiLineRecord() - { - $record = $this->getCurrentLineRecord(); - - $depth = (int)$record[0]; - $data = isset($record[2]) ? trim($record[2]) : ''; - - $this->forward(); - - while (!$this->eof()) { - $record = $this->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $this->back(); - break; - } - - switch ($recordType) { - case 'CONT': - $data .= "\n"; - - if (isset($record[2])) { - $data .= trim($record[2]); - } - break; - case 'CONC': - if (isset($record[2])) { - $data .= ' ' . trim($record[2]); - } - break; - default: - $this->back(); - break 2; - } - - $this->forward(); - } - - return $data; - } - - /** - * - * @return string The current line - */ - public function getCurrentLine() - { - return $this->_line; - } - - /** - * - */ - public function getCurrentLineRecord($pieces = 3) - { - if (!is_null($this->_lineRecord)) { - return $this->_lineRecord; - } - - if (empty($this->_line)) { - return false; - } - - $line = trim($this->_line); - - $this->_lineRecord = explode(' ', $line, $pieces); - - return $this->_lineRecord; - } - - /** - * - */ - protected function logError($error) - { - $this->_errorLog[] = $error; - } - - /** - * - */ - public function logUnhandledRecord($additionalInfo = '') - { - $this->logError( - $this->_linesParsed . ': (Unhandled) ' . trim(implode('|', $this->getCurrentLineRecord())) . - (!empty($additionalInfo) ? ' - ' . $additionalInfo : '') - ); - } - - public function logSkippedRecord($additionalInfo = '') - { - $this->logError( - $this->_linesParsed . ': (Skipping) ' . trim(implode('|', $this->getCurrentLineRecord())) . - (!empty($additionalInfo) ? ' - ' . $additionalInfo : '') - ); - } - - /** - * - */ - public function getErrors() - { - return $this->_errorLog; - } - - /** - * - */ - public function normalizeIdentifier($identifier) - { - $identifier = trim($identifier); - $identifier = trim($identifier, '@'); - - return $identifier; - } - - /** - * - * @param string $fileName - * @return Gedcom - */ - public function parse($fileName) - { - $this->_file = fopen($fileName, 'r'); #explode("\n", mb_convert_encoding($contents, 'UTF-8')); - - if (!$this->_file) { - return null; - } - - $this->forward(); - - while (!$this->eof()) { - $record = $this->getCurrentLineRecord(); - - if ($record === false) { - continue; - } - - $depth = (int)$record[0]; - - // We only process 0 level records here. Sub levels are processed - // in methods for those data types (individuals, sources, etc) - - if ($depth == 0) { - // Although not always an identifier (HEAD,TRLR): - $identifier = $this->normalizeIdentifier($record[1]); - - if (trim($record[1]) == 'HEAD') { - Parser\Head::parse($this); - } else if (isset($record[2]) && trim($record[2]) == 'SUBN') { - Parser\Subn::parse($this); - } else if (isset($record[2]) && trim($record[2]) == 'SUBM') { - Parser\Subm::parse($this); - } else if (isset($record[2]) && $record[2] == 'SOUR') { - Parser\Sour::parse($this); - } else if (isset($record[2]) && $record[2] == 'INDI') { - Parser\Indi::parse($this); - } else if (isset($record[2]) && $record[2] == 'FAM') { - Parser\Fam::parse($this); - } else if (isset($record[2]) && substr(trim($record[2]), 0, 4) == 'NOTE') { - Parser\Note::parse($this); - } else if (isset($record[2]) && $record[2] == 'REPO') { - Parser\Repo::parse($this); - } else if (isset($record[2]) && $record[2] == 'OBJE') { - Parser\Obje::parse($this); - } else if (trim($record[1]) == 'TRLR') { - // EOF - break; - } else { - $this->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - } else { - $this->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $this->forward(); - } - - return $this->getGedcom(); - } -} diff --git a/library/PhpGedcom/Parser/Addr.php b/library/PhpGedcom/Parser/Addr.php deleted file mode 100644 index 1b0160e9..00000000 --- a/library/PhpGedcom/Parser/Addr.php +++ /dev/null @@ -1,67 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -/** - * - * - */ -class Addr extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - $line = isset($record[2]) ? trim($record[2]) : ''; - - $addr = new \PhpGedcom\Record\Addr(); - $addr->setAddr($line); - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtolower(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - if ($addr->hasAttribute($recordType)) { - $addr->{'set' . $recordType}(trim($record[2])); - } else { - if ($recordType == 'cont') { - // FIXME: Can have CONT on multiple attributes - $addr->setAddr($addr->getAddr() . "\n"); - if (isset($record[2])) { - $addr->setAddr($addr->getAddr() . trim($record[2])); - } - } else { - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - } - - $parser->forward(); - } - - return $addr; - } -} diff --git a/library/PhpGedcom/Parser/Caln.php b/library/PhpGedcom/Parser/Caln.php deleted file mode 100644 index 876a9ee2..00000000 --- a/library/PhpGedcom/Parser/Caln.php +++ /dev/null @@ -1,60 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -/** - * - * - */ -class Caln extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $identifier = $parser->normalizeIdentifier($record[2]); - $depth = (int)$record[0]; - - $caln = new \PhpGedcom\Record\Caln(); - $caln->setCaln($identifier); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtolower(trim($record[1])); - $lineDepth = (int)$record[0]; - - if ($lineDepth <= $depth) { - $parser->back(); - break; - } - - if ($caln->hasAttribute($recordType)) { - $caln->{'set' . $recordType}(trim($record[2])); - } else { - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $caln; - } -} diff --git a/library/PhpGedcom/Parser/Chan.php b/library/PhpGedcom/Parser/Chan.php deleted file mode 100644 index ca34d2f2..00000000 --- a/library/PhpGedcom/Parser/Chan.php +++ /dev/null @@ -1,69 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -/** - * - * - */ -class Chan extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $parser->forward(); - - $chan = new \PhpGedcom\Record\Chan(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = trim($record[1]); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'DATE': - $chan->setDate(trim($record[2])); - break; - case 'TIME': - $chan->setTime(trim($record[2])); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $chan->addNote($note); - } - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $chan; - } -} diff --git a/library/PhpGedcom/Parser/Component.php b/library/PhpGedcom/Parser/Component.php deleted file mode 100644 index a1e37aff..00000000 --- a/library/PhpGedcom/Parser/Component.php +++ /dev/null @@ -1,30 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -/** - * - * - */ -abstract class Component -{ - /** - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - - } -} diff --git a/library/PhpGedcom/Parser/Fam.php b/library/PhpGedcom/Parser/Fam.php deleted file mode 100644 index d75cbb5f..00000000 --- a/library/PhpGedcom/Parser/Fam.php +++ /dev/null @@ -1,134 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -/** - * - * - */ -class Fam extends \PhpGedcom\Parser\Component -{ - protected static $_eventTypes = array( - 'ANUL', - 'CENS', - 'DIV', - 'DIVF', - 'ENGA', - 'MARR', - 'MARB', - 'MARC', - 'MARL', - 'MARS' - ); - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $identifier = $parser->normalizeIdentifier($record[1]); - $depth = (int)$record[0]; - - $fam = new \PhpGedcom\Record\Fam(); - $fam->setId($identifier); - - $parser->getGedcom()->addFam($fam); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; - $recordType = strtoupper(trim($record[1])); - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'HUSB': - $fam->setHusb($parser->normalizeIdentifier($record[2])); - break; - case 'WIFE': - $fam->setWife($parser->normalizeIdentifier($record[2])); - break; - case 'CHIL': - $fam->addChil($parser->normalizeIdentifier($record[2])); - break; - case 'NCHI': - $fam->setNchi(trim($record[2])); - break; - case 'SUBM': - $fam->addSubm($parser->normalizeIdentifier($record[2])); - break; - case 'RIN': - $fam->setRin(trim($record[2])); - break; - case 'CHAN': - $chan = \PhpGedcom\Parser\Chan::parse($parser); - $fam->setChan($chan); - break; - case 'SLGS': - $slgs = \PhpGedcom\Parser\Fam\Slgs::parse($parser); - $fam->addSlgs($slgs); - break; - case 'REFN': - $ref = \PhpGedcom\Parser\Refn::parse($parser); - $fam->addRefn($ref); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $fam->addNote($note); - } - break; - case 'SOUR': - $sour = \PhpGedcom\Parser\SourRef::parse($parser); - $fam->addSour($sour); - break; - case 'OBJE': - $obje = \PhpGedcom\Parser\ObjeRef::parse($parser); - $fam->addObje($obje); - break; - case 'EVEN': - case 'ANUL': - case 'CENS': - case 'DIV': - case 'DIVF': - case 'ENGA': - case 'MARR': - case 'MARB': - case 'MARC': - case 'MARL': - case 'MARS': - $className = ucfirst(strtolower($recordType)); - $class = '\\PhpGedcom\\Parser\\Fam\\' . $className; - - $even = $class::parse($parser); - $fam->addEven($even); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $fam; - } -} diff --git a/library/PhpGedcom/Parser/Fam/Anul.php b/library/PhpGedcom/Parser/Fam/Anul.php deleted file mode 100644 index 74468ab0..00000000 --- a/library/PhpGedcom/Parser/Fam/Anul.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Fam; - -/** - * - * - */ -class Anul extends \PhpGedcom\Parser\Fam\Even -{ -} diff --git a/library/PhpGedcom/Parser/Fam/Cens.php b/library/PhpGedcom/Parser/Fam/Cens.php deleted file mode 100644 index 73a1b384..00000000 --- a/library/PhpGedcom/Parser/Fam/Cens.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Fam; - -/** - * - * - */ -class Cens extends \PhpGedcom\Parser\Fam\Even -{ -} diff --git a/library/PhpGedcom/Parser/Fam/Div.php b/library/PhpGedcom/Parser/Fam/Div.php deleted file mode 100644 index bc6e07c0..00000000 --- a/library/PhpGedcom/Parser/Fam/Div.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Fam; - -/** - * - * - */ -class Div extends \PhpGedcom\Parser\Fam\Even -{ -} diff --git a/library/PhpGedcom/Parser/Fam/Divf.php b/library/PhpGedcom/Parser/Fam/Divf.php deleted file mode 100644 index e7c810f8..00000000 --- a/library/PhpGedcom/Parser/Fam/Divf.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Fam; - -/** - * - * - */ -class Divf extends \PhpGedcom\Parser\Fam\Even -{ -} diff --git a/library/PhpGedcom/Parser/Fam/Enga.php b/library/PhpGedcom/Parser/Fam/Enga.php deleted file mode 100644 index c145b273..00000000 --- a/library/PhpGedcom/Parser/Fam/Enga.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Fam; - -/** - * - * - */ -class Enga extends \PhpGedcom\Parser\Fam\Even -{ -} diff --git a/library/PhpGedcom/Parser/Fam/Even.php b/library/PhpGedcom/Parser/Fam/Even.php deleted file mode 100644 index 06aa3beb..00000000 --- a/library/PhpGedcom/Parser/Fam/Even.php +++ /dev/null @@ -1,110 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Fam; - -/** - * - * - */ -class Even extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $even = new \PhpGedcom\Record\Fam\Even(); - - if (isset($record[1]) && strtoupper(trim($record[1])) != 'EVEN') { - $even->setType(trim($record[1])); - } - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'TYPE': - $even->setType(trim($record[2])); - break; - case 'DATE': - $even->setDate(trim($record[2])); - break; - case 'PLAC': - $plac = \PhpGedcom\Parser\Indi\Even\Plac::parse($parser); - $even->setPlac($plac); - break; - case 'ADDR': - $addr = \PhpGedcom\Parser\Addr::parse($parser); - $even->setAddr($addr); - break; - case 'PHON': - $phone = \PhpGedcom\Parser\Phon::parse($parser); - $even->addPhone($phone); - break; - case 'CAUS': - $even->setCaus(trim($record[2])); - break; - case 'AGE': - $even->setAge(trim($record[2])); - break; - case 'AGNC': - $even->setAgnc(trim($record[2])); - break; - case 'HUSB': - $husb = \PhpGedcom\Parser\Fam\Even\Husb::parse($parser); - $even->setHusb($husb); - break; - case 'WIFE': - $wife = \PhpGedcom\Parser\Fam\Even\Wife::parse($parser); - $even->setWife($wife); - break; - case 'SOUR': - $sour = \PhpGedcom\Parser\SourRef::parse($parser); - $even->addSour($sour); - break; - case 'OBJE': - $obje = \PhpGedcom\Parser\ObjeRef::parse($parser); - $even->addObje($obje); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $even->addNote($note); - } - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $even; - } -} diff --git a/library/PhpGedcom/Parser/Fam/Even/Husb.php b/library/PhpGedcom/Parser/Fam/Even/Husb.php deleted file mode 100644 index c07123d8..00000000 --- a/library/PhpGedcom/Parser/Fam/Even/Husb.php +++ /dev/null @@ -1,60 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Fam\Even; - -/** - * - * - */ -class Husb extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $husband = new \PhpGedcom\Record\Fam\Even\Husb(); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'AGE': - $husband->setAge(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $husband; - } -} diff --git a/library/PhpGedcom/Parser/Fam/Even/Wife.php b/library/PhpGedcom/Parser/Fam/Even/Wife.php deleted file mode 100644 index d2951fae..00000000 --- a/library/PhpGedcom/Parser/Fam/Even/Wife.php +++ /dev/null @@ -1,60 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Fam\Even; - -/** - * - * - */ -class Wife extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $wife = new \PhpGedcom\Record\Fam\Even\Wife(); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'AGE': - $wife->setAge(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $wife; - } -} diff --git a/library/PhpGedcom/Parser/Fam/Marb.php b/library/PhpGedcom/Parser/Fam/Marb.php deleted file mode 100644 index 001a19e3..00000000 --- a/library/PhpGedcom/Parser/Fam/Marb.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Fam; - -/** - * - * - */ -class Marb extends \PhpGedcom\Parser\Fam\Even -{ -} diff --git a/library/PhpGedcom/Parser/Fam/Marc.php b/library/PhpGedcom/Parser/Fam/Marc.php deleted file mode 100644 index 7d45b9bc..00000000 --- a/library/PhpGedcom/Parser/Fam/Marc.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Fam; - -/** - * - * - */ -class Marc extends \PhpGedcom\Parser\Fam\Even -{ -} diff --git a/library/PhpGedcom/Parser/Fam/Marl.php b/library/PhpGedcom/Parser/Fam/Marl.php deleted file mode 100644 index fb5949b8..00000000 --- a/library/PhpGedcom/Parser/Fam/Marl.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Fam; - -/** - * - * - */ -class Marl extends \PhpGedcom\Parser\Fam\Even -{ -} diff --git a/library/PhpGedcom/Parser/Fam/Marr.php b/library/PhpGedcom/Parser/Fam/Marr.php deleted file mode 100644 index a81dcac5..00000000 --- a/library/PhpGedcom/Parser/Fam/Marr.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Fam; - -/** - * - * - */ -class Marr extends \PhpGedcom\Parser\Fam\Even -{ -} diff --git a/library/PhpGedcom/Parser/Fam/Mars.php b/library/PhpGedcom/Parser/Fam/Mars.php deleted file mode 100644 index f219369b..00000000 --- a/library/PhpGedcom/Parser/Fam/Mars.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Fam; - -/** - * - * - */ -class Mars extends \PhpGedcom\Parser\Fam\Even -{ -} diff --git a/library/PhpGedcom/Parser/Fam/Slgs.php b/library/PhpGedcom/Parser/Fam/Slgs.php deleted file mode 100644 index 52491834..00000000 --- a/library/PhpGedcom/Parser/Fam/Slgs.php +++ /dev/null @@ -1,79 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Fam; - -/** - * - * - */ -class Slgs extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $slgs = new \PhpGedcom\Record\Fam\Slgs(); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'STAT': - $slgs->setStat(trim($record[2])); - break; - case 'DATE': - $slgs->setDate(trim($record[2])); - break; - case 'PLAC': - $slgs->setPlac(trim($record[2])); - break; - case 'TEMP': - $slgs->setTemp(trim($record[2])); - break; - case 'SOUR': - $sour = \PhpGedcom\Parser\SourRef::parse($parser); - $slgs->addSour($sour); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $slgs->addNote($note); - } - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $slgs; - } -} diff --git a/library/PhpGedcom/Parser/Head.php b/library/PhpGedcom/Parser/Head.php deleted file mode 100644 index 8bdfffac..00000000 --- a/library/PhpGedcom/Parser/Head.php +++ /dev/null @@ -1,106 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - - -/** - * - * - */ -class Head extends \PhpGedcom\Parser\Component -{ - - /** - * - * @param \PhpGedcom\Parser $parser - * @return \PhpGedcom\Record\Head - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $identifier = $parser->normalizeIdentifier($record[1]); - $depth = (int)$record[0]; - - $head = new \PhpGedcom\Record\Head(); - - $parser->getGedcom()->setHead($head); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; - $recordType = strtoupper(trim($record[1])); - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'SOUR': - $sour = \PhpGedcom\Parser\Head\Sour::parse($parser); - $head->setSour($sour); - break; - case 'DEST': - $head->setDest(trim($record[2])); - break; - case 'SUBM': - $head->setSubm($parser->normalizeIdentifier($record[2])); - break; - case 'SUBN': - $head->setSubn($parser->normalizeIdentifier($record[2])); - break; - case 'DEST': - $head->setDest(trim($record[2])); - break; - case 'FILE': - $head->setFile(trim($record[2])); - break; - case 'COPR': - $head->setCopr(trim($record[2])); - break; - case 'LANG': - $head->setLang(trim($record[2])); - break; - case 'DATE': - $date = \PhpGedcom\Parser\Head\Date::parse($parser); - $head->setDate($date); - break; - case 'GEDC': - $gedc = \PhpGedcom\Parser\Head\Gedc::parse($parser); - $head->setGedc($gedc); - break; - case 'CHAR': - $char = \PhpGedcom\Parser\Head\Char::parse($parser); - $head->setChar($char); - break; - case 'PLAC': - $plac = \PhpGedcom\Parser\Head\Plac::parse($parser); - $head->setPlac($plac); - break; - case 'NOTE': - $head->setNote($parser->parseMultiLineRecord()); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $head; - } -} diff --git a/library/PhpGedcom/Parser/Head/Char.php b/library/PhpGedcom/Parser/Head/Char.php deleted file mode 100644 index 543e35ce..00000000 --- a/library/PhpGedcom/Parser/Head/Char.php +++ /dev/null @@ -1,61 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Head; - -/** - * - * - */ -class Char extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $char = new \PhpGedcom\Record\Head\Char(); - $char->setChar(trim($record[2])); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'VERS': - $char->setVers(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $char; - } -} diff --git a/library/PhpGedcom/Parser/Head/Date.php b/library/PhpGedcom/Parser/Head/Date.php deleted file mode 100644 index 75c56140..00000000 --- a/library/PhpGedcom/Parser/Head/Date.php +++ /dev/null @@ -1,61 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Head; - -/** - * - * - */ -class Date extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $date = new \PhpGedcom\Record\Head\Date(); - $date->setDate(trim($record[2])); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'TIME': - $date->setTime(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $date; - } -} diff --git a/library/PhpGedcom/Parser/Head/Gedc.php b/library/PhpGedcom/Parser/Head/Gedc.php deleted file mode 100644 index f65862b5..00000000 --- a/library/PhpGedcom/Parser/Head/Gedc.php +++ /dev/null @@ -1,63 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Head; - -/** - * - * - */ -class Gedc extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $gedc = new \PhpGedcom\Record\Head\Gedc(); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'VERS': - $gedc->setVers(trim($record[2])); - break; - case 'FORM': - $gedc->setForm(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $gedc; - } -} diff --git a/library/PhpGedcom/Parser/Head/Plac.php b/library/PhpGedcom/Parser/Head/Plac.php deleted file mode 100644 index e857abe4..00000000 --- a/library/PhpGedcom/Parser/Head/Plac.php +++ /dev/null @@ -1,60 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Head; - -/** - * - * - */ -class Plac extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $plac = new \PhpGedcom\Record\Head\Plac(); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'FORM': - $plac->setForm(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $plac; - } -} diff --git a/library/PhpGedcom/Parser/Head/Sour.php b/library/PhpGedcom/Parser/Head/Sour.php deleted file mode 100644 index a9c2c3e0..00000000 --- a/library/PhpGedcom/Parser/Head/Sour.php +++ /dev/null @@ -1,72 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Head; - -/** - * - * - */ -class Sour extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $source = new \PhpGedcom\Record\Head\Sour(); - $source->setSour(trim($record[2])); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'VERS': - $source->setVers(trim($record[2])); - break; - case 'NAME': - $source->setName(trim($record[2])); - break; - case 'CORP': - $corp = \PhpGedcom\Parser\Head\Sour\Corp::parse($parser); - $source->setCorp($corp); - break; - case 'DATA': - $data = \PhpGedcom\Parser\Head\Sour\Data::parse($parser); - $source->setData($data); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $source; - } -} diff --git a/library/PhpGedcom/Parser/Head/Sour/Corp.php b/library/PhpGedcom/Parser/Head/Sour/Corp.php deleted file mode 100644 index 33e414fd..00000000 --- a/library/PhpGedcom/Parser/Head/Sour/Corp.php +++ /dev/null @@ -1,64 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Head\Sour; - -/** - * - * - */ -class Corp extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $corp = new \PhpGedcom\Record\Head\Sour\Corp(); - $corp->setCorp(trim($record[2])); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'ADDR': - $corp->setAddr(\PhpGedcom\Parser\Addr::parse($parser)); - break; - case 'PHON': - $corp->addPhon(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $corp; - } -} diff --git a/library/PhpGedcom/Parser/Head/Sour/Data.php b/library/PhpGedcom/Parser/Head/Sour/Data.php deleted file mode 100644 index 4f6dcf5c..00000000 --- a/library/PhpGedcom/Parser/Head/Sour/Data.php +++ /dev/null @@ -1,64 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Head\Sour; - -/** - * - * - */ -class Data extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $data = new \PhpGedcom\Record\Head\Sour\Data(); - $data->setData(trim($record[2])); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'DATE': - $data->setDate(trim($record[2])); - break; - case 'COPR': - $data->setCopr(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $data; - } -} diff --git a/library/PhpGedcom/Parser/Indi.php b/library/PhpGedcom/Parser/Indi.php deleted file mode 100644 index c1307447..00000000 --- a/library/PhpGedcom/Parser/Indi.php +++ /dev/null @@ -1,187 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -/** - * - * - */ -class Indi extends \PhpGedcom\Parser\Component -{ - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $identifier = $parser->normalizeIdentifier($record[1]); - $depth = (int)$record[0]; - - $indi = new \PhpGedcom\Record\Indi(); - $indi->setId($identifier); - - $parser->getGedcom()->addIndi($indi); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'NAME': - $name = \PhpGedcom\Parser\Indi\Name::parse($parser); - $indi->addName($name); - break; - case 'ALIA': - $indi->addAlia($parser->normalizeIdentifier($record[2])); - break; - case 'SEX': - $indi->setSex(trim($record[2])); - break; - case 'RIN': - $indi->setRin(trim($record[2])); - break; - case 'RESN': - $indi->setResn(trim($record[2])); - break; - case 'RFN': - $indi->setRfn(trim($record[2])); - break; - case 'AFN': - $indi->setAfn(trim($record[2])); - break; - case 'CHAN': - $chan = \PhpGedcom\Parser\Chan::parse($parser); - $indi->setChan($chan); - break; - case 'FAMS': - $fams = \PhpGedcom\Parser\Indi\Fams::parse($parser); - if ($fams) { - $indi->addFams($fams); - } - break; - case 'FAMC': - $famc = \PhpGedcom\Parser\Indi\Famc::parse($parser); - if ($famc) { - $indi->addFamc($famc); - } - break; - case 'ASSO': - $asso = \PhpGedcom\Parser\Indi\Asso::parse($parser); - $indi->addAsso($asso); - break; - case 'ANCI': - $indi->addAnci($parser->normalizeIdentifier($record[2])); - break; - case 'DESI': - $indi->addDesi($parser->normalizeIdentifier($record[2])); - break; - case 'SUBM': - $indi->addSubm($parser->normalizeIdentifier($record[2])); - break; - case 'REFN': - $ref = \PhpGedcom\Parser\Refn::parse($parser); - $indi->addRefn($ref); - break; - case 'BAPL': - case 'CONL': - case 'ENDL': - case 'SLGC': - $className = ucfirst(strtolower($recordType)); - $class = '\\PhpGedcom\\Parser\\Indi\\' . $className; - - $lds = $class::parse($parser); - $indi->{'set' . $recordType}($lds); - break; - case 'OBJE': - $obje = \PhpGedcom\Parser\ObjeRef::parse($parser); - $indi->addObje($obje); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $indi->addNote($note); - } - break; - case 'SOUR': - $sour = \PhpGedcom\Parser\SourRef::parse($parser); - $indi->addSour($sour); - break; - case 'ADOP': - case 'BIRT': - case 'BAPM': - case 'BARM': - case 'BASM': - case 'BLES': - case 'BURI': - case 'CENS': - case 'CHR': - case 'CHRA': - case 'CONF': - case 'CREM': - case 'DEAT': - case 'EMIG': - case 'FCOM': - case 'GRAD': - case 'IMMI': - case 'NATU': - case 'ORDN': - case 'RETI': - case 'PROB': - case 'WILL': - case 'EVEN': - $className = ucfirst(strtolower($recordType)); - $class = '\\PhpGedcom\\Parser\\Indi\\' . $className; - - $event = $class::parse($parser); - $indi->addEven($event); - break; - case 'CAST': - case 'DSCR': - case 'EDUC': - case 'IDNO': - case 'NATI': - case 'NCHI': - case 'NMR': - case 'OCCU': - case 'PROP': - case 'RELI': - case 'RESI': - case 'SSN': - case 'TITL': - $className = ucfirst(strtolower($recordType)); - $class = '\\PhpGedcom\\Parser\\Indi\\' . $className; - - $att = $class::parse($parser); - $indi->addAttr($att); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $indi; - } -} diff --git a/library/PhpGedcom/Parser/Indi/Adop.php b/library/PhpGedcom/Parser/Indi/Adop.php deleted file mode 100644 index f2b74837..00000000 --- a/library/PhpGedcom/Parser/Indi/Adop.php +++ /dev/null @@ -1,34 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Adop extends \PhpGedcom\Parser\Indi\Even -{ - public static function parseAdop($parser, $even) - { - $record = $parser->getCurrentLineRecord(); - $even->setAdop(trim($record[2])); - } - - public static function parseFamc($parser, $even) - { - $record = $parser->getCurrentLineRecord(); - $even->setFamc(trim($record[2])); - } -} diff --git a/library/PhpGedcom/Parser/Indi/Asso.php b/library/PhpGedcom/Parser/Indi/Asso.php deleted file mode 100644 index e002fecc..00000000 --- a/library/PhpGedcom/Parser/Indi/Asso.php +++ /dev/null @@ -1,71 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Asso extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $asso = new \PhpGedcom\Record\Indi\Asso(); - $asso->setIndi($parser->normalizeIdentifier($record[2])); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'RELA': - $asso->setRela(trim($record[2])); - break; - case 'SOUR': - $sour = \PhpGedcom\Parser\SourRef::parse($parser); - $asso->addSour($sour); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $asso->addNote($note); - } - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $asso; - } -} diff --git a/library/PhpGedcom/Parser/Indi/Attr.php b/library/PhpGedcom/Parser/Indi/Attr.php deleted file mode 100644 index 030691c5..00000000 --- a/library/PhpGedcom/Parser/Indi/Attr.php +++ /dev/null @@ -1,104 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -abstract class Attr extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $className = '\\PhpGedcom\\Record\\Indi\\' . ucfirst(strtolower(trim($record[1]))); - $attr = new $className(); - - $attr->setType(trim($record[1])); - - if (isset($record[2])) { - $attr->setAttr(trim($record[2])); - } - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'TYPE': - $attr->setType(trim($record[2])); - break; - case 'DATE': - $attr->setDate(trim($record[2])); - break; - case 'PLAC': - $plac = \PhpGedcom\Parser\Indi\Even\Plac::parse($parser); - $attr->setPlac($plac); - break; - case 'ADDR': - $attr->setAddr(\PhpGedcom\Parser\Addr::parse($parser)); - break; - case 'PHON': - $phone = \PhpGedcom\Parser\Phon::parse($parser); - $attr->addPhon($phone); - break; - case 'CAUS': - $attr->setCaus(trim($record[2])); - break; - case 'AGE': - $attr->setAge(trim($record[2])); - break; - case 'AGNC': - $attr->setAgnc(trim($record[2])); - break; - case 'SOUR': - $sour = \PhpGedcom\Parser\SourRef::parse($parser); - $attr->addSour($sour); - break; - case 'OBJE': - $obje = \PhpGedcom\Parser\ObjeRef::parse($parser); - $attr->addObje($obje); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $attr->addNote($note); - } - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $attr; - } -} diff --git a/library/PhpGedcom/Parser/Indi/Bapl.php b/library/PhpGedcom/Parser/Indi/Bapl.php deleted file mode 100644 index 9407880b..00000000 --- a/library/PhpGedcom/Parser/Indi/Bapl.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - */ -class Bapl extends Lds -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Bapm.php b/library/PhpGedcom/Parser/Indi/Bapm.php deleted file mode 100644 index 57a18c56..00000000 --- a/library/PhpGedcom/Parser/Indi/Bapm.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Bapm extends \PhpGedcom\Parser\Indi\Even -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Barm.php b/library/PhpGedcom/Parser/Indi/Barm.php deleted file mode 100644 index 9ff70285..00000000 --- a/library/PhpGedcom/Parser/Indi/Barm.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Barm extends \PhpGedcom\Parser\Indi\Even -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Basm.php b/library/PhpGedcom/Parser/Indi/Basm.php deleted file mode 100644 index 6e055d72..00000000 --- a/library/PhpGedcom/Parser/Indi/Basm.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Basm extends \PhpGedcom\Parser\Indi\Even -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Birt.php b/library/PhpGedcom/Parser/Indi/Birt.php deleted file mode 100644 index 93386ec3..00000000 --- a/library/PhpGedcom/Parser/Indi/Birt.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Birt extends \PhpGedcom\Parser\Indi\Even -{ - public static function parseFamc($parser, $even) - { - $record = $parser->getCurrentLineRecord(); - $even->setFamc(trim($record[2])); - } -} diff --git a/library/PhpGedcom/Parser/Indi/Bles.php b/library/PhpGedcom/Parser/Indi/Bles.php deleted file mode 100644 index bf913000..00000000 --- a/library/PhpGedcom/Parser/Indi/Bles.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Bles extends \PhpGedcom\Parser\Indi\Even -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Buri.php b/library/PhpGedcom/Parser/Indi/Buri.php deleted file mode 100644 index 0a430784..00000000 --- a/library/PhpGedcom/Parser/Indi/Buri.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Buri extends \PhpGedcom\Parser\Indi\Even -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Cast.php b/library/PhpGedcom/Parser/Indi/Cast.php deleted file mode 100644 index a069d8d9..00000000 --- a/library/PhpGedcom/Parser/Indi/Cast.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Cast extends \PhpGedcom\Parser\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Cens.php b/library/PhpGedcom/Parser/Indi/Cens.php deleted file mode 100644 index c4f7a7b8..00000000 --- a/library/PhpGedcom/Parser/Indi/Cens.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Cens extends \PhpGedcom\Parser\Indi\Even -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Chr.php b/library/PhpGedcom/Parser/Indi/Chr.php deleted file mode 100644 index fffc2134..00000000 --- a/library/PhpGedcom/Parser/Indi/Chr.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Chr extends \PhpGedcom\Parser\Indi\Even -{ - public static function parseFamc($parser, $even) - { - $record = $parser->getCurrentLineRecord(); - $even->setFamc(trim($record[2])); - } -} diff --git a/library/PhpGedcom/Parser/Indi/Chra.php b/library/PhpGedcom/Parser/Indi/Chra.php deleted file mode 100644 index 3fc584a9..00000000 --- a/library/PhpGedcom/Parser/Indi/Chra.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Chra extends \PhpGedcom\Parser\Indi\Even -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Conf.php b/library/PhpGedcom/Parser/Indi/Conf.php deleted file mode 100644 index 012604d3..00000000 --- a/library/PhpGedcom/Parser/Indi/Conf.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Conf extends \PhpGedcom\Parser\Indi\Even -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Conl.php b/library/PhpGedcom/Parser/Indi/Conl.php deleted file mode 100644 index 511262ef..00000000 --- a/library/PhpGedcom/Parser/Indi/Conl.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Conl extends Lds -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Crem.php b/library/PhpGedcom/Parser/Indi/Crem.php deleted file mode 100644 index b6c65a9d..00000000 --- a/library/PhpGedcom/Parser/Indi/Crem.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Crem extends \PhpGedcom\Parser\Indi\Even -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Deat.php b/library/PhpGedcom/Parser/Indi/Deat.php deleted file mode 100644 index 09a535ab..00000000 --- a/library/PhpGedcom/Parser/Indi/Deat.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Deat extends \PhpGedcom\Parser\Indi\Even -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Dscr.php b/library/PhpGedcom/Parser/Indi/Dscr.php deleted file mode 100644 index bfea1218..00000000 --- a/library/PhpGedcom/Parser/Indi/Dscr.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Dscr extends \PhpGedcom\Parser\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Educ.php b/library/PhpGedcom/Parser/Indi/Educ.php deleted file mode 100644 index cf11f840..00000000 --- a/library/PhpGedcom/Parser/Indi/Educ.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Educ extends \PhpGedcom\Parser\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Emig.php b/library/PhpGedcom/Parser/Indi/Emig.php deleted file mode 100644 index 0e316ac7..00000000 --- a/library/PhpGedcom/Parser/Indi/Emig.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Emig extends \PhpGedcom\Parser\Indi\Even -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Endl.php b/library/PhpGedcom/Parser/Indi/Endl.php deleted file mode 100644 index b28e68d2..00000000 --- a/library/PhpGedcom/Parser/Indi/Endl.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Endl extends Lds -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Even.php b/library/PhpGedcom/Parser/Indi/Even.php deleted file mode 100644 index 0743e3a2..00000000 --- a/library/PhpGedcom/Parser/Indi/Even.php +++ /dev/null @@ -1,122 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -use PhpGedcom\Parser\Chan; - -/** - * - * - */ -class Even extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $even = null; - - if (strtoupper(trim($record[1])) != 'EVEN') { - $className = '\\PhpGedcom\\Record\\Indi\\' . ucfirst(strtolower(trim($record[1]))); - $even = new $className(); - } else { - $even = new \PhpGedcom\Record\Indi\Even(); - } - - if (isset($record[1]) && strtoupper(trim($record[1])) != 'EVEN') { - $even->setType(trim($record[1])); - } - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'TYPE': - $even->setType(trim($record[2])); - break; - case 'DATE': - $even->setDate(trim($record[2])); - break; - case 'PLAC': - $plac = \PhpGedcom\Parser\Indi\Even\Plac::parse($parser); - $even->setPlac($plac); - break; - case 'ADDR': - $even->setAddr(\PhpGedcom\Parser\Addr::parse($parser)); - break; - case 'PHON': - $phone = \PhpGedcom\Parser\Phone::parse($parser); - $even->addPhone($phone); - break; - case 'CAUS': - $even->setCaus(trim($record[2])); - break; - case 'AGE': - $even->setAge(trim($record[2])); - break; - case 'AGNC': - $even->setAgnc(trim($record[2])); - break; - case 'SOUR': - $sour = \PhpGedcom\Parser\SourRef::parse($parser); - $even->addSour($sour); - break; - case 'OBJE': - $obje = \PhpGedcom\Parser\ObjeRef::parse($parser); - $even->addObje($obje); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $even->addNote($note); - } - break; - case 'CHAN': - $change = Chan::parse($parser); - $even->setChan($change); - break; - default: - $self = get_called_class(); - $method = 'parse' . $recordType; - - if (method_exists($self, $method)) { - $self::$method($parser, $even); - } else { - $parser->logUnhandledRecord($self . ' @ ' . __LINE__); - $parser->skipToNextLevel($currentDepth); - } - } - - $parser->forward(); - } - - return $even; - } -} diff --git a/library/PhpGedcom/Parser/Indi/Even/Plac.php b/library/PhpGedcom/Parser/Indi/Even/Plac.php deleted file mode 100644 index cc31defb..00000000 --- a/library/PhpGedcom/Parser/Indi/Even/Plac.php +++ /dev/null @@ -1,74 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi\Even; - -/** - * - * - */ -class Plac extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $plac = new \PhpGedcom\Record\Indi\Even\Plac(); - - if (isset($record[2])) { - $plac->setPlac(trim($record[2])); - } - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'FORM': - $plac->setForm(trim($record[2])); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $plac->addNote($note); - } - break; - case 'SOUR': - $sour = \PhpGedcom\Parser\SourRef::parse($parser); - $plac->addSour($sour); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $plac; - } -} diff --git a/library/PhpGedcom/Parser/Indi/Famc.php b/library/PhpGedcom/Parser/Indi/Famc.php deleted file mode 100644 index 78ed4763..00000000 --- a/library/PhpGedcom/Parser/Indi/Famc.php +++ /dev/null @@ -1,75 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Famc extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - if (count($record) < 3) { - $parser->logSkippedRecord('Missing family information; ' . get_class(), ' @ ' . __LINE__); - $parser->skipToNextLevel($depth); - return null; - } - - $famc = $parser->normalizeIdentifier($record[2]); - - $fam = new \PhpGedcom\Record\Indi\Famc(); - $fam->setFamc($famc); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'PEDI': - $fam->setPedi(trim($record[2])); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $fam->addNote($note); - } - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $fam; - } -} diff --git a/library/PhpGedcom/Parser/Indi/Fams.php b/library/PhpGedcom/Parser/Indi/Fams.php deleted file mode 100644 index 2cff0d4a..00000000 --- a/library/PhpGedcom/Parser/Indi/Fams.php +++ /dev/null @@ -1,72 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Fams extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - if (count($record) < 3) { - $parser->logSkippedRecord('Missing family information; ' . get_class(), ' @ ' . __LINE__); - $parser->skipToNextLevel($depth); - return null; - } - - $fams = $parser->normalizeIdentifier($record[2]); - - $fam = new \PhpGedcom\Record\Indi\Fams(); - $fam->setFams($fams); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $fam->addNote($note); - } - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $fam; - } -} diff --git a/library/PhpGedcom/Parser/Indi/Fcom.php b/library/PhpGedcom/Parser/Indi/Fcom.php deleted file mode 100644 index 574632c9..00000000 --- a/library/PhpGedcom/Parser/Indi/Fcom.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Fcom extends \PhpGedcom\Parser\Indi\Even -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Grad.php b/library/PhpGedcom/Parser/Indi/Grad.php deleted file mode 100644 index f2b903de..00000000 --- a/library/PhpGedcom/Parser/Indi/Grad.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Grad extends \PhpGedcom\Parser\Indi\Even -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Idno.php b/library/PhpGedcom/Parser/Indi/Idno.php deleted file mode 100644 index 70ea56e4..00000000 --- a/library/PhpGedcom/Parser/Indi/Idno.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Idno extends \PhpGedcom\Parser\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Immi.php b/library/PhpGedcom/Parser/Indi/Immi.php deleted file mode 100644 index a775ffaa..00000000 --- a/library/PhpGedcom/Parser/Indi/Immi.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Immi extends \PhpGedcom\Parser\Indi\Even -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Lds.php b/library/PhpGedcom/Parser/Indi/Lds.php deleted file mode 100644 index e5872faa..00000000 --- a/library/PhpGedcom/Parser/Indi/Lds.php +++ /dev/null @@ -1,87 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -abstract class Lds extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $className = '\\PhpGedcom\\Record\\Indi\\' . ucfirst(strtolower(trim($record[1]))); - $lds = new $className(); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'STAT': - $lds->setStat(trim($record[2])); - break; - case 'DATE': - $lds->setDate(trim($record[2])); - break; - case 'PLAC': - $lds->setPlac(trim($record[2])); - break; - case 'TEMP': - $lds->setTemp(trim($record[2])); - break; - case 'SOUR': - $sour = \PhpGedcom\Parser\SourRef::parse($parser); - $lds->addSour($sour); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $lds->addNote($note); - } - break; - default: - $self = get_called_class(); - $method = 'parse' . $recordType; - - if (method_exists($self, $method)) { - $self::$method($parser, $lds); - } else { - $parser->logUnhandledRecord($self . ' @ ' . __LINE__); - } - } - - $parser->forward(); - } - - return $lds; - } -} diff --git a/library/PhpGedcom/Parser/Indi/Name.php b/library/PhpGedcom/Parser/Indi/Name.php deleted file mode 100644 index 662cb97e..00000000 --- a/library/PhpGedcom/Parser/Indi/Name.php +++ /dev/null @@ -1,86 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Name extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $name = new \PhpGedcom\Record\Indi\Name(); - $name->setName(trim($record[2])); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'NPFX': - $name->setNpfx(trim($record[2])); - break; - case 'GIVN': - $name->setGivn(trim($record[2])); - break; - case 'NICK': - $name->setNick(trim($record[2])); - break; - case 'SPFX': - $name->setSpfx(trim($record[2])); - break; - case 'SURN': - $name->setSurn(trim($record[2])); - break; - case 'NSFX': - $name->setNsfx(trim($record[2])); - break; - case 'SOUR': - $sour = \PhpGedcom\Parser\SourRef::parse($parser); - $name->addSour($sour); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $name->addNote($note); - } - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $name; - } -} diff --git a/library/PhpGedcom/Parser/Indi/Nati.php b/library/PhpGedcom/Parser/Indi/Nati.php deleted file mode 100644 index 2fdcb17e..00000000 --- a/library/PhpGedcom/Parser/Indi/Nati.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Nati extends \PhpGedcom\Parser\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Natu.php b/library/PhpGedcom/Parser/Indi/Natu.php deleted file mode 100644 index 9d7db0da..00000000 --- a/library/PhpGedcom/Parser/Indi/Natu.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Natu extends \PhpGedcom\Parser\Indi\Even -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Nchi.php b/library/PhpGedcom/Parser/Indi/Nchi.php deleted file mode 100644 index 7543fcaa..00000000 --- a/library/PhpGedcom/Parser/Indi/Nchi.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Nchi extends \PhpGedcom\Parser\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Nmr.php b/library/PhpGedcom/Parser/Indi/Nmr.php deleted file mode 100644 index d939f1b7..00000000 --- a/library/PhpGedcom/Parser/Indi/Nmr.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Nmr extends \PhpGedcom\Parser\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Occu.php b/library/PhpGedcom/Parser/Indi/Occu.php deleted file mode 100644 index 9ebed462..00000000 --- a/library/PhpGedcom/Parser/Indi/Occu.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Occu extends \PhpGedcom\Parser\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Ordn.php b/library/PhpGedcom/Parser/Indi/Ordn.php deleted file mode 100644 index cdfa72af..00000000 --- a/library/PhpGedcom/Parser/Indi/Ordn.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Ordn extends \PhpGedcom\Parser\Indi\Even -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Prob.php b/library/PhpGedcom/Parser/Indi/Prob.php deleted file mode 100644 index e266ff87..00000000 --- a/library/PhpGedcom/Parser/Indi/Prob.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Prob extends \PhpGedcom\Parser\Indi\Even -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Prop.php b/library/PhpGedcom/Parser/Indi/Prop.php deleted file mode 100644 index 69d2cb96..00000000 --- a/library/PhpGedcom/Parser/Indi/Prop.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Prop extends \PhpGedcom\Parser\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Reli.php b/library/PhpGedcom/Parser/Indi/Reli.php deleted file mode 100644 index 766f6e57..00000000 --- a/library/PhpGedcom/Parser/Indi/Reli.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Reli extends \PhpGedcom\Parser\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Resi.php b/library/PhpGedcom/Parser/Indi/Resi.php deleted file mode 100644 index 991f3759..00000000 --- a/library/PhpGedcom/Parser/Indi/Resi.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Resi extends \PhpGedcom\Parser\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Reti.php b/library/PhpGedcom/Parser/Indi/Reti.php deleted file mode 100644 index b010fe5e..00000000 --- a/library/PhpGedcom/Parser/Indi/Reti.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Reti extends \PhpGedcom\Parser\Indi\Even -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Slgc.php b/library/PhpGedcom/Parser/Indi/Slgc.php deleted file mode 100644 index d22d5c6a..00000000 --- a/library/PhpGedcom/Parser/Indi/Slgc.php +++ /dev/null @@ -1,31 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Slgc extends Lds -{ - /** - * - */ - public static function parseFamc($parser, $slgc) - { - $record = $parser->getCurrentLineRecord(); - $slgc->setFamc($parser->normalizeIdentifier($record[2])); - } -} diff --git a/library/PhpGedcom/Parser/Indi/Ssn.php b/library/PhpGedcom/Parser/Indi/Ssn.php deleted file mode 100644 index 01e4caca..00000000 --- a/library/PhpGedcom/Parser/Indi/Ssn.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Ssn extends \PhpGedcom\Parser\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Titl.php b/library/PhpGedcom/Parser/Indi/Titl.php deleted file mode 100644 index 8ba3c2e0..00000000 --- a/library/PhpGedcom/Parser/Indi/Titl.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Titl extends \PhpGedcom\Parser\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Parser/Indi/Will.php b/library/PhpGedcom/Parser/Indi/Will.php deleted file mode 100644 index 4173fdb7..00000000 --- a/library/PhpGedcom/Parser/Indi/Will.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi; - -/** - * - * - */ -class Will extends \PhpGedcom\Parser\Indi\Even -{ -} diff --git a/library/PhpGedcom/Parser/Note.php b/library/PhpGedcom/Parser/Note.php deleted file mode 100644 index 57141cf6..00000000 --- a/library/PhpGedcom/Parser/Note.php +++ /dev/null @@ -1,96 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -/** - * - * - */ -class Note extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(4); - $identifier = $parser->normalizeIdentifier($record[1]); - $depth = (int)$record[0]; - - $note = new \PhpGedcom\Record\Note(); - $note->setId($identifier); - - if (isset($record[3])) { - $note->setNote($record[3]); - } - - $parser->getGedcom()->addNote($note); - - if (isset($record[3])) { - $note->note = $record[3]; - } - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; - $recordType = strtoupper(trim($record[1])); - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'RIN': - $note->setRin(trim($record[2])); - break; - case 'CONT': - $note->setNote($note->getNote() . "\n"); - - if (isset($record[2])) { - $note->setNote($note->getNote() . $record[2]); - } - break; - case 'CONC': - if (isset($record[2])) { - $note->setNote($note->getNote() . $record[2]); - } - break; - case 'REFN': - $refn = \PhpGedcom\Parser\Refn::parse($parser); - $note->addRefn($refn); - break; - case 'CHAN': - $chan = \PhpGedcom\Parser\Chan::parse($parser); - $note->setChan($chan); - break; - case 'SOUR': - $sour = \PhpGedcom\Parser\SourRef::parse($parser); - $note->addSour($sour); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $note; - } -} diff --git a/library/PhpGedcom/Parser/NoteRef.php b/library/PhpGedcom/Parser/NoteRef.php deleted file mode 100644 index 4008543e..00000000 --- a/library/PhpGedcom/Parser/NoteRef.php +++ /dev/null @@ -1,73 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -/** - * - */ -class NoteRef extends \PhpGedcom\Parser\Component -{ - /** - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $note = new \PhpGedcom\Record\NoteRef(); - - if (count($record) < 3) { - $parser->logSkippedRecord('Missing note information; ' . get_class(), ' @ ' . __LINE__); - $parser->skipToNextLevel($depth); - return null; - } - - if (preg_match('/^@(.*)@$/', trim($record[2]))) { - $note->setIsReference(true); - $note->setNote($parser->normalizeIdentifier($record[2])); - } else { - $before = $parser->getCurrentLine(); - $note->setIsReference(false); - $note->setNote($parser->parseMultiLineRecord()); - } - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'SOUR': - $sour = \PhpGedcom\Parser\SourRef::parse($parser); - $note->addSour($sour); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $note; - } -} diff --git a/library/PhpGedcom/Parser/Obje.php b/library/PhpGedcom/Parser/Obje.php deleted file mode 100644 index f4d7af13..00000000 --- a/library/PhpGedcom/Parser/Obje.php +++ /dev/null @@ -1,90 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -/** - * - * - */ -class Obje extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $identifier = $parser->normalizeIdentifier($record[1]); - $depth = (int)$record[0]; - - $obje = new \PhpGedcom\Record\Obje(); - $obje->setId($identifier); - - $parser->getGedcom()->addObje($obje); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; - $recordType = strtoupper(trim($record[1])); - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'FORM': - $obje->setForm(trim($record[2])); - break; - case 'TITL': - $obje->setTitl(trim($record[2])); - break; - case 'OBJE': - $obje->setForm($parser->normalizeIdentifier($record[2])); - break; - case 'RIN': - $obje->setRin(trim($record[2])); - break; - case 'REFN': - $refn = \PhpGedcom\Parser\Refn::parse($parser); - $obje->addRefn($refn); - break; - case 'BLOB': - $obje->setBlob($parser->parseMultiLineRecord()); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $obje->addNote($note); - } - break; - case 'CHAN': - $chan = \PhpGedcom\Parser\Chan::parse($parser); - $obje->setChan($chan); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $obje; - } -} diff --git a/library/PhpGedcom/Parser/ObjeRef.php b/library/PhpGedcom/Parser/ObjeRef.php deleted file mode 100644 index 41d545d8..00000000 --- a/library/PhpGedcom/Parser/ObjeRef.php +++ /dev/null @@ -1,77 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -/** - * - * - */ -class ObjeRef extends \PhpGedcom\Parser\Component -{ - /** - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $obje = new \PhpGedcom\Record\ObjeRef(); - - if (isset($record[2])) { - $obje->setIsReference(true); - $obje->setObje($parser->normalizeIdentifier($record[2])); - } else { - $obje->setIsReference(false); - } - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'TITL': - $obje->setTitl(trim($record[2])); - break; - case 'FILE': - $obje->setFile(trim($record[2])); - break; - case 'FORM': - $obje->setForm(trim($record[2])); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $obje->addNote($note); - } - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $obje; - } -} diff --git a/library/PhpGedcom/Parser/Phon.php b/library/PhpGedcom/Parser/Phon.php deleted file mode 100644 index d8fddd11..00000000 --- a/library/PhpGedcom/Parser/Phon.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -/** - * - * - */ -class Phon extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $phone = new \PhpGedcom\Record\Phon(); - $phone->setPhon(trim($record[2])); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $phone; - } -} diff --git a/library/PhpGedcom/Parser/Refn.php b/library/PhpGedcom/Parser/Refn.php deleted file mode 100644 index a91f2216..00000000 --- a/library/PhpGedcom/Parser/Refn.php +++ /dev/null @@ -1,61 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -/** - * - * - */ -class Refn extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $refn = new \PhpGedcom\Record\Refn(); - $refn->setRefn(trim($record[2])); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'TYPE': - $refn->setType(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $refn; - } -} diff --git a/library/PhpGedcom/Parser/Repo.php b/library/PhpGedcom/Parser/Repo.php deleted file mode 100644 index 4f03cb55..00000000 --- a/library/PhpGedcom/Parser/Repo.php +++ /dev/null @@ -1,87 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -/** - * - * - */ -class Repo extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $identifier = $parser->normalizeIdentifier($record[1]); - $depth = (int)$record[0]; - - $repo = new \PhpGedcom\Record\Repo(); - $repo->setRepo($identifier); - - $parser->getGedcom()->addRepo($repo); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; - $recordType = strtoupper(trim($record[1])); - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'NAME': - $repo->setName(trim($record[2])); - break; - case 'ADDR': - $addr = \PhpGedcom\Parser\Addr::parse($parser); - $repo->setAddr($addr); - break; - case 'PHON': - $phon = \PhpGedcom\Parser\Phon::parse($parser); - $repo->addPhon($phon); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - $repo->addNote($note); - break; - case 'REFN': - $refn = \PhpGedcom\Parser\Refn::parse($parser); - $repo->addRefn($refn); - break; - case 'CHAN': - $chan = \PhpGedcom\Parser\Chan::parse($parser); - $repo->setChan($chan); - break; - case 'RIN': - $repo->setRin(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $repo; - } -} diff --git a/library/PhpGedcom/Parser/RepoRef.php b/library/PhpGedcom/Parser/RepoRef.php deleted file mode 100644 index 3167bdc2..00000000 --- a/library/PhpGedcom/Parser/RepoRef.php +++ /dev/null @@ -1,68 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -/** - * - * - */ -class RepoRef extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $identifier = $parser->normalizeIdentifier($record[2]); - $depth = (int)$record[0]; - - $repo = new \PhpGedcom\Record\RepoRef(); - $repo->setRepo($identifier); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; - $recordType = strtoupper(trim($record[1])); - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'CALN': - $repo->addCaln(\PhpGedcom\Parser\Caln::parse($parser)); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $repo->addNote($note); - } - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $repo; - } -} diff --git a/library/PhpGedcom/Parser/Sour.php b/library/PhpGedcom/Parser/Sour.php deleted file mode 100644 index a883f883..00000000 --- a/library/PhpGedcom/Parser/Sour.php +++ /dev/null @@ -1,103 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -/** - * - * - */ -class Sour extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $identifier = $parser->normalizeIdentifier($record[1]); - $depth = (int)$record[0]; - - $sour = new \PhpGedcom\Record\Sour(); - $sour->setSour($identifier); - - $parser->getGedcom()->addSour($sour); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; - $recordType = strtoupper(trim($record[1])); - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'TITL': - $sour->setTitl($parser->parseMultilineRecord()); - break; - case 'RIN': - $sour->setRin(trim($record[2])); - break; - case 'AUTH': - $sour->setAuth($parser->parseMultilineRecord()); - break; - case 'TEXT': - $sour->setText($parser->parseMultilineRecord()); - break; - case 'PUBL': - $sour->setPubl($parser->parseMultilineRecord()); - break; - case 'ABBR': - $sour->setAbbr(trim($record[2])); - break; - case 'REPO': - $sour->setRepo(\PhpGedcom\Parser\RepoRef::parse($parser)); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $sour->addNote($note); - } - break; - case 'DATA': - $sour->setData(\PhpGedcom\Parser\Sour\Data::parse($parser)); - break; - case 'OBJE': - $obje = \PhpGedcom\Parser\ObjeRef::parse($parser); - $sour->addObje($obje); - break; - case 'REFN': - $refn = \PhpGedcom\Parser\Refn::parse($parser); - $sour->addRefn($refn); - break; - case 'CHAN': - $chan = \PhpGedcom\Parser\Chan::parse($parser); - $sour->setChan($chan); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $sour; - } -} diff --git a/library/PhpGedcom/Parser/Sour/Data.php b/library/PhpGedcom/Parser/Sour/Data.php deleted file mode 100644 index ed8e3edc..00000000 --- a/library/PhpGedcom/Parser/Sour/Data.php +++ /dev/null @@ -1,75 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Sour; - -/** - * - * - */ -class Data extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $data = new \PhpGedcom\Record\Sour\Data(); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'EVEN': - $data->addEven(\PhpGedcom\Parser\Sour\Data\Even::parse($parser)); - break; - case 'DATE': - $data->setDate(trim($record[2])); - break; - case 'AGNC': - $data->setAgnc(trim($record[2])); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $data->addNote($note); - } - break; - case 'TEXT': - $data->setText($parser->parseMultiLineRecord()); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $data; - } -} diff --git a/library/PhpGedcom/Parser/Sour/Data/Even.php b/library/PhpGedcom/Parser/Sour/Data/Even.php deleted file mode 100644 index dbdef80d..00000000 --- a/library/PhpGedcom/Parser/Sour/Data/Even.php +++ /dev/null @@ -1,63 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Sour\Data; - -/** - * - * - */ -class Even extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $even = new \PhpGedcom\Record\Sour\Data\Even(); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'DATE': - $even->setDate(trim($record[2])); - break; - case 'PLAC': - $even->setPlac(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $even; - } -} diff --git a/library/PhpGedcom/Parser/SourRef.php b/library/PhpGedcom/Parser/SourRef.php deleted file mode 100644 index 3a423310..00000000 --- a/library/PhpGedcom/Parser/SourRef.php +++ /dev/null @@ -1,92 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -/** - * - * - */ -class SourRef extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $sour = new \PhpGedcom\Record\SourRef(); - $sour->setSour($record[2]); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'CONT': - $sour->setSour($sour->getSour() . "\n"); - - if (isset($record[2])) { - $sour->setSour($sour->getSour() . $record[2]); - } - break; - case 'CONC': - if (isset($record[2])) { - $sour->setSour($sour->getSour() . $record[2]); - } - break; - case 'TEXT': - $sour->setText($parser->parseMultiLineRecord()); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $sour->addNote($note); - } - break; - case 'DATA': - $sour->setData(\PhpGedcom\Parser\Sour\Data::parse($parser)); - break; - case 'QUAY': - $sour->setQuay(trim($record[2])); - break; - case 'PAGE': - $sour->setPage(trim($record[2])); - break; - case 'EVEN': - $even = \PhpGedcom\Parser\SourRef\Even::parse($parser); - $sour->setEven($even); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $sour; - } -} diff --git a/library/PhpGedcom/Parser/SourRef/Even.php b/library/PhpGedcom/Parser/SourRef/Even.php deleted file mode 100644 index 06cc0f8c..00000000 --- a/library/PhpGedcom/Parser/SourRef/Even.php +++ /dev/null @@ -1,61 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\SourRef; - -/** - * - * - */ -class Even extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - - $even = new \PhpGedcom\Record\SourRef\Even(); - $even->setEven(trim($record[2])); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'ROLE': - $even->setRole(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $even; - } -} diff --git a/library/PhpGedcom/Parser/Subm.php b/library/PhpGedcom/Parser/Subm.php deleted file mode 100644 index f126e267..00000000 --- a/library/PhpGedcom/Parser/Subm.php +++ /dev/null @@ -1,95 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -/** - * - * - */ -class Subm extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $identifier = $parser->normalizeIdentifier($record[1]); - $depth = (int)$record[0]; - - $subm = new \PhpGedcom\Record\Subm(); - $subm->setSubm($identifier); - - $parser->getGedcom()->addSubm($subm); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; - $recordType = strtoupper(trim($record[1])); - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'NAME': - $subm->setName(isset($record[2]) ? trim($record[2]) : ''); - break; - case 'ADDR': - $addr = \PhpGedcom\Parser\Addr::parse($parser); - $subm->setAddr($addr); - break; - case 'PHON': - $phone = \PhpGedcom\Parser\Phon::parse($parser); - $subm->addPhon($phone); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $subm->addNote($note); - } - break; - case 'OBJE': - $obje = \PhpGedcom\Parser\ObjeRef::parse($parser); - $subm->addObje($obje); - break; - case 'CHAN': - $chan = \PhpGedcom\Parser\Chan::parse($parser); - $subm->setChan($chan); - break; - case 'RIN': - $subm->setRin(isset($record[2]) ? trim($record[2]) : ''); - break; - case 'RFN': - $subm->setRfn(isset($record[2]) ? trim($record[2]) : ''); - break; - case 'LANG': - $subm->addLang(isset($record[2]) ? trim($record[2]) : ''); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $subm; - } -} diff --git a/library/PhpGedcom/Parser/Subn.php b/library/PhpGedcom/Parser/Subn.php deleted file mode 100644 index 30fe009d..00000000 --- a/library/PhpGedcom/Parser/Subn.php +++ /dev/null @@ -1,82 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -/** - * - * - */ -class Subn extends \PhpGedcom\Parser\Component -{ - - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $identifier = $parser->normalizeIdentifier($record[1]); - $depth = (int)$record[0]; - - $subn = new \PhpGedcom\Record\Subn(); - $subn->setSubn($identifier); - - $parser->getGedcom()->setSubn($subn); - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; - $recordType = strtoupper(trim($record[1])); - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - switch ($recordType) { - case 'SUBM': - $subn->setSubm($parser->normalizeIdentifier($record[2])); - break; - case 'FAMF': - $subn->setFamf(trim($record[2])); - break; - case 'TEMP': - $subn->setTemp(trim($record[2])); - break; - case 'ANCE': - $subn->setAnce(trim($record[2])); - break; - case 'DESC': - $subn->setDesc(trim($record[2])); - break; - case 'ORDI': - $subn->setOrdi(trim($record[2])); - break; - case 'RIN': - $subn->setRin(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $parser->forward(); - } - - return $subn; - } -} diff --git a/library/PhpGedcom/Record.php b/library/PhpGedcom/Record.php deleted file mode 100644 index 2c3e115c..00000000 --- a/library/PhpGedcom/Record.php +++ /dev/null @@ -1,96 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom; - -/** - * - */ -abstract class Record -{ - /** - * - */ - public function __call($method, $args) - { - if (substr($method, 0, 3) == 'add') { - $arr = strtolower(substr($method, 3)); - - if (!property_exists($this, '_' . $arr) || !is_array($this->{'_' . $arr})) { - throw new \Exception('Unknown ' . get_class($this) . '::' . $arr); - } - - if (!is_array($args) || !isset($args[0])) { - throw new \Exception('Incorrect arguments to ' . $method); - } - - if (is_object($args[0])) { - // Type safety? - } - - $this->{'_' . $arr}[] = $args[0]; - - return $this; - } elseif (substr($method, 0, 3) == 'set') { - $arr = strtolower(substr($method, 3)); - - if (!property_exists($this, '_' . $arr)) { - throw new \Exception('Unknown ' . get_class($this) . '::' . $arr); - } - - if (!is_array($args) || !isset($args[0])) { - throw new \Exception('Incorrect arguments to ' . $method); - } - - if (is_object($args[0])) { - // Type safety? - } - - $this->{'_' . $arr} = $args[0]; - - return $this; - } elseif (substr($method, 0, 3) == 'get') { - $arr = strtolower(substr($method, 3)); - - if (!property_exists($this, '_' . $arr)) { - throw new \Exception('Unknown ' . get_class($this) . '::' . $arr); - } - - return $this->{'_' . $arr}; - } else { - throw new \Exception('Unknown method called: ' . $method); - } - } - - /** - * - */ - public function __set($var, $val) - { - // this class does not have any public vars - throw new \Exception('Undefined property ' . get_class() . '::' . $var); - } - - /** - * Checks if this GEDCOM object has the provided attribute (ie, if the provided - * attribute exists below the current object in its tree). - * - * @param string $var The name of the attribute - * @return bool True if this object has the provided attribute - */ - public function hasAttribute($var) - { - return property_exists($this, '_' . $var) || property_Exists($this, $var); - } -} diff --git a/library/PhpGedcom/Record/Addr.php b/library/PhpGedcom/Record/Addr.php deleted file mode 100644 index 65ca13ff..00000000 --- a/library/PhpGedcom/Record/Addr.php +++ /dev/null @@ -1,185 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Addr - * @package PhpGedcom\Record - */ -class Addr extends Record -{ - /** - * @var string - */ - protected $addr; - - /** - * @var string - */ - protected $adr1; - - /** - * @var string - */ - protected $adr2; - - /** - * @var string - */ - protected $city; - - /** - * @var string - */ - protected $stae; - - /** - * @var string - */ - protected $post; - - /** - * @var string - */ - protected $ctry; - - /** - * @param string $addr - * @return Addr - */ - public function setAddr($addr) - { - $this->addr = $addr; - return $this; - } - - /** - * @return string - */ - public function getAddr() - { - return $this->addr; - } - - /** - * @param string $adr1 - * @return Addr - */ - public function setAdr1($adr1) - { - $this->adr1 = $adr1; - return $this; - } - - /** - * @return string - */ - public function getAdr1() - { - return $this->adr1; - } - - /** - * @param string $adr2 - * @return Addr - */ - public function setAdr2($adr2) - { - $this->adr2 = $adr2; - return $this; - } - - /** - * @return string - */ - public function getAdr2() - { - return $this->adr2; - } - - /** - * @param string $city - * @return Addr - */ - public function setCity($city) - { - $this->city = $city; - return $this; - } - - /** - * @return string - */ - public function getCity() - { - return $this->city; - } - - /** - * @param string $stae - * @return Addr - */ - public function setStae($stae) - { - $this->stae = $stae; - return $this; - } - - /** - * @return string - */ - public function getStae() - { - return $this->stae; - } - - /** - * @param string $post - * @return Addr - */ - public function setPost($post) - { - $this->post = $post; - return $this; - } - - /** - * @return string - */ - public function getPost() - { - return $this->post; - } - - /** - * @param string $ctry - * @return Addr - */ - public function setCtry($ctry) - { - $this->ctry = $ctry; - return $this; - } - - /** - * @return string - */ - public function getCtry() - { - return $this->ctry; - } -} diff --git a/library/PhpGedcom/Record/Caln.php b/library/PhpGedcom/Record/Caln.php deleted file mode 100644 index db23f35f..00000000 --- a/library/PhpGedcom/Record/Caln.php +++ /dev/null @@ -1,70 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Caln - * @package PhpGedcom\Record - */ -class Caln extends Record -{ - /** - * @var string - */ - protected $caln; - - /** - * @var string - */ - protected $medi; - - /** - * @param string $caln - * @return Caln - */ - public function setCaln($caln) - { - $this->caln = $caln; - return $this; - } - - /** - * @return string - */ - public function getCaln() - { - return $this->caln; - } - - /** - * @param string $medi - * @return Caln - */ - public function setMedi($medi) - { - $this->medi = $medi; - return $this; - } - - /** - * @return string - */ - public function getMedi() - { - return $this->medi; - } -} diff --git a/library/PhpGedcom/Record/Chan.php b/library/PhpGedcom/Record/Chan.php deleted file mode 100644 index faff47d4..00000000 --- a/library/PhpGedcom/Record/Chan.php +++ /dev/null @@ -1,93 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Chan - * @package PhpGedcom\Record - */ -class Chan extends Record -{ - /** - * @var string - */ - protected $date; - - /** - * @var string - */ - protected $time; - - /** - * @var array - */ - protected $note = array(); - - /** - * @param string $date - * @return Chan - */ - public function setDate($date) - { - $this->date = $date; - return $this; - } - - /** - * @return string - */ - public function getDate() - { - return $this->date; - } - - /** - * @param Record\NoteRef $note - * @return Chan - */ - public function addNote(Record\NoteRef $note) - { - $this->note[] = $note; - return $this; - } - - /** - * @return array - */ - public function getNote() - { - return $this->note; - } - - /** - * @param string $time - * @return Chan - */ - public function setTime($time) - { - $this->time = $time; - return $this; - } - - /** - * @return string - */ - public function getTime() - { - return $this->time; - } -} diff --git a/library/PhpGedcom/Record/Data.php b/library/PhpGedcom/Record/Data.php deleted file mode 100644 index 7783415b..00000000 --- a/library/PhpGedcom/Record/Data.php +++ /dev/null @@ -1,70 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Data - * @package PhpGedcom\Record - */ -class Data extends Record -{ - /** - * @var string - */ - protected $text; - - /** - * @var string - */ - protected $date; - - /** - * @param string $text - * @return Data - */ - public function setText($text) - { - $this->text = $text; - return $this; - } - - /** - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * @param string $date - * @return Data - */ - public function setDate($date) - { - $this->date = $date; - return $this; - } - - /** - * @return string - */ - public function getDate() - { - return $this->date; - } -} diff --git a/library/PhpGedcom/Record/Fam.php b/library/PhpGedcom/Record/Fam.php deleted file mode 100644 index bfa065df..00000000 --- a/library/PhpGedcom/Record/Fam.php +++ /dev/null @@ -1,141 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -/** - * - * - */ -class Fam extends \PhpGedcom\Record implements Noteable, Sourceable, Objectable -{ - /** - * - */ - protected $_id = null; - - /** - * - */ - protected $_chan = null; - - /** - * - */ - protected $_husb = null; - - /** - * - */ - protected $_wife = null; - - /** - * - */ - protected $_nchi = null; - - /** - * - */ - protected $_chil = array(); - - /** - * - */ - protected $_even = array(); - - /** - * - */ - protected $_slgs = array(); - - /** - * - */ - protected $_subm = array(); - - /** - * - */ - protected $_refn = array(); - - /** - * - */ - protected $_rin = null; - - /** - * - */ - protected $_note = array(); - - /** - * - */ - protected $_sour = array(); - - /** - * - */ - protected $_obje = array(); - - /** - * - */ - public function addEven(\PhpGedcom\Record\Fam\Even $even) - { - $this->_even[] = $even; - } - - /** - * - */ - public function addSlgs(\PhpGedcom\Record\Fam\Slgs $slgs) - { - $this->_slgs[] = $slgs; - } - - /** - * - * - */ - public function addRefn(\PhpGedcom\Record\Refn $refn) - { - $this->_refn[] = $refn; - } - - /** - * - */ - public function addNote(\PhpGedcom\Record\NoteRef $note) - { - $this->_note[] = $note; - } - - /** - * - */ - public function addSour(\PhpGedcom\Record\SourRef $sour) - { - $this->_sour[] = $sour; - } - - /** - * - */ - public function addObje(\PhpGedcom\Record\ObjeRef $obje) - { - $this->_obje[] = $obje; - } -} diff --git a/library/PhpGedcom/Record/Fam/Anul.php b/library/PhpGedcom/Record/Fam/Anul.php deleted file mode 100644 index 2a3c8ef6..00000000 --- a/library/PhpGedcom/Record/Fam/Anul.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Fam; - -/** - * - */ -class Anul extends \PhpGedcom\Record\Fam\Even -{ -} diff --git a/library/PhpGedcom/Record/Fam/Cens.php b/library/PhpGedcom/Record/Fam/Cens.php deleted file mode 100644 index 1a8ee4a8..00000000 --- a/library/PhpGedcom/Record/Fam/Cens.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Fam; - -/** - * - */ -class Cens extends \PhpGedcom\Record\Fam\Even -{ -} diff --git a/library/PhpGedcom/Record/Fam/Div.php b/library/PhpGedcom/Record/Fam/Div.php deleted file mode 100644 index 7ecafca2..00000000 --- a/library/PhpGedcom/Record/Fam/Div.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Fam; - -/** - * - */ -class Div extends \PhpGedcom\Record\Fam\Even -{ -} diff --git a/library/PhpGedcom/Record/Fam/Enga.php b/library/PhpGedcom/Record/Fam/Enga.php deleted file mode 100644 index 8ef9efb1..00000000 --- a/library/PhpGedcom/Record/Fam/Enga.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Fam; - -/** - * - */ -class Enga extends \PhpGedcom\Record\Fam\Even -{ -} diff --git a/library/PhpGedcom/Record/Fam/Even.php b/library/PhpGedcom/Record/Fam/Even.php deleted file mode 100644 index 713d8457..00000000 --- a/library/PhpGedcom/Record/Fam/Even.php +++ /dev/null @@ -1,87 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Fam; - -use \PhpGedcom\Record\Objectable; -use \PhpGedcom\Record\Sourceable; -use \PhpGedcom\Record\Noteable; - -/** - * - */ -class Even extends \PhpGedcom\Record implements Objectable, Sourceable, Noteable -{ - protected $_type = null; - protected $_date = null; - protected $_plac = null; - protected $_caus = null; - protected $_age = null; - - protected $_addr = null; - - protected $_phon = array(); - - protected $_agnc = null; - - protected $_husb = null; - protected $_wife = null; - - /** - * - */ - protected $_obje = array(); - - /** - * - */ - protected $_sour = array(); - - /** - * - */ - protected $_note = array(); - - /** - * - */ - public function addPhon(\PhpGedcom\Record\Phon $phon) - { - $this->_phon[] = $phon; - } - - /** - * - */ - public function addObje(\PhpGedcom\Record\ObjeRef $obje) - { - $this->_obje[] = $obje; - } - - /** - * - */ - public function addSour(\PhpGedcom\Record\SourRef $sour) - { - $this->_sour[] = $sour; - } - - /** - * - */ - public function addNote(\PhpGedcom\Record\NoteRef $note) - { - $this->_note[] = $note; - } -} diff --git a/library/PhpGedcom/Record/Fam/Even/Husb.php b/library/PhpGedcom/Record/Fam/Even/Husb.php deleted file mode 100644 index 1b0a63d6..00000000 --- a/library/PhpGedcom/Record/Fam/Even/Husb.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Fam\Even; - -/** - * - */ -class Husb extends \PhpGedcom\Record -{ - protected $_age = null; -} diff --git a/library/PhpGedcom/Record/Fam/Even/Wife.php b/library/PhpGedcom/Record/Fam/Even/Wife.php deleted file mode 100644 index 53e4e566..00000000 --- a/library/PhpGedcom/Record/Fam/Even/Wife.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Fam\Even; - -/** - * - */ -class Wife extends \PhpGedcom\Record -{ - protected $_age = null; -} diff --git a/library/PhpGedcom/Record/Fam/Marb.php b/library/PhpGedcom/Record/Fam/Marb.php deleted file mode 100644 index d86bc453..00000000 --- a/library/PhpGedcom/Record/Fam/Marb.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Fam; - -/** - * - */ -class Marb extends \PhpGedcom\Record\Fam\Even -{ -} diff --git a/library/PhpGedcom/Record/Fam/Marc.php b/library/PhpGedcom/Record/Fam/Marc.php deleted file mode 100644 index 39cbcf33..00000000 --- a/library/PhpGedcom/Record/Fam/Marc.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Fam; - -/** - * - */ -class Marc extends \PhpGedcom\Record\Fam\Even -{ -} diff --git a/library/PhpGedcom/Record/Fam/Marl.php b/library/PhpGedcom/Record/Fam/Marl.php deleted file mode 100644 index b84382e3..00000000 --- a/library/PhpGedcom/Record/Fam/Marl.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Fam; - -/** - * - */ -class Marl extends \PhpGedcom\Record\Fam\Even -{ -} diff --git a/library/PhpGedcom/Record/Fam/Marr.php b/library/PhpGedcom/Record/Fam/Marr.php deleted file mode 100644 index 08669880..00000000 --- a/library/PhpGedcom/Record/Fam/Marr.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Fam; - -/** - * - */ -class Marr extends \PhpGedcom\Record\Fam\Even -{ -} diff --git a/library/PhpGedcom/Record/Fam/Mars.php b/library/PhpGedcom/Record/Fam/Mars.php deleted file mode 100644 index 515e1597..00000000 --- a/library/PhpGedcom/Record/Fam/Mars.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Fam; - -/** - * - */ -class Mars extends \PhpGedcom\Record\Fam\Even -{ -} diff --git a/library/PhpGedcom/Record/Fam/Slgs.php b/library/PhpGedcom/Record/Fam/Slgs.php deleted file mode 100644 index c2c6cc54..00000000 --- a/library/PhpGedcom/Record/Fam/Slgs.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Fam; - -use \PhpGedcom\Record\Sourceable; -use \PhpGedcom\Record\Noteable; - -/** - * - */ -class Slgs extends \PhpGedcom\Record implements Sourceable, Noteable -{ - protected $_stat; - protected $_date; - protected $_plac; - protected $_temp; - - /** - * - */ - protected $_sour = array(); - - /** - * - */ - protected $_note = array(); - - /** - * - */ - public function addSour(\PhpGedcom\Record\SourRef $sour) - { - $this->_sour[] = $sour; - } - - /** - * - */ - public function addNote(\PhpGedcom\Record\NoteRef $note) - { - $this->_note[] = $note; - } -} diff --git a/library/PhpGedcom/Record/Head.php b/library/PhpGedcom/Record/Head.php deleted file mode 100644 index a21bb7e3..00000000 --- a/library/PhpGedcom/Record/Head.php +++ /dev/null @@ -1,299 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Stores the data from the HEAD section of a GEDCOM 5.5 file. - */ -class Head extends Record -{ - /** - * @var Head\Sour - */ - protected $sour = null; - - /** - * @var string - */ - protected $dest = null; - - /** - * @var Head\Date - */ - protected $date = null; - - /** - * @var string - */ - protected $subm = null; - - /** - * @var string - */ - protected $subn = null; - - /** - * @var string - */ - protected $file = null; - - /** - * @var string - */ - protected $copr = null; - - /** - * @var Head\Gedc - */ - protected $gedc = null; - - /** - * @var Head\Char - */ - protected $char = null; - - /** - * @var string - */ - protected $lang = null; - - /** - * @var Head\Plac - */ - protected $plac = null; - - /** - * @var string - */ - protected $note = null; - - /** - * @param \PhpGedcom\Record\Head\Sour $sour - * @return Head - */ - public function setSour(Head\Sour $sour) - { - $this->sour = $sour; - return $this; - } - - /** - * @return \PhpGedcom\Record\Head\Sour - */ - public function getSour() - { - return $this->sour; - } - - /** - * @param \PhpGedcom\Record\Head\Date $date - * @return Head - */ - public function setDate(Head\Date $date) - { - $this->date = $date; - return $this; - } - - /** - * @return \PhpGedcom\Record\Head\Date - */ - public function getDate() - { - return $this->date; - } - - /** - * @param \PhpGedcom\Record\Head\Gedc $gedc - * @return Head - */ - public function setGedc(Head\Gedc $gedc) - { - $this->gedc = $gedc; - return $this; - } - - /** - * @return \PhpGedcom\Record\Head\Gedc - */ - public function getGedc() - { - return $this->gedc; - } - - /** - * @param \PhpGedcom\Record\Head\Char $char - * @return Head - */ - public function setChar(Head\Char $char) - { - $this->char = $char; - return $this; - } - - /** - * @return \PhpGedcom\Record\Head\Char - */ - public function getChar() - { - return $this->char; - } - - /** - * @param \PhpGedcom\Record\Head\Plac $plac - * @return Head - */ - public function setPlac(Head\Plac $plac) - { - $this->plac = $plac; - return $this; - } - - /** - * @return \PhpGedcom\Record\Head\Plac - */ - public function getPlac() - { - return $this->plac; - } - - /** - * @param string $subm - * @return Head - */ - public function setSubm($subm) - { - $this->subm = $subm; - return $this; - } - - /** - * @return string - */ - public function getSubm() - { - return $this->subm; - } - - /** - * @param string $subn - * @return Head - */ - public function setSubn($subn) - { - $this->subn = $subn; - return $this; - } - - /** - * @return string - */ - public function getSubn() - { - return $this->subn; - } - - /** - * @param string $lang - * @return Head - */ - public function setLang($lang) - { - $this->lang = $lang; - return $this; - } - - /** - * @return string - */ - public function getLang() - { - return $this->lang; - } - - /** - * @param string $file - * @return Head - */ - public function setFile($file) - { - $this->file = $file; - return $this; - } - - /** - * @return string - */ - public function getFile() - { - return $this->file; - } - - /** - * @param string $dest - * @return Head - */ - public function setDest($dest) - { - $this->dest = $dest; - return $this; - } - - /** - * @return string - */ - public function getDest() - { - return $this->dest; - } - - /** - * @param string $copr - * @return Head - */ - public function setCopr($copr) - { - $this->copr = $copr; - return $this; - } - - /** - * @return string - */ - public function getCopr() - { - return $this->copr; - } - - /** - * @param string $note - * @return Head - */ - public function setNote($note) - { - $this->note = $note; - return $this; - } - - /** - * @return string - */ - public function getNote() - { - return $this->note; - } -} diff --git a/library/PhpGedcom/Record/Head/Char.php b/library/PhpGedcom/Record/Head/Char.php deleted file mode 100644 index 483f941e..00000000 --- a/library/PhpGedcom/Record/Head/Char.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ -namespace PhpGedcom\Record\Head; - -/** - * - */ -class Char extends \PhpGedcom\Record -{ - protected $_char = null; - protected $_vers = null; -} diff --git a/library/PhpGedcom/Record/Head/Date.php b/library/PhpGedcom/Record/Head/Date.php deleted file mode 100644 index ff43532c..00000000 --- a/library/PhpGedcom/Record/Head/Date.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Head; - -/** - * - */ -class Date extends \PhpGedcom\Record -{ - protected $_date = null; - protected $_time = null; -} diff --git a/library/PhpGedcom/Record/Head/Gedc.php b/library/PhpGedcom/Record/Head/Gedc.php deleted file mode 100644 index 14a6dd0b..00000000 --- a/library/PhpGedcom/Record/Head/Gedc.php +++ /dev/null @@ -1,31 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Head; - -/** - * - */ -class Gedc extends \PhpGedcom\Record -{ - /** - * - */ - protected $_vers = null; - - /** - * - */ - protected $_form = null; -} diff --git a/library/PhpGedcom/Record/Head/Plac.php b/library/PhpGedcom/Record/Head/Plac.php deleted file mode 100644 index 8f79eae2..00000000 --- a/library/PhpGedcom/Record/Head/Plac.php +++ /dev/null @@ -1,26 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Head; - -/** - * - */ -class Plac extends \PhpGedcom\Record -{ - /** - * - */ - protected $_form = null; -} diff --git a/library/PhpGedcom/Record/Head/Sour.php b/library/PhpGedcom/Record/Head/Sour.php deleted file mode 100644 index de5acc6f..00000000 --- a/library/PhpGedcom/Record/Head/Sour.php +++ /dev/null @@ -1,82 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Head; - -/** - * - */ -class Sour extends \PhpGedcom\Record -{ - /** - * - */ - protected $_sour = null; - - /** - * - */ - protected $_vers = null; - - /** - * - */ - protected $_name = null; - - /** - * - */ - protected $_corp = null; - - /** - * - */ - protected $_data = null; - - /** - * - * @param Sour\Corp $corp - */ - public function setCorp(\PhpGedcom\Record\Head\Sour\Corp $corp) - { - $this->_corp = $corp; - } - - /** - * - * @return Sour\Corp - */ - public function getCorp() - { - return $this->_corp; - } - - /** - * - * @param \PhpGedcom\Record\Head\Sour\Data $data - */ - public function setData(\PhpGedcom\Record\Head\Sour\Data $data) - { - $this->_data = $data; - } - - /** - * - * @return \PhpGedcom\Record\Head\Sour\Data - */ - public function getData() - { - return $this->_data; - } -} diff --git a/library/PhpGedcom/Record/Head/Sour/Corp.php b/library/PhpGedcom/Record/Head/Sour/Corp.php deleted file mode 100644 index ceb4b9dd..00000000 --- a/library/PhpGedcom/Record/Head/Sour/Corp.php +++ /dev/null @@ -1,35 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Head\Sour; - -/** - * - */ -class Corp extends \PhpGedcom\Record -{ - protected $_corp = null; - protected $_addr = null; - - protected $_phon = array(); - - /** - * - * - */ - public function addPhon($phon) - { - $this->_phon[] = $phon; - } -} diff --git a/library/PhpGedcom/Record/Head/Sour/Data.php b/library/PhpGedcom/Record/Head/Sour/Data.php deleted file mode 100644 index 3247160e..00000000 --- a/library/PhpGedcom/Record/Head/Sour/Data.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ -namespace PhpGedcom\Record\Head\Sour; - -/** - * - */ -class Data extends \PhpGedcom\Record -{ - protected $_data = null; - protected $_date = null; - protected $_copr = null; -} diff --git a/library/PhpGedcom/Record/Indi.php b/library/PhpGedcom/Record/Indi.php deleted file mode 100644 index 5638ccdb..00000000 --- a/library/PhpGedcom/Record/Indi.php +++ /dev/null @@ -1,603 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; -use PhpGedcom\Record\NoteRef; -use PhpGedcom\Record\ObjeRef; -use PhpGedcom\Record\Refn; -use PhpGedcom\Record\SourRef; - -/** - * Class Indi - * @package PhpGedcom\Record - */ -class Indi extends Record implements Noteable, Objectable, Sourceable -{ - /** - * @var string - */ - protected $id; - - /** - * @var string - */ - protected $chan; - - /** - * @var array - */ - protected $attr = array(); - - /** - * @var array - */ - protected $even = array(); - - /** - * @var array - */ - protected $note = array(); - - /** - * @var array - */ - protected $obje = array(); - - /** - * @var array - */ - protected $sour = array(); - - /** - * @var array - */ - protected $name = array(); - - /** - * @var array - */ - protected $alia = array(); - - /** - * - */ - protected $sex; - - /** - * - */ - protected $rin; - - /** - * - */ - protected $resn; - - /** - * - */ - protected $rfn; - - /** - * - */ - protected $afn; - - /** - * @var array - */ - protected $fams = array(); - - /** - * @var array - */ - protected $famc = array(); - - /** - * @var array - */ - protected $asso = array(); - - /** - * @var array - */ - protected $subm = array(); - - /** - * @var array - */ - protected $anci = array(); - - /** - * @var array - */ - protected $desi = array(); - - /** - * @var array - */ - protected $refn = array(); - - /** - * @var Indi\Bapl - */ - protected $bapl; - - /** - * @var Indi\Conl - */ - protected $conl; - - /** - * @var Indi\Endl - */ - protected $endl; - - /** - * @var Indi\Slgc - */ - protected $slgc; - - /** - * @param string $id - * @return Indi - */ - public function setId($id) - { - $this->id = $id; - return $this; - } - - /** - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * @param Indi\Name $name - * @return Indi - */ - public function addName(Indi\Name $name) - { - $this->name[] = $name; - return $this; - } - - /** - * @return array - */ - public function getName() - { - return $this->name; - } - - /** - * @param Indi\Attr $attr - * @return Indi - */ - public function addAttr(Indi\Attr $attr) - { - $this->attr[] = $attr; - return $this; - } - - /** - * @return array - */ - public function getAttr() - { - return $this->attr; - } - - /** - * @param Indi\Even $even - * @return Indi - */ - public function addEven(Indi\Even $even) - { - $this->even[] = $even; - return $this; - } - - /** - * @return array - */ - public function getEven() - { - return $this->even; - } - - /** - * @param Indi\Asso $asso - * @return Indi - */ - public function addAsso(Indi\Asso $asso) - { - $this->asso[] = $asso; - return $this; - } - - /** - * @return array - */ - public function getAsso() - { - return $this->asso; - } - - /** - * @param Refn $ref - * @return Indi - */ - public function addRefn(Refn $ref) - { - $this->refn[] = $ref; - return $this; - } - - /** - * @return array - */ - public function getRefn() - { - return $this->refn; - } - - /** - * @param NoteRef $note - * @return Indi - */ - public function addNote(NoteRef $note) - { - $this->note[] = $note; - return $this; - } - - /** - * @return array - */ - public function getNote() - { - return $this->note; - } - - /** - * @param ObjeRef $obje - * @return Indi - */ - public function addObje(ObjeRef $obje) - { - $this->obje[] = $obje; - return $this; - } - - /** - * @return array - */ - public function getObje() - { - return $this->obje; - } - - /** - * @param SourRef $sour - * @return Indi - */ - public function addSour(SourRef $sour) - { - $this->sour[] = $sour; - return $this; - } - - /** - * @return array - */ - public function getSour() - { - return $this->sour; - } - - /** - * @param string $indi - * @return Indi - */ - public function addAlia($indi) - { - $this->alia[] = $indi; - return $this; - } - - /** - * @return array - */ - public function getAlia() - { - return $this->alia; - } - - /** - * @param Indi\Famc $famc - * @return Indi - */ - public function addFamc(Indi\Famc $famc) - { - $this->famc[] = $famc; - return $this; - } - - /** - * @return array - */ - public function getFamc() - { - return $this->famc; - } - - /** - * @param Indi\Fams $fams - * @return Indi - */ - public function addFams(Indi\Fams $fams) - { - $this->fams[] = $fams; - return $this; - } - - /** - * @return array - */ - public function getFams() - { - return $this->fams; - } - - /** - * @param string $subm - * @return Indi - */ - public function addAnci($subm) - { - $this->anci[] = $subm; - return $this; - } - - /** - * @return array - */ - public function getAnci() - { - return $this->anci; - } - - /** - * @param string $subm - * @return Indi - */ - public function addDesi($subm) - { - $this->desi[] = $subm; - return $this; - } - - /** - * @return array - */ - public function getDesi() - { - return $this->desi; - } - - /** - * @param string $subm - * @return Indi - */ - public function addSubm($subm) - { - $this->subm[] = $subm; - return $this; - } - - /** - * @return array - */ - public function getSubm() - { - return $this->subm; - } - - /** - * @param string $resn - * @return Indi - */ - public function setResn($resn) - { - $this->resn = $resn; - return $this; - } - - /** - * @return string - */ - public function getResn() - { - return $this->resn; - } - - /** - * @param string $sex - * @return Indi - */ - public function setSex($sex) - { - $this->sex = $sex; - return $this; - } - - /** - * @return string - */ - public function getSex() - { - return $this->sex; - } - - /** - * @param string $rfn - * @return Indi - */ - public function setRfn($rfn) - { - $this->rfn = $rfn; - return $this; - } - - /** - * @return string - */ - public function getRfn() - { - return $this->rfn; - } - - /** - * @param string $afn - * @return Indi - */ - public function setAfn($afn) - { - $this->afn = $afn; - return $this; - } - - /** - * @return string - */ - public function getAfn() - { - return $this->afn; - } - - /** - * @param string $chan - * @return Indi - */ - public function setChan($chan) - { - $this->chan = $chan; - return $this; - } - - /** - * @return string - */ - public function getChan() - { - return $this->chan; - } - - /** - * @param string $rin - * @return Indi - */ - public function setRin($rin) - { - $this->rin = $rin; - return $this; - } - - /** - * @return string - */ - public function getRin() - { - return $this->rin; - } - - /** - * @param Indi\Bapl $bapl - * @return Indi - */ - public function setBapl(Indi\Bapl $bapl) - { - $this->bapl = $bapl; - return $this; - } - - /** - * @return Indi\Bapl - */ - public function getBapl() - { - return $this->bapl; - } - - /** - * @param Indi\Conl $conl - * @return Indi - */ - public function setConl(Indi\Conl $conl) - { - $this->conl = $conl; - return $this; - } - - /** - * @return Indi\Conl - */ - public function getConl() - { - return $this->conl; - } - - /** - * @param Indi\Endl $endl - * @return Indi - */ - public function setEndl(Indi\Endl $endl) - { - $this->endl = $endl; - return $this; - } - - /** - * @return Indi\Endl - */ - public function getEndl() - { - return $this->endl; - } - - /** - * @param Indi\Slgc $slgc - * @return Indi - */ - public function setSlgc(Indi\Slgc $slgc) - { - $this->slgc = $slgc; - return $this; - } - - /** - * @return Indi\Slgc - */ - public function getSlgc() - { - return $this->slgc; - } -} diff --git a/library/PhpGedcom/Record/Indi/Adop.php b/library/PhpGedcom/Record/Indi/Adop.php deleted file mode 100644 index ccc6ade1..00000000 --- a/library/PhpGedcom/Record/Indi/Adop.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Adop extends \PhpGedcom\Record\Indi\Even -{ - protected $_adop = null; - protected $_famc = null; -} diff --git a/library/PhpGedcom/Record/Indi/Asso.php b/library/PhpGedcom/Record/Indi/Asso.php deleted file mode 100644 index 699b5ea3..00000000 --- a/library/PhpGedcom/Record/Indi/Asso.php +++ /dev/null @@ -1,53 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -use \PhpGedcom\Record\Sourceable; -use \PhpGedcom\Record\Noteable; - -/** - * - */ -class Asso extends \PhpGedcom\Record implements Sourceable, Noteable -{ - protected $_indi = null; - protected $_rela = null; - - /** - * - */ - protected $_note = array(); - - /** - * - */ - protected $_sour = array(); - - /** - * - */ - public function addNote(\PhpGedcom\Record\NoteRef $note) - { - $this->_note[] = $note; - } - - /** - * - */ - public function addSour(\PhpGedcom\Record\SourRef $sour) - { - $this->_sour[] = $sour; - } -} diff --git a/library/PhpGedcom/Record/Indi/Attr.php b/library/PhpGedcom/Record/Indi/Attr.php deleted file mode 100644 index 12654de9..00000000 --- a/library/PhpGedcom/Record/Indi/Attr.php +++ /dev/null @@ -1,67 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -use \PhpGedcom\Record\Sourceable; -use \PhpGedcom\Record\Noteable; -use \PhpGedcom\Record\Objectable; - -/** - * - */ -class Attr extends \PhpGedcom\Record\Indi\Even implements Sourceable, Noteable, Objectable -{ - protected $type = null; - protected $_attr = null; - - /** - * - */ - protected $sour = array(); - - /** - * - */ - protected $note = array(); - - /** - * - */ - protected $obje = array(); - - /** - * - */ - public function addSour(\PhpGedcom\Record\SourRef $sour) - { - $this->sour[] = $sour; - } - - /** - * - */ - public function addNote(\PhpGedcom\Record\NoteRef $note) - { - $this->note[] = $note; - } - - /** - * - */ - public function addObje(\PhpGedcom\Record\ObjeRef $obje) - { - $this->obje[] = $obje; - } -} diff --git a/library/PhpGedcom/Record/Indi/Bapl.php b/library/PhpGedcom/Record/Indi/Bapl.php deleted file mode 100644 index 32d17b71..00000000 --- a/library/PhpGedcom/Record/Indi/Bapl.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Bapl extends Lds -{ -} diff --git a/library/PhpGedcom/Record/Indi/Bapm.php b/library/PhpGedcom/Record/Indi/Bapm.php deleted file mode 100644 index 54db28e1..00000000 --- a/library/PhpGedcom/Record/Indi/Bapm.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Bapm extends \PhpGedcom\Record\Indi\Even -{ -} diff --git a/library/PhpGedcom/Record/Indi/Barm.php b/library/PhpGedcom/Record/Indi/Barm.php deleted file mode 100644 index e1a5591b..00000000 --- a/library/PhpGedcom/Record/Indi/Barm.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Barm extends \PhpGedcom\Record\Indi\Even -{ -} diff --git a/library/PhpGedcom/Record/Indi/Basm.php b/library/PhpGedcom/Record/Indi/Basm.php deleted file mode 100644 index a108f07f..00000000 --- a/library/PhpGedcom/Record/Indi/Basm.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Basm extends \PhpGedcom\Record\Indi\Even -{ -} diff --git a/library/PhpGedcom/Record/Indi/Birt.php b/library/PhpGedcom/Record/Indi/Birt.php deleted file mode 100644 index ced0b649..00000000 --- a/library/PhpGedcom/Record/Indi/Birt.php +++ /dev/null @@ -1,47 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -use PhpGedcom\Record\Indi\Even; - -/** - * Class Birt - * @package PhpGedcom\Record\Indi - */ -class Birt extends Even -{ - /** - * @var string - */ - protected $famc; - - /** - * @param string $famc - * @return Birt - */ - public function setFamc($famc) - { - $this->famc = $famc; - return $this; - } - - /** - * @return string - */ - public function getFamc() - { - return $this->famc; - } -} diff --git a/library/PhpGedcom/Record/Indi/Bles.php b/library/PhpGedcom/Record/Indi/Bles.php deleted file mode 100644 index 326b47e0..00000000 --- a/library/PhpGedcom/Record/Indi/Bles.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Bles extends \PhpGedcom\Record\Indi\Even -{ -} diff --git a/library/PhpGedcom/Record/Indi/Buri.php b/library/PhpGedcom/Record/Indi/Buri.php deleted file mode 100644 index bb4e2e4c..00000000 --- a/library/PhpGedcom/Record/Indi/Buri.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Buri extends \PhpGedcom\Record\Indi\Even -{ -} diff --git a/library/PhpGedcom/Record/Indi/Cast.php b/library/PhpGedcom/Record/Indi/Cast.php deleted file mode 100644 index bd699f42..00000000 --- a/library/PhpGedcom/Record/Indi/Cast.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Cast extends \PhpGedcom\Record\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Record/Indi/Cens.php b/library/PhpGedcom/Record/Indi/Cens.php deleted file mode 100644 index 2645250d..00000000 --- a/library/PhpGedcom/Record/Indi/Cens.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Cens extends \PhpGedcom\Record\Indi\Even -{ -} diff --git a/library/PhpGedcom/Record/Indi/Chr.php b/library/PhpGedcom/Record/Indi/Chr.php deleted file mode 100644 index 297965f1..00000000 --- a/library/PhpGedcom/Record/Indi/Chr.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Chr extends \PhpGedcom\Record\Indi\Even -{ - protected $_famc = null; -} diff --git a/library/PhpGedcom/Record/Indi/Chra.php b/library/PhpGedcom/Record/Indi/Chra.php deleted file mode 100644 index 27c5801b..00000000 --- a/library/PhpGedcom/Record/Indi/Chra.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Chra extends \PhpGedcom\Record\Indi\Even -{ -} diff --git a/library/PhpGedcom/Record/Indi/Conf.php b/library/PhpGedcom/Record/Indi/Conf.php deleted file mode 100644 index 92e8de1e..00000000 --- a/library/PhpGedcom/Record/Indi/Conf.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Conf extends \PhpGedcom\Record\Indi\Even -{ -} diff --git a/library/PhpGedcom/Record/Indi/Conl.php b/library/PhpGedcom/Record/Indi/Conl.php deleted file mode 100644 index 7489a13a..00000000 --- a/library/PhpGedcom/Record/Indi/Conl.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Conl extends Lds -{ -} diff --git a/library/PhpGedcom/Record/Indi/Crem.php b/library/PhpGedcom/Record/Indi/Crem.php deleted file mode 100644 index 82fe24bc..00000000 --- a/library/PhpGedcom/Record/Indi/Crem.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Crem extends \PhpGedcom\Record\Indi\Even -{ -} diff --git a/library/PhpGedcom/Record/Indi/Deat.php b/library/PhpGedcom/Record/Indi/Deat.php deleted file mode 100644 index 52cdf269..00000000 --- a/library/PhpGedcom/Record/Indi/Deat.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Deat extends \PhpGedcom\Record\Indi\Even -{ -} diff --git a/library/PhpGedcom/Record/Indi/Dscr.php b/library/PhpGedcom/Record/Indi/Dscr.php deleted file mode 100644 index a0352b10..00000000 --- a/library/PhpGedcom/Record/Indi/Dscr.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Dscr extends \PhpGedcom\Record\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Record/Indi/Educ.php b/library/PhpGedcom/Record/Indi/Educ.php deleted file mode 100644 index e4de5efa..00000000 --- a/library/PhpGedcom/Record/Indi/Educ.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Educ extends \PhpGedcom\Record\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Record/Indi/Emig.php b/library/PhpGedcom/Record/Indi/Emig.php deleted file mode 100644 index 1405bfb2..00000000 --- a/library/PhpGedcom/Record/Indi/Emig.php +++ /dev/null @@ -1,21 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Emig extends \PhpGedcom\Record\Indi\Even -{ -} diff --git a/library/PhpGedcom/Record/Indi/Endl.php b/library/PhpGedcom/Record/Indi/Endl.php deleted file mode 100644 index 6d39e10b..00000000 --- a/library/PhpGedcom/Record/Indi/Endl.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Endl extends Lds -{ -} diff --git a/library/PhpGedcom/Record/Indi/Even.php b/library/PhpGedcom/Record/Indi/Even.php deleted file mode 100644 index 86cffaad..00000000 --- a/library/PhpGedcom/Record/Indi/Even.php +++ /dev/null @@ -1,323 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -use \PhpGedcom\Record; - -/** - * Class Even - * @package PhpGedcom\Record\Indi - */ -class Even extends Record implements Record\Objectable, Record\Sourceable, Record\Noteable -{ - /** - * @var string - */ - protected $type; - - /** - * @var string - */ - protected $date; - - /** - * @var Even\Plac - */ - protected $plac; - - /** - * @var string - */ - protected $caus; - - /** - * @var string - */ - protected $age; - - /** - * @var Record\Addr - */ - protected $addr; - - /** - * @var array - */ - protected $phon = array(); - - /** - * @var string - */ - protected $agnc; - - /** - * @var array - */ - public $ref = array(); - - /** - * @var array - */ - protected $obje = array(); - - /** - * @var array - */ - protected $sour = array(); - - /** - * @var array - */ - protected $note = array(); - - /** - * @var Record\Chan - */ - protected $chan; - - /** - * @return array - */ - public function getPhon() - { - return $this->phon; - } - - /** - * @param Record\Phon $phon - * @return Even - */ - public function addPhon(Record\Phon $phon) - { - $this->phon[] = $phon; - return $this; - } - - /** - * @return array - */ - public function getObje() - { - return $this->obje; - } - - /** - * @param Record\ObjeRef $obje - * @return Even - */ - public function addObje(Record\ObjeRef $obje) - { - $this->obje[] = $obje; - return $this; - } - - /** - * @return array - */ - public function getSour() - { - return $this->sour; - } - - /** - * @param Record\SourRef $sour - * @return Even - */ - public function addSour(Record\SourRef $sour) - { - $this->sour[] = $sour; - return $this; - } - - /** - * @return array - */ - public function getNote() - { - return $this->note; - } - - /** - * @param Record\NoteRef $note - * @return Even - */ - public function addNote(Record\NoteRef $note) - { - $this->note[] = $note; - return $this; - } - - /** - * @param \PhpGedcom\Record\Addr $addr - * @return Even - */ - public function setAddr(Record\Addr $addr) - { - $this->addr = $addr; - return $this; - } - - /** - * @return \PhpGedcom\Record\Addr - */ - public function getAddr() - { - return $this->addr; - } - - /** - * @param string $age - * @return Even - */ - public function setAge($age) - { - $this->age = $age; - return $this; - } - - /** - * @return string - */ - public function getAge() - { - return $this->age; - } - - /** - * @param string $agnc - * @return Even - */ - public function setAgnc($agnc) - { - $this->agnc = $agnc; - return $this; - } - - /** - * @return string - */ - public function getAgnc() - { - return $this->agnc; - } - - /** - * @param string $caus - * @return Even - */ - public function setCaus($caus) - { - $this->caus = $caus; - return $this; - } - - /** - * @return string - */ - public function getCaus() - { - return $this->caus; - } - - /** - * @param string $date - * @return Even - */ - public function setDate($date) - { - $this->date = $date; - return $this; - } - - /** - * @return string - */ - public function getDate() - { - return $this->date; - } - - /** - * @param \PhpGedcom\Record\Indi\Even\Plac $plac - * @return Even - */ - public function setPlac(Record\Indi\Even\Plac $plac) - { - $this->plac = $plac; - return $this; - } - - /** - * @return \PhpGedcom\Record\Indi\Even\Plac - */ - public function getPlac() - { - return $this->plac; - } - - /** - * @param string $type - * @return Even - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * @param array $ref - * @return Even - */ - public function setRef($ref) - { - $this->ref = $ref; - return $this; - } - - /** - * @return array - */ - public function getRef() - { - return $this->ref; - } - - /** - * @return Record\Chan - */ - public function getChan() - { - return $this->chan; - } - - /** - * @param Record\Chan $chan - * @return $this - */ - public function setChan($chan) - { - $this->chan = $chan; - return $this; - } -} diff --git a/library/PhpGedcom/Record/Indi/Even/Plac.php b/library/PhpGedcom/Record/Indi/Even/Plac.php deleted file mode 100644 index 95115c44..00000000 --- a/library/PhpGedcom/Record/Indi/Even/Plac.php +++ /dev/null @@ -1,116 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi\Even; - -use \PhpGedcom\Record; - -/** - * Class Plac - * @package PhpGedcom\Record\Indi\Even - */ -class Plac extends Record implements Record\Noteable, Record\Sourceable -{ - /** - * @var string - */ - protected $plac; - - /** - * @var string - */ - protected $form; - - /** - * @var array - */ - protected $note = array(); - - /** - * @var array - */ - protected $sour = array(); - - /** - * @param string $form - * @return Plac - */ - public function setForm($form) - { - $this->form = $form; - return $this; - } - - /** - * @return string - */ - public function getForm() - { - return $this->form; - } - - /** - * @param string $plac - * @return Plac - */ - public function setPlac($plac) - { - $this->plac = $plac; - return $this; - } - - /** - * @return string - */ - public function getPlac() - { - return $this->plac; - } - - /** - * @return array - */ - public function getNote() - { - return $this->note; - } - - /** - * @param Record\NoteRef $note - * @return Plac - */ - public function addNote(Record\NoteRef $note) - { - $this->note[] = $note; - return $this; - } - - /** - * @return array - */ - public function getSour() - { - return $this->sour; - } - - /** - * @param Record\SourRef $sour - * @return Plac - */ - public function addSour(Record\SourRef $sour) - { - $this->sour[] = $sour; - return $this; - } -} diff --git a/library/PhpGedcom/Record/Indi/Famc.php b/library/PhpGedcom/Record/Indi/Famc.php deleted file mode 100644 index 4b0bad92..00000000 --- a/library/PhpGedcom/Record/Indi/Famc.php +++ /dev/null @@ -1,39 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -use \PhpGedcom\Record\Noteable; - -/** - * - */ -class Famc extends \PhpGedcom\Record implements Noteable -{ - protected $_famc = null; - protected $_pedi = null; - - /** - * - */ - protected $_note = array(); - - /** - * - */ - public function addNote(\PhpGedcom\Record\NoteRef $note) - { - $this->_note[] = $note; - } -} diff --git a/library/PhpGedcom/Record/Indi/Fams.php b/library/PhpGedcom/Record/Indi/Fams.php deleted file mode 100644 index f21536ff..00000000 --- a/library/PhpGedcom/Record/Indi/Fams.php +++ /dev/null @@ -1,41 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -use \PhpGedcom\Record\Noteable; - -/** - * - */ -class Fams extends \PhpGedcom\Record implements Noteable -{ - /** - * - */ - protected $_fams = null; - - /** - * - */ - protected $_note = array(); - - /** - * - */ - public function addNote(\PhpGedcom\Record\NoteRef $note) - { - $this->_note[] = $note; - } -} diff --git a/library/PhpGedcom/Record/Indi/Fcom.php b/library/PhpGedcom/Record/Indi/Fcom.php deleted file mode 100644 index bb7da01f..00000000 --- a/library/PhpGedcom/Record/Indi/Fcom.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Fcom extends \PhpGedcom\Record\Indi\Even -{ -} diff --git a/library/PhpGedcom/Record/Indi/Grad.php b/library/PhpGedcom/Record/Indi/Grad.php deleted file mode 100644 index ae5baad7..00000000 --- a/library/PhpGedcom/Record/Indi/Grad.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Grad extends \PhpGedcom\Record\Indi\Even -{ -} diff --git a/library/PhpGedcom/Record/Indi/Idno.php b/library/PhpGedcom/Record/Indi/Idno.php deleted file mode 100644 index b9395a36..00000000 --- a/library/PhpGedcom/Record/Indi/Idno.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Idno extends \PhpGedcom\Record\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Record/Indi/Immi.php b/library/PhpGedcom/Record/Indi/Immi.php deleted file mode 100644 index 7312fece..00000000 --- a/library/PhpGedcom/Record/Indi/Immi.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Immi extends \PhpGedcom\Record\Indi\Even -{ -} diff --git a/library/PhpGedcom/Record/Indi/Lds.php b/library/PhpGedcom/Record/Indi/Lds.php deleted file mode 100644 index d574c95e..00000000 --- a/library/PhpGedcom/Record/Indi/Lds.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -use \PhpGedcom\Record\Sourceable; -use \PhpGedcom\Record\Noteable; - -/** - * - */ -abstract class Lds extends \PhpGedcom\Record implements Sourceable, Noteable -{ - protected $_stat; - protected $_date; - protected $_plac; - protected $_temp; - - /** - * - */ - protected $_sour = array(); - - /** - * - */ - protected $_note = array(); - - /** - * - */ - public function addSour(\PhpGedcom\Record\SourRef $sour) - { - $this->_sour[] = $sour; - } - - /** - * - */ - public function addNote(\PhpGedcom\Record\NoteRef $note) - { - $this->_note[] = $note; - } -} diff --git a/library/PhpGedcom/Record/Indi/Name.php b/library/PhpGedcom/Record/Indi/Name.php deleted file mode 100644 index 42861a4c..00000000 --- a/library/PhpGedcom/Record/Indi/Name.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Name extends \PhpGedcom\Record implements \PhpGedcom\Record\Sourceable -{ - protected $_name = null; - protected $_npfx = null; - protected $_givn = null; - protected $_nick = null; - protected $_spfx = null; - protected $_surn = null; - protected $_nsfx = null; - - /** - * - */ - protected $_note = array(); - - /** - * - */ - protected $_sour = array(); - - /** - * - */ - public function addSour(\PhpGedcom\Record\SourRef $sour) - { - $this->_sour[] = $sour; - } - - /** - * - */ - public function addNote(\PhpGedcom\Record\NoteRef $note) - { - $this->_note[] = $note; - } -} diff --git a/library/PhpGedcom/Record/Indi/Nati.php b/library/PhpGedcom/Record/Indi/Nati.php deleted file mode 100644 index d7dfd62b..00000000 --- a/library/PhpGedcom/Record/Indi/Nati.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Nati extends \PhpGedcom\Record\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Record/Indi/Natu.php b/library/PhpGedcom/Record/Indi/Natu.php deleted file mode 100644 index 06e85df4..00000000 --- a/library/PhpGedcom/Record/Indi/Natu.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Natu extends \PhpGedcom\Record\Indi\Even -{ -} diff --git a/library/PhpGedcom/Record/Indi/Nchi.php b/library/PhpGedcom/Record/Indi/Nchi.php deleted file mode 100644 index 157fb6b3..00000000 --- a/library/PhpGedcom/Record/Indi/Nchi.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Nchi extends \PhpGedcom\Record\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Record/Indi/Nmr.php b/library/PhpGedcom/Record/Indi/Nmr.php deleted file mode 100644 index 50ac5022..00000000 --- a/library/PhpGedcom/Record/Indi/Nmr.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Nmr extends \PhpGedcom\Record\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Record/Indi/Note.php b/library/PhpGedcom/Record/Indi/Note.php deleted file mode 100644 index 7d43efca..00000000 --- a/library/PhpGedcom/Record/Indi/Note.php +++ /dev/null @@ -1,18 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ -namespace PhpGedcom\Record\Indi; - -class Note extends \PhpGedcom\Record\NoteRefAbstract -{ -} diff --git a/library/PhpGedcom/Record/Indi/Occu.php b/library/PhpGedcom/Record/Indi/Occu.php deleted file mode 100644 index 3a1e4ced..00000000 --- a/library/PhpGedcom/Record/Indi/Occu.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Occu extends \PhpGedcom\Record\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Record/Indi/Ordn.php b/library/PhpGedcom/Record/Indi/Ordn.php deleted file mode 100644 index 1f452979..00000000 --- a/library/PhpGedcom/Record/Indi/Ordn.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Ordn extends \PhpGedcom\Record\Indi\Even -{ -} diff --git a/library/PhpGedcom/Record/Indi/Prob.php b/library/PhpGedcom/Record/Indi/Prob.php deleted file mode 100644 index 4484c429..00000000 --- a/library/PhpGedcom/Record/Indi/Prob.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Prob extends \PhpGedcom\Record\Indi\Even -{ -} diff --git a/library/PhpGedcom/Record/Indi/Prop.php b/library/PhpGedcom/Record/Indi/Prop.php deleted file mode 100644 index fa929767..00000000 --- a/library/PhpGedcom/Record/Indi/Prop.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Prop extends \PhpGedcom\Record\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Record/Indi/Reli.php b/library/PhpGedcom/Record/Indi/Reli.php deleted file mode 100644 index 0c2d27f2..00000000 --- a/library/PhpGedcom/Record/Indi/Reli.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Reli extends \PhpGedcom\Record\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Record/Indi/Resi.php b/library/PhpGedcom/Record/Indi/Resi.php deleted file mode 100644 index f2848473..00000000 --- a/library/PhpGedcom/Record/Indi/Resi.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Resi extends \PhpGedcom\Record\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Record/Indi/Reti.php b/library/PhpGedcom/Record/Indi/Reti.php deleted file mode 100644 index 321a4c8f..00000000 --- a/library/PhpGedcom/Record/Indi/Reti.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Reti extends \PhpGedcom\Record\Indi\Even -{ -} diff --git a/library/PhpGedcom/Record/Indi/Slgc.php b/library/PhpGedcom/Record/Indi/Slgc.php deleted file mode 100644 index 088bcb96..00000000 --- a/library/PhpGedcom/Record/Indi/Slgc.php +++ /dev/null @@ -1,26 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Slgc extends Lds -{ - /** - * - */ - protected $_famc = null; -} diff --git a/library/PhpGedcom/Record/Indi/Ssn.php b/library/PhpGedcom/Record/Indi/Ssn.php deleted file mode 100644 index 52b35b8f..00000000 --- a/library/PhpGedcom/Record/Indi/Ssn.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Ssn extends \PhpGedcom\Record\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Record/Indi/Titl.php b/library/PhpGedcom/Record/Indi/Titl.php deleted file mode 100644 index 901141db..00000000 --- a/library/PhpGedcom/Record/Indi/Titl.php +++ /dev/null @@ -1,21 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Titl extends \PhpGedcom\Record\Indi\Attr -{ -} diff --git a/library/PhpGedcom/Record/Indi/Will.php b/library/PhpGedcom/Record/Indi/Will.php deleted file mode 100644 index 61a1f1a9..00000000 --- a/library/PhpGedcom/Record/Indi/Will.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * - */ -class Will extends \PhpGedcom\Record\Indi\Even -{ -} diff --git a/library/PhpGedcom/Record/Note.php b/library/PhpGedcom/Record/Note.php deleted file mode 100644 index f1469c19..00000000 --- a/library/PhpGedcom/Record/Note.php +++ /dev/null @@ -1,51 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -/** - * - * - */ -class Note extends \PhpGedcom\Record implements Sourceable -{ - protected $_id = null; - protected $_chan = null; - - protected $_note = null; - protected $_even = null; - protected $_refn = array(); - protected $_rin = null; - - /** - * - */ - protected $_sour = array(); - - /** - * - */ - public function addRefn(\PhpGedcom\Record\Refn $refn) - { - $this->_refn[] = $refn; - } - - /** - * - */ - public function addSour(\PhpGedcom\Record\SourRef $sour) - { - $this->_sour[] = $sour; - } -} diff --git a/library/PhpGedcom/Record/NoteRef.php b/library/PhpGedcom/Record/NoteRef.php deleted file mode 100644 index 3300cf91..00000000 --- a/library/PhpGedcom/Record/NoteRef.php +++ /dev/null @@ -1,62 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use \PhpGedcom\Record\Sourceable; - -/** - * - */ -class NoteRef extends \PhpGedcom\Record implements Sourceable -{ - /** - * - */ - protected $_isRef = false; - - /** - * - */ - protected $_note = ''; - - /** - * - */ - protected $_sour = array(); - - /** - * - */ - public function setIsReference($isReference = true) - { - $this->_isRef = $isReference; - } - - /** - * - */ - public function getIsReference() - { - return $this->_isRef; - } - - /** - * - */ - public function addSour(\PhpGedcom\Record\SourRef $sour) - { - $this->_sour[] = $sour; - } -} diff --git a/library/PhpGedcom/Record/Noteable.php b/library/PhpGedcom/Record/Noteable.php deleted file mode 100644 index 2eb896f2..00000000 --- a/library/PhpGedcom/Record/Noteable.php +++ /dev/null @@ -1,26 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -/** - * - */ -interface Noteable -{ - /** - * - */ - public function addNote(\PhpGedcom\Record\NoteRef $note); -} diff --git a/library/PhpGedcom/Record/Obje.php b/library/PhpGedcom/Record/Obje.php deleted file mode 100644 index 03e783be..00000000 --- a/library/PhpGedcom/Record/Obje.php +++ /dev/null @@ -1,52 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -/** - * - */ -class Obje extends \PhpGedcom\Record implements Noteable -{ - protected $_id = null; - - protected $_form = null; - protected $_titl = null; - protected $_blob = null; - protected $_rin = null; - protected $_chan = null; - - protected $_refn = array(); - - /** - * - */ - protected $_note = array(); - - /** - * - */ - public function addRefn(\PhpGedcom\Record\Refn $refn) - { - $this->_refn[] = $refn; - } - - /** - * - */ - public function addNote(\PhpGedcom\Record\NoteRef $note) - { - $this->_note[] = $note; - } -} diff --git a/library/PhpGedcom/Record/ObjeRef.php b/library/PhpGedcom/Record/ObjeRef.php deleted file mode 100644 index e7cdcc16..00000000 --- a/library/PhpGedcom/Record/ObjeRef.php +++ /dev/null @@ -1,75 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -/** - * - */ -class ObjeRef extends \PhpGedcom\Record implements Noteable -{ - /** - * - */ - protected $_isRef = false; - - /** - * - */ - protected $_obje = null; - - /** - * - */ - protected $_form = null; - - /** - * - */ - protected $_titl = null; - - /** - * - */ - protected $_file = null; - - /** - * - */ - protected $_note = array(); - - /** - * - */ - public function setIsReference($isReference = true) - { - $this->_isRef = $isReference; - } - - /** - * - */ - public function getIsReference() - { - return $this->_isRef; - } - - /** - * - */ - public function addNote(\PhpGedcom\Record\NoteRef $note) - { - $this->_note[] = $note; - } -} diff --git a/library/PhpGedcom/Record/Objectable.php b/library/PhpGedcom/Record/Objectable.php deleted file mode 100644 index 50c278f5..00000000 --- a/library/PhpGedcom/Record/Objectable.php +++ /dev/null @@ -1,26 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -/** - * - */ -interface Objectable -{ - /** - * - */ - public function addObje(\PhpGedcom\Record\ObjeRef $obje); -} diff --git a/library/PhpGedcom/Record/Phon.php b/library/PhpGedcom/Record/Phon.php deleted file mode 100644 index 7b48cf3e..00000000 --- a/library/PhpGedcom/Record/Phon.php +++ /dev/null @@ -1,47 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Phon - * @package PhpGedcom\Record - */ -class Phon extends Record -{ - /** - * @var string - */ - protected $phon = null; - - /** - * @param $phon - * @return Phon - */ - public function setPhon($phon) - { - $this->phon = $phon; - return $this; - } - - /** - * @return null|string - */ - public function getPhon() - { - return $this->phon; - } -} diff --git a/library/PhpGedcom/Record/Refn.php b/library/PhpGedcom/Record/Refn.php deleted file mode 100644 index 80cecc9e..00000000 --- a/library/PhpGedcom/Record/Refn.php +++ /dev/null @@ -1,70 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Refn - * @package PhpGedcom\Record - */ -class Refn extends Record -{ - /** - * @var string - */ - protected $refn; - - /** - * @var string - */ - protected $type; - - /** - * @param string $refn - * @return Refn - */ - public function setRefn($refn) - { - $this->refn = $refn; - return $this; - } - - /** - * @return string - */ - public function getRefn() - { - return $this->refn; - } - - /** - * @param string $type - * @return Refn - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->type; - } -} diff --git a/library/PhpGedcom/Record/Repo.php b/library/PhpGedcom/Record/Repo.php deleted file mode 100644 index 653d7108..00000000 --- a/library/PhpGedcom/Record/Repo.php +++ /dev/null @@ -1,208 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Repo - * @package PhpGedcom\Record - */ -class Repo extends Record implements Noteable -{ - /** - * @var string - */ - protected $repo; - - /** - * @var string - */ - protected $name; - - /** - * @var Addr - */ - protected $addr; - - /** - * @var string - */ - protected $rin; - - /** - * @var Chan - */ - protected $chan; - - /** - * @var array - */ - protected $phon = array(); - - /** - * @var array - */ - protected $refn = array(); - - /** - * @var array - */ - protected $note = array(); - - /** - * @param Phon $phon - * @return Repo - */ - public function addPhon(Phon $phon) - { - $this->phon[] = $phon; - return $this; - } - - /** - * @return array - */ - public function getPhon() - { - return $this->phon; - } - - /** - * @param Refn $refn - * @return Repo - */ - public function addRefn(Refn $refn) - { - $this->refn[] = $refn; - return $this; - } - - /** - * @return array - */ - public function getRefn() - { - return $this->refn; - } - - /** - * @param NoteRef $note - * @return Repo - */ - public function addNote(NoteRef $note) - { - $this->note[] = $note; - return $this; - } - - /** - * @return array - */ - public function getNote() - { - return $this->note; - } - - /** - * @param string $repo - * @return Repo - */ - public function setRepo($repo) - { - $this->repo = $repo; - return $this; - } - - /** - * @return string - */ - public function getRepo() - { - return $this->repo; - } - - /** - * @param string $name - * @return Repo - */ - public function setName($name) - { - $this->name = $name; - return $this; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param \PhpGedcom\Record\Addr $addr - * @return Repo - */ - public function setAddr($addr) - { - $this->addr = $addr; - return $this; - } - - /** - * @return \PhpGedcom\Record\Addr - */ - public function getAddr() - { - return $this->addr; - } - - /** - * @param string $rin - * @return Repo - */ - public function setRin($rin) - { - $this->rin = $rin; - return $this; - } - - /** - * @return string - */ - public function getRin() - { - return $this->rin; - } - - /** - * @param \PhpGedcom\Record\Chan $chan - * @return Repo - */ - public function setChan($chan) - { - $this->chan = $chan; - return $this; - } - - /** - * @return \PhpGedcom\Record\Chan - */ - public function getChan() - { - return $this->chan; - } -} diff --git a/library/PhpGedcom/Record/RepoRef.php b/library/PhpGedcom/Record/RepoRef.php deleted file mode 100644 index 762105ea..00000000 --- a/library/PhpGedcom/Record/RepoRef.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -/** - * - */ -class RepoRef extends \PhpGedcom\Record implements Noteable -{ - protected $_repo = null; - - protected $_caln = array(); - - /** - * - */ - protected $_note = array(); - - /** - * - */ - public function addNote(\PhpGedcom\Record\NoteRef $note) - { - $this->_note[] = $note; - } -} diff --git a/library/PhpGedcom/Record/Sour.php b/library/PhpGedcom/Record/Sour.php deleted file mode 100644 index ed9d2f8e..00000000 --- a/library/PhpGedcom/Record/Sour.php +++ /dev/null @@ -1,323 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Sour - * @package PhpGedcom\Record - */ -class Sour extends Record implements Noteable, Objectable -{ - /** - * @var string - */ - protected $sour; - - /** - * @var Chan - */ - protected $chan; - - /** - * @var string - */ - protected $titl; - - /** - * @var string - */ - protected $auth; - - /** - * @var string - */ - protected $data; - - /** - * @var string - */ - protected $text; - - /** - * @var string - */ - protected $publ; - - /** - * @var Repo - */ - protected $repo; - - /** - * @var string - */ - protected $abbr; - - /** - * @var string - */ - protected $rin; - - /** - * @var array - */ - protected $refn = array(); - - /** - * @var array - */ - protected $note = array(); - - /** - * @var array - */ - protected $obje = array(); - - /** - * @param string $sour - * @return Sour - */ - public function setSour($sour) - { - $this->sour = $sour; - return $this; - } - - /** - * @return string - */ - public function getSour() - { - return $this->sour; - } - - /** - * @param string $titl - * @return Sour - */ - public function setTitl($titl) - { - $this->titl = $titl; - return $this; - } - - /** - * @return string - */ - public function getTitl() - { - return $this->titl; - } - - /** - * @param string $abbr - * @return Sour - */ - public function setAbbr($abbr) - { - $this->abbr = $abbr; - return $this; - } - - /** - * @return string - */ - public function getAbbr() - { - return $this->abbr; - } - - /** - * @param string $auth - * @return Sour - */ - public function setAuth($auth) - { - $this->auth = $auth; - return $this; - } - - /** - * @return string - */ - public function getAuth() - { - return $this->auth; - } - - /** - * @param string $publ - * @return Sour - */ - public function setPubl($publ) - { - $this->publ = $publ; - return $this; - } - - /** - * @return string - */ - public function getPubl() - { - return $this->publ; - } - - /** - * @param \PhpGedcom\Record\Repo $repo - * @return Sour - */ - public function setRepo($repo) - { - $this->repo = $repo; - return $this; - } - - /** - * @return \PhpGedcom\Record\Repo - */ - public function getRepo() - { - return $this->repo; - } - - /** - * @param string $text - * @return Sour - */ - public function setText($text) - { - $this->text = $text; - return $this; - } - - /** - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * @param string $data - * @return Sour - */ - public function setData($data) - { - $this->data = $data; - return $this; - } - - /** - * @return string - */ - public function getData() - { - return $this->data; - } - - /** - * @param string $rin - * @return Sour - */ - public function setRin($rin) - { - $this->rin = $rin; - return $this; - } - - /** - * @return string - */ - public function getRin() - { - return $this->rin; - } - - /** - * @param \PhpGedcom\Record\Chan $chan - * @return Sour - */ - public function setChan($chan) - { - $this->chan = $chan; - return $this; - } - - /** - * @return \PhpGedcom\Record\Chan - */ - public function getChan() - { - return $this->chan; - } - - /** - * @param Refn $refn - * @return Sour - */ - public function addRefn(Refn $refn) - { - $this->refn[] = $refn; - return $this; - } - - /** - * @return array - */ - public function getRefn() - { - return $this->refn; - } - - /** - * @param NoteRef $note - * @return Sour - */ - public function addNote(NoteRef $note) - { - $this->note[] = $note; - return $this; - } - - /** - * @return array - */ - public function getNote() - { - return $this->note; - } - - /** - * @param ObjeRef $obje - * @return Sour - */ - public function addObje(ObjeRef $obje) - { - $this->obje[] = $obje; - return $this; - } - - /** - * @return array - */ - public function getObje() - { - return $this->obje; - } -} diff --git a/library/PhpGedcom/Record/Sour/Data.php b/library/PhpGedcom/Record/Sour/Data.php deleted file mode 100644 index de499345..00000000 --- a/library/PhpGedcom/Record/Sour/Data.php +++ /dev/null @@ -1,50 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Sour; - -use \PhpGedcom\Record\Noteable; - -/** - * - */ -class Data extends \PhpGedcom\Record implements Noteable -{ - protected $_even = array(); - protected $_agnc = null; - protected $_date = null; - - protected $_text = array(); - - /** - * - */ - protected $_note = array(); - - /** - * - */ - public function addText($text) - { - $this->_text[] = $text; - } - - /** - * - */ - public function addNote(\PhpGedcom\Record\NoteRef $note) - { - $this->_note[] = $note; - } -} diff --git a/library/PhpGedcom/Record/Sour/Data/Even.php b/library/PhpGedcom/Record/Sour/Data/Even.php deleted file mode 100644 index 060ea019..00000000 --- a/library/PhpGedcom/Record/Sour/Data/Even.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Sour\Data; - -/** - * - */ -class Even extends \PhpGedcom\Record -{ - protected $_date = null; - protected $_plac = null; -} diff --git a/library/PhpGedcom/Record/SourRef.php b/library/PhpGedcom/Record/SourRef.php deleted file mode 100644 index 41ba1597..00000000 --- a/library/PhpGedcom/Record/SourRef.php +++ /dev/null @@ -1,33 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -/** - * - */ -class SourRef extends \PhpGedcom\Record -{ - protected $_isRef = false; - - protected $_sour = null; - protected $_page = null; - protected $_even = null; - protected $_data = null; - protected $_quay = null; - protected $_text = null; - - protected $_obje = array(); - protected $_note = array(); -} diff --git a/library/PhpGedcom/Record/SourRef/Even.php b/library/PhpGedcom/Record/SourRef/Even.php deleted file mode 100644 index cc7dfbfe..00000000 --- a/library/PhpGedcom/Record/SourRef/Even.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\SourRef; - -/** - * - */ -class Even extends \PhpGedcom\Record -{ - protected $_even = null; - protected $_role = null; -} diff --git a/library/PhpGedcom/Record/Sourceable.php b/library/PhpGedcom/Record/Sourceable.php deleted file mode 100644 index 8b943a87..00000000 --- a/library/PhpGedcom/Record/Sourceable.php +++ /dev/null @@ -1,26 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -/** - * - */ -interface Sourceable -{ - /** - * - */ - public function addSour(\PhpGedcom\Record\SourRef $sour); -} diff --git a/library/PhpGedcom/Record/Subm.php b/library/PhpGedcom/Record/Subm.php deleted file mode 100644 index ab63cea4..00000000 --- a/library/PhpGedcom/Record/Subm.php +++ /dev/null @@ -1,241 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Subm - * @package PhpGedcom\Record - */ -class Subm extends Record implements Objectable -{ - /** - * @var string - */ - protected $subm; - - /** - * @var Record\Chan - */ - protected $chan; - - /** - * @var string - */ - protected $name; - - /** - * @var Record\Addr - */ - protected $addr; - - /** - * @var string - */ - protected $rin; - - /** - * @var string - */ - protected $rfn; - - /** - * @var array - */ - protected $lang = array(); - - /** - * @var array - */ - protected $phon = array(); - - /** - * @var array - */ - protected $obje = array(); - - /** - * @param string $subm - * @return Subm - */ - public function setSubm($subm) - { - $this->subm = $subm; - return $this; - } - - /** - * @return string - */ - public function getSubm() - { - return $this->subm; - } - - /** - * @param string $name - * @return Subm - */ - public function setName($name) - { - $this->name = $name; - return $this; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param array $phon - * @return Subm - */ - public function setPhon($phon) - { - $this->phon = $phon; - return $this; - } - - /** - * @return array - */ - public function getPhon() - { - return $this->phon; - } - - /** - * @param string $rfn - * @return Subm - */ - public function setRfn($rfn) - { - $this->rfn = $rfn; - return $this; - } - - /** - * @return string - */ - public function getRfn() - { - return $this->rfn; - } - - /** - * @param string $rin - * @return Subm - */ - public function setRin($rin) - { - $this->rin = $rin; - return $this; - } - - /** - * @return string - */ - public function getRin() - { - return $this->rin; - } - - /** - * @param \PhpGedcom\Record\Chan $chan - * @return Subm - */ - public function setChan($chan) - { - $this->chan = $chan; - return $this; - } - - /** - * @return \PhpGedcom\Record\Chan - */ - public function getChan() - { - return $this->chan; - } - - /** - * @return array - */ - public function getLang() - { - return $this->lang; - } - - /** - * @param string $lang - * @return Subm - */ - public function addLang($lang) - { - $this->lang[] = $lang; - return $this; - } - - /** - * @param Record\Phon $phon - * @return Subm - */ - public function addPhon(Record\Phon $phon) - { - $this->phon[] = $phon; - return $this; - } - - /** - * @return Addr - */ - public function getAddr() - { - return $this->addr; - } - - /** - * @param Addr $addr - * @return Subm - */ - public function setAddr(Record\Addr $addr) - { - $this->addr = $addr; - return $this; - } - - /** - * @return array - */ - public function getObje() - { - return $this->obje; - } - - /** - * @param Record\ObjeRef $obje - * @return Subm - */ - public function addObje(Record\ObjeRef $obje) - { - $this->obje[] = $obje; - return $this; - } -} diff --git a/library/PhpGedcom/Record/Subn.php b/library/PhpGedcom/Record/Subn.php deleted file mode 100644 index d3404009..00000000 --- a/library/PhpGedcom/Record/Subn.php +++ /dev/null @@ -1,208 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Subn - * @package PhpGedcom\Record - */ -class Subn extends Record -{ - /** - * @var string - */ - protected $subn; - - /** - * @var string - */ - protected $subm; - - /** - * @var string - */ - protected $famf; - - /** - * @var string - */ - protected $temp; - - /** - * @var string - */ - protected $ance; - - /** - * @var string - */ - protected $desc; - - /** - * @var string - */ - protected $ordi; - - /** - * @var string - */ - protected $rin; - - /** - * @param string $subn - * @return Subn - */ - public function setSubn($subn) - { - $this->subn = $subn; - return $this; - } - - /** - * @return string - */ - public function getSubn() - { - return $this->subn; - } - - /** - * @param string $subm - * @return Subn - */ - public function setSubm($subm) - { - $this->subm = $subm; - return $this; - } - - /** - * @return string - */ - public function getSubm() - { - return $this->subm; - } - - /** - * @param string $famf - * @return Subn - */ - public function setFamf($famf) - { - $this->famf = $famf; - return $this; - } - - /** - * @return string - */ - public function getFamf() - { - return $this->famf; - } - - /** - * @param string $temp - * @return Subn - */ - public function setTemp($temp) - { - $this->temp = $temp; - return $this; - } - - /** - * @return string - */ - public function getTemp() - { - return $this->temp; - } - - /** - * @param string $ance - * @return Subn - */ - public function setAnce($ance) - { - $this->ance = $ance; - return $this; - } - - /** - * @return string - */ - public function getAnce() - { - return $this->ance; - } - - /** - * @param string $desc - * @return Subn - */ - public function setDesc($desc) - { - $this->desc = $desc; - return $this; - } - - /** - * @return string - */ - public function getDesc() - { - return $this->desc; - } - - /** - * @param string $ordi - * @return Subn - */ - public function setOrdi($ordi) - { - $this->ordi = $ordi; - return $this; - } - - /** - * @return string - */ - public function getOrdi() - { - return $this->ordi; - } - - /** - * @param string $rin - * @return Subn - */ - public function setRin($rin) - { - $this->rin = $rin; - return $this; - } - - /** - * @return string - */ - public function getRin() - { - return $this->rin; - } -} diff --git a/library/PhpGedcom/Writer.php b/library/PhpGedcom/Writer.php deleted file mode 100644 index 0e1524d9..00000000 --- a/library/PhpGedcom/Writer.php +++ /dev/null @@ -1,43 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom; - -use \PhpGedcom\Gedcom; -use \PhpGedcom\Writer\Head; - -/** - * - */ -class Writer -{ - const GEDCOM55 = 'gedcom5.5'; - - protected $_output = null; - - /** - * - * @param \PhpGedcom\Gedcom $gedcom The GEDCOM object - * @param string $format The format to convert the GEDCOM object to - * @return string The contents of the document in the converted format - */ - public static function convert(Gedcom $gedcom, $format = self::GEDCOM55) - { - $head = $gedcom->getHead(); - - $output = Head::convert($head, $format); - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Addr.php b/library/PhpGedcom/Writer/Addr.php deleted file mode 100644 index 200272f3..00000000 --- a/library/PhpGedcom/Writer/Addr.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer; - -/** - * - */ -class Addr -{ - /** - * @param \PhpGedcom\Record\Addr $addr - * @param string $format - * @param int $level - * @return string - */ - public static function convert(\PhpGedcom\Record\Addr &$addr, $format = self::GEDCOM55, $level = 1) - { - $addrs = explode("\n", $addr->addr); - - $output = "{$level} ADDR " . $addrs[0] . "\n"; - - array_shift($addrs); - - foreach ($addrs as $cont) { - $output .= ($level+1) . " CONT " . $cont . "\n"; - } - - $output .= ($level+1) . " ADR1 " . $addr->adr1 . "\n" . - ($level+1) . " ADR2 " . $addr->adr2 . "\n" . - ($level+1) . " CITY " . $addr->city . "\n" . - ($level+1) . " STAE " . $addr->stae . "\n" . - ($level+1) . " POST " . $addr->post . "\n" . - ($level+1) . " CTRY " . $addr->ctry . "\n"; - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Head.php b/library/PhpGedcom/Writer/Head.php deleted file mode 100644 index 47874d63..00000000 --- a/library/PhpGedcom/Writer/Head.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer; - -/** - * - */ -class Head -{ - /** - * @param \PhpGedcom\Record\Head $head - * @param string $format - * @return string - */ - public static function convert(\PhpGedcom\Record\Head &$head, $format = self::GEDCOM55) - { - $output = "0 HEAD\n" . - - ($head->getSour() ? Head\Sour::convert($head->getSour(), $format) : '') . - //"1 DEST " . $head-> . "\n" . - "1 DATE " . date("d M Y") . "\n" . - "2 TIME " . date("H:i:s") . "\n"; - - /* - +1 SUBM @@ {1:1} - +1 SUBN @@ {0:1} - +1 FILE {0:1} - +1 COPR {0:1} - +1 GEDC {1:1} - +2 VERS {1:1} - +2 FORM {1:1} - +1 CHAR {1:1} - +2 VERS {0:1} - +1 LANG {0:1} - +1 PLAC {0:1} - +2 FORM {1:1} - +1 NOTE {0:1} - +2 [CONT|CONC] {0:M} - */ - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Head/Sour.php b/library/PhpGedcom/Writer/Head/Sour.php deleted file mode 100644 index e218170d..00000000 --- a/library/PhpGedcom/Writer/Head/Sour.php +++ /dev/null @@ -1,44 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\Head; - -/** - * - */ -class Sour -{ - /** - * @param \PhpGedcom\Record\Head\Sour $sour - * @param string $format - * @param int $level - * @return string - */ - public static function convert(\PhpGedcom\Record\Head\Sour &$sour, $format = self::GEDCOM55, $level = 0) - { - $output = "1 SOUR " . $sour->sour . "\n" . - "2 VERS " . $sour->vers . "\n" . - \PhpGedcom\Writer\Head\Sour\Corp::convert($sour->corp, $format, 2) . - // TODO DATA; - ""; - - /* - +2 DATA {0:1} - +3 DATE {0:1} - +3 COPR {0:1} - */ - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Head/Sour/Corp.php b/library/PhpGedcom/Writer/Head/Sour/Corp.php deleted file mode 100644 index d1e8b418..00000000 --- a/library/PhpGedcom/Writer/Head/Sour/Corp.php +++ /dev/null @@ -1,39 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\Head\Sour; - -/** - * - */ -class Corp -{ - /** - * @param \PhpGedcom\Record\Head\Sour\Corp $corp - * @param string $format - * @param int $level - * @return string - */ - public static function convert(\PhpGedcom\Record\Head\Sour\Corp &$corp, $format = self::GEDCOM55, $level = 2) - { - $output = "{$level} CORP " . $corp->corp . "\n" . - \PhpGedcom\Writer\Addr::convert($corp->addr, $format, $level + 1); - - foreach ($corp->phon as $phon) { - $output .= \PhpGedcom\Writer\Phon::convert($phon, $format, $level + 1); - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Phon.php b/library/PhpGedcom/Writer/Phon.php deleted file mode 100644 index 75505963..00000000 --- a/library/PhpGedcom/Writer/Phon.php +++ /dev/null @@ -1,34 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer; - -/** - * - */ -class Phon -{ - /** - * @param string $phon - * @param string $format - * @param int $level - * @return string - */ - public static function convert($phon, $format = self::GEDCOM55, $level = 1) - { - $output = "{$level} PHON " . $phon . "\n"; - - return $output; - } -} diff --git a/peridot.php b/peridot.php new file mode 100644 index 00000000..6962ca18 --- /dev/null +++ b/peridot.php @@ -0,0 +1,9 @@ +on('peridot.start', function (\Peridot\Console\Environment $environment) { + $environment->getDefinition()->getArgument('path')->setDefault('specs'); + }); +}; diff --git a/tests/stresstestfiles/TGC551.ged b/specs/data/gedcom/TGC551.ged similarity index 100% rename from tests/stresstestfiles/TGC551.ged rename to specs/data/gedcom/TGC551.ged diff --git a/tests/stresstestfiles/TGC551LF.ged b/specs/data/gedcom/TGC551LF.ged similarity index 100% rename from tests/stresstestfiles/TGC551LF.ged rename to specs/data/gedcom/TGC551LF.ged diff --git a/tests/stresstestfiles/TGC55C.ged b/specs/data/gedcom/TGC55C.ged similarity index 100% rename from tests/stresstestfiles/TGC55C.ged rename to specs/data/gedcom/TGC55C.ged diff --git a/tests/stresstestfiles/TGC55CLF.ged b/specs/data/gedcom/TGC55CLF.ged similarity index 100% rename from tests/stresstestfiles/TGC55CLF.ged rename to specs/data/gedcom/TGC55CLF.ged diff --git a/tests/bootstrap.php b/tests/bootstrap.php deleted file mode 100644 index 52f1b878..00000000 --- a/tests/bootstrap.php +++ /dev/null @@ -1,10 +0,0 @@ -parse($sample); - - $indi = current($gedcom->getIndi()); - $birt = current($indi->getEven()); - - $this->assertEquals('01.01.1970', $birt->getDate()); - } -} diff --git a/tests/issue/Issue00017Test.php b/tests/issue/Issue00017Test.php deleted file mode 100644 index 369f126b..00000000 --- a/tests/issue/Issue00017Test.php +++ /dev/null @@ -1,28 +0,0 @@ -parse($sample); - - $indi = current($gedcom->getIndi()); - - $this->assertCount(0, $indi->getFamc()); - $this->assertCount(1, $parser->getErrors()); - } -} diff --git a/tests/issue/Issue00018Test.php b/tests/issue/Issue00018Test.php deleted file mode 100644 index 5e5c6159..00000000 --- a/tests/issue/Issue00018Test.php +++ /dev/null @@ -1,28 +0,0 @@ -parse($sample); - - $sour = current($gedcom->getSour()); - - $this->assertCount(0, $sour->getNote()); - $this->assertCount(1, $parser->getErrors()); - } -} diff --git a/tests/issue/files/issue00012.ged b/tests/issue/files/issue00012.ged deleted file mode 100644 index c387cb24..00000000 --- a/tests/issue/files/issue00012.ged +++ /dev/null @@ -1,22 +0,0 @@ -0 @I53561612@ INDI -1 NAME XXX XX /XXXX/ -2 GIVN XXX -2 SURN XXXX -2 SECG XX -2 NPFX XX. -1 SEX M -1 BIRT -2 DATE 01.01.1970 -2 PLAC XXX,,Vienna,Austria -2 CHAN -3 DATE 15 Jun 2013 -4 TIME 16:36:28 -2 CREA -3 DATE 15 Jun 2013 -4 TIME 10:24:41 -1 CHAN -2 DATE 16 Jun 2013 -3 TIME 13:55:29 -1 CREA -2 DATE 16 Jun 2013 -3 TIME 10:24:28 diff --git a/tests/issue/files/issue00017.ged b/tests/issue/files/issue00017.ged deleted file mode 100644 index 8c9f0007..00000000 --- a/tests/issue/files/issue00017.ged +++ /dev/null @@ -1,7 +0,0 @@ -0 @P1232@ INDI -1 BIRT -2 DATE 1 May 1950 -2 PLAC Chicago, Cook, Illinois, United States -1 NAME John Doe -1 FAMC -1 SEX M diff --git a/tests/issue/files/issue00018.ged b/tests/issue/files/issue00018.ged deleted file mode 100644 index 71261b37..00000000 --- a/tests/issue/files/issue00018.ged +++ /dev/null @@ -1,7 +0,0 @@ -0 @S-1305285410@ SOUR -1 REPO @R-1553404477@ -1 TITL Minnesota, Territorial and State Census, 1849-1905 -1 AUTH Ancestry.com -1 PUBL Online publication - Provo, UT, USA: Ancestry.com Operations Inc, 2007.Original data - Minnesota Historical Society. Minnesota State Population Census Schedules, 1865-1905. St. Paul, MN, USA: Minnesot -2 CONC a Historical Society, 1977. Microfilm. Reels 1-47 and 10 -1 NOTE diff --git a/tests/library/Gedcom/ParserTest.php b/tests/library/Gedcom/ParserTest.php deleted file mode 100644 index b5e08e42..00000000 --- a/tests/library/Gedcom/ParserTest.php +++ /dev/null @@ -1,271 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom - * @license GPL-3.0 - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcomTest; - -use PhpGedcom\Parser; - -/** - * Class ParserTest - * @package PhpGedcomTest - */ -class ParserTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \PhpGedcom\Parser - */ - protected $parser = null; - - /** - * @var \PhpGedcom\Gedcom - */ - protected $gedcom = null; - - /** - * - */ - public function setUp() - { - $this->parser = new Parser(); - $this->gedcom = $this->parser->parse(TEST_DIR . '/stresstestfiles/TGC551LF.ged'); - } - - /** - * - */ - public function testNoErrors() - { - $this->assertEquals(1, count($this->parser->getErrors())); - } - - /** - * - */ - public function testRecordCounts() - { - $this->assertEquals(count($this->gedcom->getIndi()), 15); - $this->assertEquals(count($this->gedcom->getFam()), 7); - $this->assertEquals(count($this->gedcom->getSour()), 2); - $this->assertEquals(count($this->gedcom->getNote()), 33); - $this->assertEquals(count($this->gedcom->getObje()), 1); - $this->assertEquals(count($this->gedcom->getRepo()), 1); - } - - /** - * - */ - public function testHead() - { - $head = $this->gedcom->getHead(); - - $this->assertEquals($head->getSour()->getSour(), 'GEDitCOM'); - $this->assertEquals($head->getSour()->getName(), 'GEDitCOM'); - $this->assertEquals($head->getSour()->getVers(), '2.9.4'); - $this->assertEquals($head->getSour()->getCorp()->getCorp(), 'RSAC Software'); - $this->assertEquals( - $head->getSour()->getCorp()->getAddr()->getAddr(), - "7108 South Pine Cone Street\nSalt Lake City, UT 84121\nUSA" - ); - $this->assertEquals($head->getSour()->getCorp()->getAddr()->getCity(), 'Salt Lake City'); - $this->assertEquals($head->getSour()->getCorp()->getAddr()->getStae(), 'UT'); - $this->assertEquals($head->getSour()->getCorp()->getAddr()->getPost(), '84121'); - $this->assertEquals($head->getSour()->getCorp()->getAddr()->getCtry(), 'USA'); - - $phon = $head->getSour()->getCorp()->getPhon(); - - $this->assertEquals($phon[0], '+1-801-942-7768'); - $this->assertEquals($phon[1], '+1-801-555-1212'); - $this->assertEquals($phon[2], '+1-801-942-1148 (FAX) (last one!)'); - - $this->assertEquals($head->getSour()->getData()->getData(), 'Name of source data'); - $this->assertEquals($head->getSour()->getData()->getDate(), '1 JAN 1998'); - $this->assertEquals($head->getSour()->getData()->getCopr(), 'Copyright of source data'); - - $this->assertEquals($head->getSubm(), 'SUBMITTER'); - $this->assertEquals($head->getSubn(), 'SUBMISSION'); - - $this->assertEquals($head->getDest(), 'ANSTFILE'); - - $this->assertEquals($head->getDate()->getDate(), '1 JAN 1998'); - $this->assertEquals($head->getDate()->getTime(), '13:57:24.80'); - - $this->assertEquals($head->getFile(), 'TGC55C.ged'); - - $this->assertEquals($head->getGedc()->getVers(), '5.5'); - $this->assertEquals($head->getGedc()->getForm(), 'LINEAGE-LINKED'); - - $this->assertEquals($head->getLang(), 'English'); - - $this->assertEquals($head->getChar()->getChar(), 'ANSEL'); - $this->assertEquals($head->getChar()->getVers(), 'ANSI Z39.47-1985'); - - $this->assertEquals($head->getPlac()->getForm(), 'City, County, State, Country'); - $this->assertEquals($head->getSubn(), 'SUBMISSION'); - } - - /** - * - */ - public function testSubn() - { - $subn = $this->gedcom->getSubn(); - - $this->assertEquals($subn->getSubn(), 'SUBMISSION'); - $this->assertEquals($subn->getSubm(), 'SUBMITTER'); - $this->assertEquals($subn->getFamf(), 'NameOfFamilyFile'); - $this->assertEquals($subn->getTemp(), 'Abbreviated Temple Code'); - $this->assertEquals($subn->getAnce(), '1'); - $this->assertEquals($subn->getDesc(), '1'); - $this->assertEquals($subn->getOrdi(), 'yes'); - $this->assertEquals($subn->getRin(), '1'); - } - - /** - * - */ - public function testSubm() - { - $subm = $this->gedcom->getSubm(); - - $this->assertEquals($subm['SUBMITTER']->getSubm(), 'SUBMITTER'); - $this->assertEquals($subm['SUBMITTER']->getName(), 'John A. Nairn'); - $this->assertEquals( - $subm['SUBMITTER']->getAddr()->getAddr(), - "Submitter address line 1\n" . - "Submitter address line 2\n" . - "Submitter address line 3\n" . - "Submitter address line 4" - ); - - $this->assertEquals($subm['SUBMITTER']->getAddr()->getAdr1(), 'Submitter address line 1'); - $this->assertEquals($subm['SUBMITTER']->getAddr()->getAdr2(), 'Submitter address line 2'); - $this->assertEquals($subm['SUBMITTER']->getAddr()->getCity(), 'Submitter address city'); - $this->assertEquals($subm['SUBMITTER']->getAddr()->getStae(), 'Submitter address state'); - $this->assertEquals($subm['SUBMITTER']->getAddr()->getPost(), 'Submitter address ZIP code'); - $this->assertEquals($subm['SUBMITTER']->getAddr()->getCtry(), 'Submitter address country'); - - $phon = $subm['SUBMITTER']->getPhon(); - $this->assertEquals($phon[0]->getPhon(), 'Submitter phone number 1'); - $this->assertEquals($phon[1]->getPhon(), 'Submitter phone number 2'); - $this->assertEquals($phon[2]->getPhon(), 'Submitter phone number 3 (last one!)'); - - $lang = $subm['SUBMITTER']->getLang(); - $this->assertEquals($lang[0], 'English'); - $this->assertEquals($subm['SUBMITTER']->getChan()->getDate(), '7 Sep 2000'); - $this->assertEquals($subm['SUBMITTER']->getChan()->getTime(), '8:35:36'); - $this->assertEquals($subm['SUBMITTER']->getRfn(), 'Submitter Registered RFN'); - $this->assertEquals($subm['SUBMITTER']->getRin(), '1'); - - $obje = current($subm['SUBMITTER']->getObje()); - $this->assertEquals($obje->getForm(), 'jpeg'); - $this->assertEquals($obje->getTitl(), 'Submitter Multimedia File'); - $this->assertEquals($obje->getFile(), 'ImgFile.JPG'); - - $note = current($obje->getNote()); - $this->assertEquals($note->getNote(), 'N1'); - - - $this->assertEquals($subm['SM2']->getSubm(), 'SM2'); - $this->assertEquals($subm['SM2']->getName(), 'Secondary Submitter'); - $this->assertEquals( - $subm['SM2']->getAddr()->getAddr(), - "Secondary Submitter Address 1\n" . - "Secondary Submitter Address 2" - ); - - $lang = $subm['SM2']->getLang(); - $this->assertEquals($lang[0], 'English'); - $this->assertEquals($subm['SM2']->getChan()->getDate(), '12 Mar 2000'); - $this->assertEquals($subm['SM2']->getChan()->getTime(), '10:38:33'); - $this->assertEquals($subm['SM2']->getRin(), '2'); - - - $this->assertEquals($subm['SM3']->getSubm(), 'SM3'); - $this->assertEquals($subm['SM3']->getName(), 'H. Eichmann'); - $this->assertEquals( - $subm['SM3']->getAddr()->getAddr(), - "email: h.eichmann@@mbox.iqo.uni-hannover.de\n" . - "or: heiner_eichmann@@h.maus.de (no more than 16k!!!!)" - ); - $this->assertEquals($subm['SM3']->getChan()->getDate(), '13 Jun 2000'); - $this->assertEquals($subm['SM3']->getChan()->getTime(), '17:07:32'); - $this->assertEquals($subm['SM3']->getRin(), '3'); - } - - /** - * - */ - public function testIndi() - { - - } - - /** - * - */ - public function testFam() - { - - } - - /** - * - */ - public function testObje() - { - - } - - /** - * - */ - public function testRepo() - { - - } - - /** - * - */ - public function testSour() - { - $sour = $this->gedcom->getSour(); - - $secondSource = $sour['SR2']; - - $this->assertEquals($secondSource->getSour(), 'SR2'); - $this->assertEquals($secondSource->getTitl(), 'All I Know About GEDCOM, I Learned on the Internet'); - $this->assertEquals($secondSource->getAbbr(), 'What I Know About GEDCOM'); - $this->assertEquals($secondSource->getAuth(), 'Second Source Author'); - $this->assertEquals($secondSource->getChan()->getDate(), '11 Jan 2001'); - $this->assertEquals($secondSource->getChan()->getTime(), '16:21:39'); - $this->assertEquals($secondSource->getRin(), '2'); - } - - /** - * - */ - public function testNote() - { - $firstNote = current($this->gedcom->getNote()); - - $this->assertEquals( - $firstNote->getNote(), - 'Test link to a graphics file about the main Submitter of this file.' - ); - - $this->assertEquals($firstNote->getChan()->getDate(), '24 May 1999'); - $this->assertEquals($firstNote->getChan()->getTime(), '16:39:55'); - } -} diff --git a/tests/phpunit.xml b/tests/phpunit.xml deleted file mode 100644 index 8b8812e4..00000000 --- a/tests/phpunit.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - library/Gedcom/ - - - From e7625106eb21ea7ac919c9c822207925037cfa87 Mon Sep 17 00:00:00 2001 From: Kristopher Wilson Date: Sun, 30 Apr 2017 16:13:41 -0400 Subject: [PATCH 2/2] Updates Travis Build --- .travis.yml | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index b9264db5..a9152515 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,12 @@ language: php php: - - 5.6 - - 5.5 - - 5.4 - 7 - - hhvm - - hhvm-nightly - -matrix: - fast_finish: true - allow_failures: - - php: 7 - - php: hhvm - - php: hhvm-nightly + - 7.1 before_script: - - composer install --prefer-dist --dev + - composer install --prefer-dist script: - - vendor/bin/phpunit -c tests/phpunit.xml tests/ - - vendor/bin/phpcs --standard=PSR2 -n library/ tests/ + - composer check-style + - composer test