From ce8efa02e49f0d0fa84f55c6de872a1ec4e4b61f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20L=C3=B3pez?= Date: Mon, 11 Feb 2019 10:57:18 -0500 Subject: [PATCH 01/99] Check for attr and event before writing Make sure we have the specific attr or event before we add the incoming data. If we don't we create a new key and add an empty array before we add the data --- library/PhpGedcom/Record/Indi.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/library/PhpGedcom/Record/Indi.php b/library/PhpGedcom/Record/Indi.php index 95a6fea5..52df2606 100644 --- a/library/PhpGedcom/Record/Indi.php +++ b/library/PhpGedcom/Record/Indi.php @@ -216,7 +216,13 @@ public function getName() */ public function addAttr($attr = []) { - $this->attr[$attr->getType()] = $attr; + $attrName = $attr->getType(); + + if (!array_key_exists($attrName, $this->attr)) { + $this->attr[$attrName] = []; + } + + $this->attr[$attrName][] = $attr; return $this; } @@ -243,8 +249,14 @@ public function getAttr($key = '') */ public function addEven($even = []) { - $this->even[$even->getType()] = $even; - return $this; + $evenName = $even->getType(); + + if (!array_key_exists($evenName, $this->even)) { + $this->even[$evenName] = []; + } + + $this->even[$evenName][] = $even; + return $thi } /** From 4303e2b6388240f6cc73651bcf88563c46cbb84b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20L=C3=B3pez?= Date: Mon, 11 Feb 2019 10:58:42 -0500 Subject: [PATCH 02/99] Fix typo --- library/PhpGedcom/Record/Indi.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/PhpGedcom/Record/Indi.php b/library/PhpGedcom/Record/Indi.php index 52df2606..b89ea770 100644 --- a/library/PhpGedcom/Record/Indi.php +++ b/library/PhpGedcom/Record/Indi.php @@ -256,7 +256,7 @@ public function addEven($even = []) } $this->even[$evenName][] = $even; - return $thi + return $this; } /** From e6cb389f823b7d9fa80a58de7af81ff2ecb3256a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20L=C3=B3pez?= Date: Mon, 11 Feb 2019 11:38:06 -0500 Subject: [PATCH 03/99] Update PHP Doc --- library/PhpGedcom/Record/Indi.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/PhpGedcom/Record/Indi.php b/library/PhpGedcom/Record/Indi.php index b89ea770..16efa4dd 100644 --- a/library/PhpGedcom/Record/Indi.php +++ b/library/PhpGedcom/Record/Indi.php @@ -227,7 +227,7 @@ public function addAttr($attr = []) } /** - * @return Indi\Attr[] + * @return array */ public function getAllAttr() { From 9b00670abc69426bc984ef89451f993a37b8f339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20L=C3=B3pez?= Date: Thu, 30 May 2019 09:14:21 -0400 Subject: [PATCH 04/99] Add `_attr` property to EVEN Record to capture data from incoming record --- library/PhpGedcom/Parser/Indi/Attr.php | 1 - library/PhpGedcom/Parser/Indi/Even.php | 5 +++++ library/PhpGedcom/Record/Indi/Even.php | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/library/PhpGedcom/Parser/Indi/Attr.php b/library/PhpGedcom/Parser/Indi/Attr.php index 4aa99a48..99cad602 100644 --- a/library/PhpGedcom/Parser/Indi/Attr.php +++ b/library/PhpGedcom/Parser/Indi/Attr.php @@ -40,7 +40,6 @@ public static function parse(\PhpGedcom\Parser $parser) return null; } - if (isset($record[2])) { $attr->setAttr(trim($record[2])); } diff --git a/library/PhpGedcom/Parser/Indi/Even.php b/library/PhpGedcom/Parser/Indi/Even.php index 77cdd2e1..988c2c1e 100644 --- a/library/PhpGedcom/Parser/Indi/Even.php +++ b/library/PhpGedcom/Parser/Indi/Even.php @@ -49,6 +49,11 @@ public static function parse(\PhpGedcom\Parser $parser) $even->setType(trim($record[1])); } + // ensures we capture any data following the EVEN type + if (isset($record[2]) && !empty($record[2])) { + $even->setAttr(trim($record[2])); + } + $parser->forward(); while (!$parser->eof()) { diff --git a/library/PhpGedcom/Record/Indi/Even.php b/library/PhpGedcom/Record/Indi/Even.php index 47335135..646b2aa8 100644 --- a/library/PhpGedcom/Record/Indi/Even.php +++ b/library/PhpGedcom/Record/Indi/Even.php @@ -27,6 +27,11 @@ class Even extends Record implements Record\Objectable, Record\Sourceable, Recor */ protected $type; + /** + * @var string + */ + protected $_attr; + /** * @var string */ From 11151636b8fdd49fd98265094b22e8d2f881ba9a Mon Sep 17 00:00:00 2001 From: Aria Burrell Date: Fri, 21 Jun 2019 18:24:29 -0600 Subject: [PATCH 05/99] Repaired items broken in php 7.3 --- library/PhpGedcom/Parser.php | 2 +- library/PhpGedcom/Record/Repo.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/library/PhpGedcom/Parser.php b/library/PhpGedcom/Parser.php index eb22212e..13cb8dbc 100644 --- a/library/PhpGedcom/Parser.php +++ b/library/PhpGedcom/Parser.php @@ -213,7 +213,7 @@ public function getCurrentLineRecord($pieces = 3) $line = trim($this->_line); - $this->_lineRecord = explode(' ', $line, $pieces); + $this->_lineRecord = array_pad(explode(' ', $line, $pieces), 3, ''); $this->_linePieces = $pieces; return $this->_lineRecord; diff --git a/library/PhpGedcom/Record/Repo.php b/library/PhpGedcom/Record/Repo.php index 8cd5fa08..91094648 100644 --- a/library/PhpGedcom/Record/Repo.php +++ b/library/PhpGedcom/Record/Repo.php @@ -66,7 +66,7 @@ class Repo extends Record implements Noteable * @param Phon $phon * @return Repo */ - public function addPhon($phon = new Phon) + public function addPhon($phon) { $this->phon[] = $phon; return $this; @@ -84,7 +84,7 @@ public function getPhon() * @param Refn $refn * @return Repo */ - public function addRefn($refn = new Refn) + public function addRefn($refn) { $this->refn[] = $refn; return $this; @@ -102,7 +102,7 @@ public function getRefn() * @param NoteRef $note * @return Repo */ - public function addNote($note = new NoteRef) + public function addNote($note = array()) { $this->note[] = $note; return $this; @@ -156,7 +156,7 @@ public function getName() * @param \PhpGedcom\Record\Addr $addr * @return Repo */ - public function setAddr($addr = new Addr) + public function setAddr($addr) { $this->addr = $addr; return $this; From 124cd6625cff82c179a18ff69325ba50111b1291 Mon Sep 17 00:00:00 2001 From: Tanguy Lesseliers Date: Mon, 13 Apr 2020 16:05:45 +0200 Subject: [PATCH 06/99] adding missing methods and improvements if data is missing in gedcom --- library/PhpGedcom/Parser.php | 612 ++++++------ library/PhpGedcom/Parser/Date.php | 42 + library/PhpGedcom/Parser/Fam/Even.php | 160 ++-- library/PhpGedcom/Parser/Indi.php | 325 ++++--- library/PhpGedcom/Parser/Indi/Even.php | 184 ++-- library/PhpGedcom/Record/Date.php | 125 +++ library/PhpGedcom/Record/Fam.php | 267 +++--- library/PhpGedcom/Record/Fam/Even.php | 106 +-- library/PhpGedcom/Record/Head/Gedc.php | 55 +- library/PhpGedcom/Record/Head/Sour.php | 136 +-- library/PhpGedcom/Record/Indi.php | 1205 +++++++++++------------- library/PhpGedcom/Record/Indi/Name.php | 67 +- library/PhpGedcom/Record/Repo.php | 365 ++++--- library/PhpGedcom/Record/Subm.php | 437 ++++----- 14 files changed, 2116 insertions(+), 1970 deletions(-) create mode 100644 library/PhpGedcom/Parser/Date.php create mode 100644 library/PhpGedcom/Record/Date.php diff --git a/library/PhpGedcom/Parser.php b/library/PhpGedcom/Parser.php index eb22212e..6773065b 100644 --- a/library/PhpGedcom/Parser.php +++ b/library/PhpGedcom/Parser.php @@ -17,318 +17,302 @@ /** * */ -class Parser -{ - /** - * - */ - protected $_file = null; - - /** - * - */ - protected $_gedcom = null; - - /** - * - */ - protected $_errorLog = array(); - - /** - * - */ - protected $_linesParsed = 0; - - /** - * - */ - protected $_line = ''; - - /** - * - */ - protected $_lineRecord = null; - - /** - * - */ - protected $_linePices = 0; - - /** - * - */ - 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)) { - if ($this->_linePieces == $pieces) { - return $this->_lineRecord; - } - } - - if (empty($this->_line)) { - return false; - } - - $line = trim($this->_line); - - $this->_lineRecord = explode(' ', $line, $pieces); - $this->_linePieces = $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): - if(isset($record[1])) - $identifier = $this->normalizeIdentifier($record[1]); - - - if (isset($record[1]) && 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 (isset($record[1]) && trim($record[1]) == 'TRLR') { - // EOF - break; - } else { - $this->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - } else { - $this->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $this->forward(); - } - - return $this->getGedcom(); - } +class Parser { + /** + * + */ + protected $_file = null; + + /** + * + */ + protected $_gedcom = null; + + /** + * + */ + protected $_errorLog = array(); + + /** + * + */ + protected $_linesParsed = 0; + + /** + * + */ + protected $_line = ''; + + /** + * + */ + protected $_lineRecord = null; + + /** + * + */ + protected $_linePieces = 0; + + /** + * + */ + 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)) { + if ($this->_linePieces == $pieces) { + return $this->_lineRecord; + } + } + + if (empty($this->_line)) { + return false; + } + + $line = trim($this->_line); + + $this->_lineRecord = explode(' ', $line, $pieces); + $this->_linePieces = $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): + if (isset($record[1])) { + $identifier = $this->normalizeIdentifier($record[1]); + } + + if (isset($record[1]) && 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 (isset($record[1]) && 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/Date.php b/library/PhpGedcom/Parser/Date.php new file mode 100644 index 00000000..ac46d390 --- /dev/null +++ b/library/PhpGedcom/Parser/Date.php @@ -0,0 +1,42 @@ + + * @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 Date extends \PhpGedcom\Parser\Component { + + /** + * + * + */ + public static function parse(\PhpGedcom\Parser $parser) { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[1])) { + $dat = new \PhpGedcom\Record\Date(); + if (!empty($record[2])) { + $dat->setDate($record[2]); + } + } else { + $parser->skipToNextLevel($depth); + return null; + } + + return $dat; + } +} \ No newline at end of file diff --git a/library/PhpGedcom/Parser/Fam/Even.php b/library/PhpGedcom/Parser/Fam/Even.php index 06aa3beb..1f32d7b7 100644 --- a/library/PhpGedcom/Parser/Fam/Even.php +++ b/library/PhpGedcom/Parser/Fam/Even.php @@ -18,93 +18,93 @@ * * */ -class Even extends \PhpGedcom\Parser\Component -{ +class Even extends \PhpGedcom\Parser\Component { - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; + /** + * + * + */ + public static function parse(\PhpGedcom\Parser $parser) { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; - $even = new \PhpGedcom\Record\Fam\Even(); + $even = new \PhpGedcom\Record\Fam\Even(); - if (isset($record[1]) && strtoupper(trim($record[1])) != 'EVEN') { - $even->setType(trim($record[1])); - } + if (isset($record[1]) && strtoupper(trim($record[1])) != 'EVEN') { + $even->setType(trim($record[1])); + } - $parser->forward(); + $parser->forward(); - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + while (!$parser->eof()) { + $record = $parser->getCurrentLineRecord(); + $recordType = strtoupper(trim($record[1])); + $currentDepth = (int) $record[0]; - if ($currentDepth <= $depth) { - $parser->back(); - break; - } + 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__); - } + switch ($recordType) { + case 'TYPE': + $even->setType(trim($record[2])); + break; + case 'DATE': + $dat = \PhpGedcom\Parser\Date::parse($parser); + $even->setDate($dat); + //$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(); - } + $parser->forward(); + } - return $even; - } + return $even; + } } diff --git a/library/PhpGedcom/Parser/Indi.php b/library/PhpGedcom/Parser/Indi.php index eb6ba70b..9cd5f41b 100644 --- a/library/PhpGedcom/Parser/Indi.php +++ b/library/PhpGedcom/Parser/Indi.php @@ -18,179 +18,176 @@ * * */ -class Indi extends \PhpGedcom\Parser\Component -{ - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - if(isset($record[1])){ - $identifier = $parser->normalizeIdentifier($record[1]); - } - else{ - $parser->skipToNextLevel($depth); - return null; - } +class Indi extends \PhpGedcom\Parser\Component { + /** + * + * + */ + public static function parse(\PhpGedcom\Parser $parser) { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[1])) { + $identifier = $parser->normalizeIdentifier($record[1]); + } else { + $parser->skipToNextLevel($depth); + return null; + } - $indi = new \PhpGedcom\Record\Indi(); - $indi->setId($identifier); + $indi = new \PhpGedcom\Record\Indi(); + $indi->setId($identifier); - $parser->getGedcom()->addIndi($indi); + $parser->getGedcom()->addIndi($indi); - $parser->forward(); + $parser->forward(); - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + while (!$parser->eof()) { + $record = $parser->getCurrentLineRecord(); + $recordType = strtoupper(trim($record[1])); + $currentDepth = (int) $record[0]; - if ($currentDepth <= $depth) { - $parser->back(); - break; - } + if ($currentDepth <= $depth) { + $parser->back(); + break; + } - switch ($recordType) { - case '_UID': - $indi->setUid(trim($record[2])); - break; - 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; + switch ($recordType) { + case '_UID': + $indi->setUid(trim($record[2])); + break; + 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(isset($record[2]) ? 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; + $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; + $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__); - } + $att = $class::parse($parser); + $indi->addAttr($att); + break; + default: + $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + } - $parser->forward(); - } + $parser->forward(); + } - return $indi; - } + return $indi; + } } diff --git a/library/PhpGedcom/Parser/Indi/Even.php b/library/PhpGedcom/Parser/Indi/Even.php index 77cdd2e1..0851a629 100644 --- a/library/PhpGedcom/Parser/Indi/Even.php +++ b/library/PhpGedcom/Parser/Indi/Even.php @@ -20,107 +20,107 @@ * * */ -class Even extends \PhpGedcom\Parser\Component -{ +class Even extends \PhpGedcom\Parser\Component { - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - if(empty($record[1])){ - $parser->skipToNextLevel($depth); - return null; - } + /** + * + * + */ + public static function parse(\PhpGedcom\Parser $parser) { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (empty($record[1])) { + $parser->skipToNextLevel($depth); + return null; + } - $even = null; + $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 (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])); - } + if (isset($record[1]) && strtoupper(trim($record[1])) != 'EVEN') { + $even->setType(trim($record[1])); + } - $parser->forward(); + $parser->forward(); - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + while (!$parser->eof()) { + $record = $parser->getCurrentLineRecord(); + $recordType = strtoupper(trim($record[1])); + $currentDepth = (int) $record[0]; - if ($currentDepth <= $depth) { - $parser->back(); - break; - } + 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; + switch ($recordType) { + case 'TYPE': + $even->setType(trim($record[2])); + break; + case 'DATE': + $dat = \PhpGedcom\Parser\Date::parse($parser); + $even->setDate($dat); + //$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\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 '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); - } - } + if (method_exists($self, $method)) { + $self::$method($parser, $even); + } else { + $parser->logUnhandledRecord($self . ' @ ' . __LINE__); + $parser->skipToNextLevel($currentDepth); + } + } - $parser->forward(); - } + $parser->forward(); + } - return $even; - } + return $even; + } } diff --git a/library/PhpGedcom/Record/Date.php b/library/PhpGedcom/Record/Date.php new file mode 100644 index 00000000..890aaeea --- /dev/null +++ b/library/PhpGedcom/Record/Date.php @@ -0,0 +1,125 @@ + + * @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 Date + * @package PhpGedcom\Record + */ +class Date extends Record { + /** + * @var string + */ + protected $date = null; + + /** + * @var array + */ + private $months = [ + 'JAN' => 1, 'FEB' => 2, 'MAR' => 3, 'APR' => 4, 'MAY' => 5, 'JUN' => 6, + 'JUL' => 7, 'AUG' => 8, 'SEP' => 9, 'OCT' => 10, 'NOV' => 11, 'DEC' => 12, + ]; + + /** + * @param string $date Date array + * @return Date + */ + public function setDate($date) { + $this->date = $date; + + return $this; + } + + /** + * @return null|string + */ + public function getDate() { + return $this->date; + } + + /** + * Return month part of date + * + * @return int|null + */ + public function getMonth() { + $record = explode(' ', $this->date); + if (count($record) > 0) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + foreach ($record as $part) { + if (isset($this->months[trim($part)])) { + return $this->months[trim($part)]; + } + } + } + + return null; + } + + /** + * Return year part of date + * + * @return int|null + */ + public function getYear() { + $record = explode(' ', $this->date); + if (count($record) > 0) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + if (count($record) > 0) { + return (int) end($record); + } + } + + return null; + } + + /** + * Return day part of date + * + * @return int|null + */ + public function getDay() { + $record = explode(' ', $this->date); + if (!empty($record[0])) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + if (count($record) > 0) { + $day = (int) reset($record); + if ($day >= 1 && $day <= 31) { + return $day; + } + } + } + + return null; + } + + /** + * Check if the first part is a prefix (eg 'BEF', 'ABT',). + * + * @param string $datePart Date part to be checked + * @return bool + */ + private function isPrefix($datePart) { + return in_array($datePart, ['FROM', 'TO', 'BEF', 'AFT', 'BET', 'AND', 'ABT', 'EST', 'CAL', 'INT']); + } +} \ No newline at end of file diff --git a/library/PhpGedcom/Record/Fam.php b/library/PhpGedcom/Record/Fam.php index 5ad42682..3b05742a 100644 --- a/library/PhpGedcom/Record/Fam.php +++ b/library/PhpGedcom/Record/Fam.php @@ -18,141 +18,134 @@ * * */ -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($even = []) - { - $this->_even[$even->getType()] = $even; - } - - /** - * @return array - */ - public function getAllEven() - { - return $this->_even; - } - - /** - * @return array - */ - public function getEven($key = '') - { - if(isset($this->_even[strtoupper($key)])) - return $this->_even[strtoupper($key)]; - } - - /** - * - */ - public function addSlgs($slgs = []) - { - $this->_slgs[] = $slgs; - } - - /** - * - * - */ - public function addRefn($refn = []) - { - $this->_refn[] = $refn; - } - - /** - * - */ - public function addNote($note = []) - { - $this->_note[] = $note; - } - - /** - * - */ - public function addSour($sour = []) - { - $this->_sour[] = $sour; - } - - /** - * - */ - public function addObje($obje = []) - { - $this->_obje[] = $obje; - } +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($even = []) { + $this->_even[$even->getType()] = $even; + } + + /** + * @return array + */ + public function getAllEven() { + return $this->_even; + } + /** + * @return void|\PhpGedcom\Record\Fam\Even + */ + public function getEven($key = '') { + if (isset($this->_even[strtoupper($key)])) { + return $this->_even[strtoupper($key)]; + } + + } + /** + + /** + * + */ + public function addSlgs($slgs = []) { + $this->_slgs[] = $slgs; + } + + /** + * + * + */ + public function addRefn($refn = []) { + $this->_refn[] = $refn; + } + + /** + * + */ + public function addNote($note = []) { + $this->_note[] = $note; + } + + /** + * + */ + public function addSour($sour = []) { + $this->_sour[] = $sour; + } + + /** + * + */ + public function addObje($obje = []) { + $this->_obje[] = $obje; + } } diff --git a/library/PhpGedcom/Record/Fam/Even.php b/library/PhpGedcom/Record/Fam/Even.php index 878a83e2..6d47684b 100644 --- a/library/PhpGedcom/Record/Fam/Even.php +++ b/library/PhpGedcom/Record/Fam/Even.php @@ -14,74 +14,74 @@ namespace PhpGedcom\Record\Fam; +use \PhpGedcom\Record\Noteable; use \PhpGedcom\Record\Objectable; use \PhpGedcom\Record\Sourceable; -use \PhpGedcom\Record\Noteable; /** * + * Event record. + * + * @method mixed getType() + * @method \PhpGedcom\Record\Date getDate() + * @method string getPlac() */ -class Even extends \PhpGedcom\Record implements Objectable, Sourceable, Noteable -{ - protected $_type = null; - protected $_date = null; - protected $_plac = null; - protected $_caus = null; - protected $_age = null; +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 $_addr = null; - protected $_phon = array(); + protected $_phon = array(); - protected $_agnc = null; + protected $_agnc = null; - protected $_husb = null; - protected $_wife = null; + protected $_husb = null; + protected $_wife = null; - /** - * - */ - protected $_obje = array(); + /** + * + */ + protected $_obje = array(); - /** - * - */ - protected $_sour = array(); + /** + * + */ + protected $_sour = array(); - /** - * - */ - protected $_note = array(); + /** + * + */ + protected $_note = array(); - /** - * - */ - public function addPhon($phon = []) - { - $this->_phon[] = $phon; - } + /** + * + */ + public function addPhon($phon = []) { + $this->_phon[] = $phon; + } - /** - * - */ - public function addObje($obje = []) - { - $this->_obje[] = $obje; - } + /** + * + */ + public function addObje($obje = []) { + $this->_obje[] = $obje; + } - /** - * - */ - public function addSour($sour = []) - { - $this->_sour[] = $sour; - } + /** + * + */ + public function addSour($sour = []) { + $this->_sour[] = $sour; + } - /** - * - */ - public function addNote($note = []) - { - $this->_note[] = $note; - } + /** + * + */ + public function addNote($note = []) { + $this->_note[] = $note; + } } diff --git a/library/PhpGedcom/Record/Head/Gedc.php b/library/PhpGedcom/Record/Head/Gedc.php index 14a6dd0b..0ebe7c77 100644 --- a/library/PhpGedcom/Record/Head/Gedc.php +++ b/library/PhpGedcom/Record/Head/Gedc.php @@ -7,7 +7,7 @@ * * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom + * @package php-gedcom * @license GPL-3.0 * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,15 +17,46 @@ /** * */ -class Gedc extends \PhpGedcom\Record -{ - /** - * - */ - protected $_vers = null; - - /** - * - */ - protected $_form = null; +class Gedc extends \PhpGedcom\Record { + /** + * + */ + protected $_vers = null; + + /** + * + */ + protected $_form = null; + + /** + * + * @return Gedc/version + */ + public function getVersion() { + return $this->_vers; + } + + /** + * + * @param Gedc/version + */ + public function setVersion($vers = []) { + $this->_vers = $vers; + } + + /** + * + * @return Gedc/form + */ + public function getForm() { + return $this->_form; + } + + /** + * + * @param Gedc/version + */ + public function setForm($form = []) { + $this->_form = $form; + } } diff --git a/library/PhpGedcom/Record/Head/Sour.php b/library/PhpGedcom/Record/Head/Sour.php index c3dfc6f6..739e6d8e 100644 --- a/library/PhpGedcom/Record/Head/Sour.php +++ b/library/PhpGedcom/Record/Head/Sour.php @@ -17,66 +17,94 @@ /** * */ -class Sour extends \PhpGedcom\Record -{ - /** - * - */ - protected $_sour = null; +class Sour extends \PhpGedcom\Record { + /** + * + */ + protected $_sour = null; - /** - * - */ - protected $_vers = null; + /** + * + */ + protected $_vers = null; - /** - * - */ - protected $_name = null; + /** + * + */ + protected $_name = null; - /** - * - */ - protected $_corp = null; + /** + * + */ + protected $_corp = null; - /** - * - */ - protected $_data = null; + /** + * + */ + protected $_data = null; - /** - * - * @param Sour\Corp $corp - */ - public function setCorp($corp = []) - { - $this->_corp = $corp; - } + /** + * + * @param Sour\Corp $corp + */ + public function setCorp($corp = []) { + $this->_corp = $corp; + } - /** - * - * @return Sour\Corp - */ - public function getCorp() - { - return $this->_corp; - } + /** + * + * @return Sour\Corp + */ + public function getCorp() { + return $this->_corp; + } - /** - * - * @param \PhpGedcom\Record\Head\Sour\Data $data - */ - public function setData($data = []) - { - $this->_data = $data; - } + /** + * + * @param \PhpGedcom\Record\Head\Sour\Data $data + */ + public function setData($data = []) { + $this->_data = $data; + } + + /** + * + * @return \PhpGedcom\Record\Head\Sour\Data + */ + public function getData() { + return $this->_data; + } + + /** + * + * @return Sour\Name + */ + public function getName() { + return $this->_name; + } + + /** + * + * @param Sour\Name + */ + public function setName($name = []) { + $this->_name = $name; + } + + /** + * + * @return Sour\Version + */ + public function getVersion() { + return $this->_vers; + } + + /** + * + * @param Sour\Version + */ + public function setVersion($version = []) { + $this->_vers = $version; + } - /** - * - * @return \PhpGedcom\Record\Head\Sour\Data - */ - public function getData() - { - return $this->_data; - } } diff --git a/library/PhpGedcom/Record/Indi.php b/library/PhpGedcom/Record/Indi.php index 16efa4dd..8bdea74c 100644 --- a/library/PhpGedcom/Record/Indi.php +++ b/library/PhpGedcom/Record/Indi.php @@ -24,633 +24,580 @@ * Class Indi * @package PhpGedcom\Record */ -class Indi extends Record implements Noteable, Objectable, Sourceable -{ - /** - * @var string - */ - protected $id; - - /** - * @var string - */ - protected $uid; - - /** - * @var string - */ - protected $chan; - - /** - * @var Indi\Attr[] - */ - protected $attr = array(); - - /** - * @var Indi\Even[] - */ - protected $even = array(); - - /** - * @var Indi\Note[] - */ - protected $note = array(); - - /** - * @var Obje[] - */ - protected $obje = array(); - - /** - * @var Sour[] - */ - protected $sour = array(); - - /** - * @var Indi\Name[] - */ - protected $name = array(); - - /** - * @var string[] - */ - protected $alia = array(); - - /** - * @var string - */ - protected $sex; - - /** - * @var string - */ - protected $rin; - - /** - * @var string - */ - protected $resn; - - /** - * @var string - */ - protected $rfn; - - /** - * @var string - */ - protected $afn; - - /** - * @var Indi\Fams[] - */ - protected $fams = array(); - - /** - * @var Indi\Famc[] - */ - protected $famc = array(); - - /** - * @var Indi\Asso[] - */ - protected $asso = array(); - - /** - * @var string[] - */ - protected $subm = array(); - - /** - * @var string[] - */ - protected $anci = array(); - - /** - * @var string[] - */ - protected $desi = array(); - - /** - * @var Refn[] - */ - 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 string $uid - * @return Indi - */ - public function setUid($uid = '') - { - $this->uid = $uid; - return $this; - } - - /** - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * @param Indi\Name $name - * @return Indi - */ - public function addName($name = []) - { - $this->name[] = $name; - return $this; - } - - /** - * @return Indi\Name[] - */ - public function getName() - { - return $this->name; - } - - /** - * @param Indi\Attr $attr - * @return Indi - */ - public function addAttr($attr = []) - { - $attrName = $attr->getType(); - - if (!array_key_exists($attrName, $this->attr)) { - $this->attr[$attrName] = []; - } - - $this->attr[$attrName][] = $attr; - return $this; - } - - /** - * @return array - */ - public function getAllAttr() - { - return $this->attr; - } - - /** - * @return Indi\Attr[] - */ - public function getAttr($key = '') - { - if(isset($this->attr[strtoupper($key)])) - return $this->attr[strtoupper($key)]; - } - - /** - * @param Indi\Even $even - * @return Indi - */ - public function addEven($even = []) - { - $evenName = $even->getType(); - - if (!array_key_exists($evenName, $this->even)) { - $this->even[$evenName] = []; - } - - $this->even[$evenName][] = $even; - return $this; - } - - /** - * @return array - */ - public function getAllEven() - { - return $this->even; - } - - /** - * @return array - */ - public function getEven($key = '') - { - if(isset($this->even[strtoupper($key)])) - return $this->even[strtoupper($key)]; - } - - /** - * @param Indi\Asso $asso - * @return Indi - */ - public function addAsso($asso = []) - { - $this->asso[] = $asso; - return $this; - } - - /** - * @return array - */ - public function getAsso() - { - return $this->asso; - } - - /** - * @param Refn $ref - * @return Indi - */ - public function addRefn($ref = []) - { - $this->refn[] = $ref; - return $this; - } - - /** - * @return Refn[] - */ - public function getRefn() - { - return $this->refn; - } - - /** - * @param NoteRef $note - * @return Indi - */ - public function addNote($note = []) - { - $this->note[] = $note; - return $this; - } - - /** - * @return array - */ - public function getNote() - { - return $this->note; - } - - /** - * @param ObjeRef $obje - * @return Indi - */ - public function addObje($obje = []) - { - $this->obje[] = $obje; - return $this; - } - - /** - * @return array - */ - public function getObje() - { - return $this->obje; - } - - /** - * @param SourRef $sour - * @return Indi - */ - public function addSour($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($famc = []) - { - $this->famc[] = $famc; - return $this; - } - - /** - * @return array - */ - public function getFamc() - { - return $this->famc; - } - - /** - * @param Indi\Fams $fams - * @return Indi - */ - public function addFams($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 string[] - */ - public function getAnci() - { - return $this->anci; - } - - /** - * @param string $subm - * @return Indi - */ - public function addDesi($subm = '') - { - $this->desi[] = $subm; - return $this; - } - - /** - * @return string[] - */ - public function getDesi() - { - return $this->desi; - } - - /** - * @param string $subm - * @return Indi - */ - public function addSubm($subm = '') - { - $this->subm[] = $subm; - return $this; - } - - /** - * @return string[] - */ - 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($bapl = []) - { - $this->bapl = $bapl; - return $this; - } - - /** - * @return Indi\Bapl - */ - public function getBapl() - { - return $this->bapl; - } - - /** - * @param Indi\Conl $conl - * @return Indi - */ - public function setConl($conl = []) - { - $this->conl = $conl; - return $this; - } - - /** - * @return Indi\Conl - */ - public function getConl() - { - return $this->conl; - } - - /** - * @param Indi\Endl $endl - * @return Indi - */ - public function setEndl($endl = []) - { - $this->endl = $endl; - return $this; - } - - /** - * @return Indi\Endl - */ - public function getEndl() - { - return $this->endl; - } - - /** - * @param Indi\Slgc $slgc - * @return Indi - */ - public function setSlgc($slgc = []) - { - $this->slgc = $slgc; - return $this; - } - - /** - * @return Indi\Slgc - */ - public function getSlgc() - { - return $this->slgc; - } +class Indi extends Record implements Noteable, Objectable, Sourceable { + /** + * @var string + */ + protected $id; + + /** + * @var string + */ + protected $uid; + + /** + * @var string + */ + protected $chan; + + /** + * @var Indi\Attr[] + */ + protected $attr = array(); + + /** + * @var Indi\Even[] + */ + protected $even = array(); + + /** + * @var Indi\Note[] + */ + protected $note = array(); + + /** + * @var Obje[] + */ + protected $obje = array(); + + /** + * @var Sour[] + */ + protected $sour = array(); + + /** + * @var Indi\Name[] + */ + protected $name = array(); + + /** + * @var string[] + */ + protected $alia = array(); + + /** + * @var string + */ + protected $sex; + + /** + * @var string + */ + protected $rin; + + /** + * @var string + */ + protected $resn; + + /** + * @var string + */ + protected $rfn; + + /** + * @var string + */ + protected $afn; + + /** + * @var Indi\Fams[] + */ + protected $fams = array(); + + /** + * @var Indi\Famc[] + */ + protected $famc = array(); + + /** + * @var Indi\Asso[] + */ + protected $asso = array(); + + /** + * @var string[] + */ + protected $subm = array(); + + /** + * @var string[] + */ + protected $anci = array(); + + /** + * @var string[] + */ + protected $desi = array(); + + /** + * @var Refn[] + */ + 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 string $uid + * @return Indi + */ + public function setUid($uid = '') { + $this->uid = $uid; + return $this; + } + + /** + * @return string + */ + public function getUid() { + return $this->uid; + } + + /** + * @param Indi\Name $name + * @return Indi + */ + public function addName($name = []) { + $this->name[] = $name; + return $this; + } + + /** + * @return Indi\Name[] + */ + public function getName() { + return $this->name; + } + + /** + * @param Indi\Attr $attr + * @return Indi + */ + public function addAttr($attr = []) { + $attrName = $attr->getType(); + + if (!array_key_exists($attrName, $this->attr)) { + $this->attr[$attrName] = []; + } + + $this->attr[$attrName][] = $attr; + return $this; + } + + /** + * @return Indi\Attr[] + */ + public function getAllAttr() { + return $this->attr; + } + /** + * @return Indi\Attr[] + */ + public function getAttr($key = '') { + if (isset($this->attr[strtoupper($key)])) { + return $this->attr[strtoupper($key)]; + } + + } + /** + * @param Indi\Even $even + * @return Indi + */ + public function addEven($even = []) { + $evenName = $even->getType(); + + if (!array_key_exists($evenName, $this->even)) { + $this->even[$evenName] = []; + } + + $this->even[$evenName][] = $even; + return $this; + } + + /** + * @return array + */ + public function getAllEven() { + return $this->even; + } + + /** + * @return array + */ + public function getEven($key = '') { + if (isset($this->even[strtoupper($key)])) { + return $this->even[strtoupper($key)]; + } + + } + + /** + * @param Indi\Asso $asso + * @return Indi + */ + public function addAsso($asso = []) { + $this->asso[] = $asso; + return $this; + } + + /** + * @return array + */ + public function getAsso() { + return $this->asso; + } + + /** + * @param Refn $ref + * @return Indi + */ + public function addRefn($ref = []) { + $this->refn[] = $ref; + return $this; + } + + /** + * @return Refn[] + */ + public function getRefn() { + return $this->refn; + } + + /** + * @param \PhpGedcom\Record\NoteRef $note + * @return Indi + */ + public function addNote($note = []) { + $this->note[] = $note; + return $this; + } + + /** + * @return array + */ + public function getNote() { + return $this->note; + } + + /** + * @param ObjeRef $obje + * @return Indi + */ + public function addObje($obje = []) { + $this->obje[] = $obje; + return $this; + } + + /** + * @return array + */ + public function getObje() { + return $this->obje; + } + + /** + * @param SourRef $sour + * @return Indi + */ + public function addSour($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($famc = []) { + $this->famc[] = $famc; + return $this; + } + + /** + * @return array + */ + public function getFamc() { + return $this->famc; + } + + /** + * @param Indi\Fams $fams + * @return Indi + */ + public function addFams($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 string[] + */ + public function getAnci() { + return $this->anci; + } + + /** + * @param string $subm + * @return Indi + */ + public function addDesi($subm = '') { + $this->desi[] = $subm; + return $this; + } + + /** + * @return string[] + */ + public function getDesi() { + return $this->desi; + } + + /** + * @param string $subm + * @return Indi + */ + public function addSubm($subm = '') { + $this->subm[] = $subm; + return $this; + } + + /** + * @return string[] + */ + 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($bapl = []) { + $this->bapl = $bapl; + return $this; + } + + /** + * @return Indi\Bapl + */ + public function getBapl() { + return $this->bapl; + } + + /** + * @param Indi\Conl $conl + * @return Indi + */ + public function setConl($conl = []) { + $this->conl = $conl; + return $this; + } + + /** + * @return Indi\Conl + */ + public function getConl() { + return $this->conl; + } + + /** + * @param Indi\Endl $endl + * @return Indi + */ + public function setEndl($endl = []) { + $this->endl = $endl; + return $this; + } + + /** + * @return Indi\Endl + */ + public function getEndl() { + return $this->endl; + } + + /** + * @param Indi\Slgc $slgc + * @return Indi + */ + public function setSlgc($slgc = []) { + $this->slgc = $slgc; + return $this; + } + + /** + * @return Indi\Slgc + */ + public function getSlgc() { + return $this->slgc; + } } diff --git a/library/PhpGedcom/Record/Indi/Name.php b/library/PhpGedcom/Record/Indi/Name.php index 47508b24..4cd3756b 100644 --- a/library/PhpGedcom/Record/Indi/Name.php +++ b/library/PhpGedcom/Record/Indi/Name.php @@ -15,41 +15,44 @@ namespace PhpGedcom\Record\Indi; /** - * + * @method string getName() + * @method string getNpfx() + * @method string getGivn() + * @method string getNick() + * @method string getSpfx() + * @method string getSurn() + * @method string getNsfx() */ -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; +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 $_note = array(); - /** - * - */ - protected $_sour = array(); + /** + * + */ + protected $_sour = array(); - /** - * - */ - public function addSour($sour = []) - { - $this->_sour[] = $sour; - } + /** + * + */ + public function addSour($sour = []) { + $this->_sour[] = $sour; + } - /** - * - */ - public function addNote($note = []) - { - $this->_note[] = $note; - } + /** + * + */ + public function addNote($note = []) { + $this->_note[] = $note; + } } diff --git a/library/PhpGedcom/Record/Repo.php b/library/PhpGedcom/Record/Repo.php index 8cd5fa08..0e3e0de6 100644 --- a/library/PhpGedcom/Record/Repo.php +++ b/library/PhpGedcom/Record/Repo.php @@ -20,189 +20,184 @@ * 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 = new Phon) - { - $this->phon[] = $phon; - return $this; - } - - /** - * @return array - */ - public function getPhon() - { - return $this->phon; - } - - /** - * @param Refn $refn - * @return Repo - */ - public function addRefn($refn = new Refn) - { - $this->refn[] = $refn; - return $this; - } - - /** - * @return array - */ - public function getRefn() - { - return $this->refn; - } - - /** - * @param NoteRef $note - * @return Repo - */ - public function addNote($note = new NoteRef) - { - $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 = new 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; - } +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 null|\PhpGedcom\Record\Phon $phons + * @return Repo + */ + public function addPhon($phon = null) { + if (empty($phon)) { + $phon = new \PhpGedcom\Record\Phon(); + } + $this->phon[] = $phon; + return $this; + } + + /** + * @return array + */ + public function getPhon() { + return $this->phon; + } + + /** + * @param null|\PhpGedcom\Record\Refn $refn + * @return Repo + */ + public function addRefn($refn = null) { + if (empty($refn)) { + $refn = new \PhpGedcom\Record\Refn(); + } + $this->refn[] = $refn; + return $this; + } + + /** + * @return array + */ + public function getRefn() { + return $this->refn; + } + + /** + * @param null|\PhpGedcom\Record\NoteRef $note + * @return Repo + */ + public function addNote($note = null) { + if (empty($node)) { + $note = new \PhpGedcom\Record\NoteRef(); + } + $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 null|\PhpGedcom\Record\Addr $addr + * @return Repo + */ + public function setAddr($addr = null) { + if (empty($addr)) { + $addr = new \PhpGedcom\Record\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/Subm.php b/library/PhpGedcom/Record/Subm.php index e71c447e..21eff443 100644 --- a/library/PhpGedcom/Record/Subm.php +++ b/library/PhpGedcom/Record/Subm.php @@ -20,222 +20,223 @@ * 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($phon = []) - { - $this->phon[] = $phon; - return $this; - } - - /** - * @return Addr - */ - public function getAddr() - { - return $this->addr; - } - - /** - * @param Addr $addr - * @return Subm - */ - public function setAddr($addr = []) - { - $this->addr = $addr; - return $this; - } - - /** - * @return array - */ - public function getObje() - { - return $this->obje; - } - - /** - * @param Record\ObjeRef $obje - * @return Subm - */ - public function addObje($obje = []) - { - $this->obje[] = $obje; - return $this; - } +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(); + + /** + * @var array + */ + protected $note = 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($phon = []) { + $this->phon[] = $phon; + return $this; + } + + /** + * @return Addr + */ + public function getAddr() { + return $this->addr; + } + + /** + * @param Addr $addr + * @return Subm + */ + public function setAddr($addr = []) { + $this->addr = $addr; + return $this; + } + + /** + * @return array + */ + public function getObje() { + return $this->obje; + } + + /** + * @param Record\ObjeRef $obje + * @return Subm + */ + public function addObje($obje = []) { + $this->obje[] = $obje; + return $this; + } + + /** + * @return array + */ + public function getNote() { + return $this->note; + } + + /** + * @param Record\Note $note + * @return Subm + */ + public function addNote($note = []) { + $this->note[] = $note; + return $this; + } } From bb775f4a1eb40fc403009e3171e604f30a8ed49c Mon Sep 17 00:00:00 2001 From: Tanguy Lesseliers Date: Mon, 13 Apr 2020 16:30:46 +0200 Subject: [PATCH 07/99] update of composer --- README.md | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 797a99e3..d4565af8 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ To install php-gedcom in your project using composer, simply add the following r { "require": { - "oguz463/php-gedcom": "1.0.*" + "tlesseli/php-gedcom": "1.0.*" } } diff --git a/composer.json b/composer.json index 81d3d2c8..6f6ced80 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "oguz463/php-gedcom", + "name": "tlesseli/php-gedcom", "description": "A GEDCOM file parser (read + write) for PHP 5.3+", "type": "library", "keywords": ["gedcom","parser"], From 5a2e7d1fc9d4f54ab2acd067895c0f0679cb69f6 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sun, 10 May 2020 12:54:20 +0000 Subject: [PATCH 08/99] Fix pull request merges --- library/PhpGedcom/Parser.php | 316 ------------------------- library/PhpGedcom/Parser/Indi/Even.php | 4 - 2 files changed, 320 deletions(-) diff --git a/library/PhpGedcom/Parser.php b/library/PhpGedcom/Parser.php index 171fe5d0..33e30196 100644 --- a/library/PhpGedcom/Parser.php +++ b/library/PhpGedcom/Parser.php @@ -17,322 +17,6 @@ /** * */ -<<<<<<< HEAD -class Parser -{ - /** - * - */ - protected $_file = null; - - /** - * - */ - protected $_gedcom = null; - - /** - * - */ - protected $_errorLog = array(); - - /** - * - */ - protected $_linesParsed = 0; - - /** - * - */ - protected $_line = ''; - - /** - * - */ - protected $_lineRecord = null; - - /** - * - */ - protected $_linePices = 0; - - /** - * - */ - 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)) { - if ($this->_linePieces == $pieces) { - return $this->_lineRecord; - } - } - - if (empty($this->_line)) { - return false; - } - - $line = trim($this->_line); - - $this->_lineRecord = array_pad(explode(' ', $line, $pieces), 3, ''); - $this->_linePieces = $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): - if(isset($record[1])) - $identifier = $this->normalizeIdentifier($record[1]); - - - if (isset($record[1]) && 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 (isset($record[1]) && trim($record[1]) == 'TRLR') { - // EOF - break; - } else { - $this->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - } else { - $this->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $this->forward(); - } - - return $this->getGedcom(); - } -======= class Parser { /** * diff --git a/library/PhpGedcom/Parser/Indi/Even.php b/library/PhpGedcom/Parser/Indi/Even.php index 4e6480cd..f09136c1 100644 --- a/library/PhpGedcom/Parser/Indi/Even.php +++ b/library/PhpGedcom/Parser/Indi/Even.php @@ -47,16 +47,12 @@ public static function parse(\PhpGedcom\Parser $parser) { $even->setType(trim($record[1])); } -<<<<<<< HEAD // ensures we capture any data following the EVEN type if (isset($record[2]) && !empty($record[2])) { $even->setAttr(trim($record[2])); } $parser->forward(); -======= - $parser->forward(); ->>>>>>> origin/pr/5 while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); From 6d00ec947a684b2a2e99f87c41e630b021446807 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sun, 10 May 2020 12:55:24 +0000 Subject: [PATCH 09/99] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d4565af8..5e24791d 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ To install php-gedcom in your project using composer, simply add the following r { "require": { - "tlesseli/php-gedcom": "1.0.*" + "modularsoftware/php-gedcom": "1.0.*" } } From 79754525659b2d7bc7a2571339e52ca87eccef98 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sun, 10 May 2020 12:56:01 +0000 Subject: [PATCH 10/99] Update composer --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6f6ced80..758a2bc8 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "tlesseli/php-gedcom", + "name": "modularsoftware/php-gedcom", "description": "A GEDCOM file parser (read + write) for PHP 5.3+", "type": "library", "keywords": ["gedcom","parser"], From 08508878df7d472d2993f22a02c212cc42988f80 Mon Sep 17 00:00:00 2001 From: jyyblue Date: Tue, 16 Jun 2020 15:12:19 -0700 Subject: [PATCH 11/99] finish Writer/Indi Sub writer Indi/Even --- library/PhpGedcom/Parser.php | 3 +- library/PhpGedcom/Parser/Indi.php | 3 +- library/PhpGedcom/Record/Repo.php | 188 ---------------- library/PhpGedcom/Writer/Addr.php | 12 +- library/PhpGedcom/Writer/Indi.php | 238 ++++++++++++++++++++ library/PhpGedcom/Writer/Indi/Attr.php | 32 +++ library/PhpGedcom/Writer/Indi/Even.php | 105 +++++++++ library/PhpGedcom/Writer/Indi/Even/Plac.php | 66 ++++++ library/PhpGedcom/Writer/NoteRef.php | 48 ++++ library/PhpGedcom/Writer/Sour/Data.php | 72 ++++++ library/PhpGedcom/Writer/Sour/Data/Even.php | 48 ++++ library/PhpGedcom/Writer/SourRef.php | 74 ++++++ library/PhpGedcom/Writer/SourRef/Even.php | 50 ++++ 13 files changed, 742 insertions(+), 197 deletions(-) create mode 100644 library/PhpGedcom/Writer/Indi.php create mode 100644 library/PhpGedcom/Writer/Indi/Attr.php create mode 100644 library/PhpGedcom/Writer/Indi/Even.php create mode 100644 library/PhpGedcom/Writer/Indi/Even/Plac.php create mode 100644 library/PhpGedcom/Writer/NoteRef.php create mode 100644 library/PhpGedcom/Writer/Sour/Data.php create mode 100644 library/PhpGedcom/Writer/Sour/Data/Even.php create mode 100644 library/PhpGedcom/Writer/SourRef.php create mode 100644 library/PhpGedcom/Writer/SourRef/Even.php diff --git a/library/PhpGedcom/Parser.php b/library/PhpGedcom/Parser.php index 33e30196..4c9554ab 100644 --- a/library/PhpGedcom/Parser.php +++ b/library/PhpGedcom/Parser.php @@ -315,5 +315,4 @@ public function parse($fileName) { return $this->getGedcom(); } ->>>>>>> origin/pr/5 -} +} \ No newline at end of file diff --git a/library/PhpGedcom/Parser/Indi.php b/library/PhpGedcom/Parser/Indi.php index 9cd5f41b..ec10555e 100644 --- a/library/PhpGedcom/Parser/Indi.php +++ b/library/PhpGedcom/Parser/Indi.php @@ -77,7 +77,8 @@ public static function parse(\PhpGedcom\Parser $parser) { $indi->setAfn(trim($record[2])); break; case 'CHAN': - $chan = \PhpGedcom\Parser\Chan::parse($parser); + // $chan = \PhpGedcom\Parser\Chan::parse($parser); + $chan =isset($record[2]) ? trim($record[2]) : ''; $indi->setChan($chan); break; case 'FAMS': diff --git a/library/PhpGedcom/Record/Repo.php b/library/PhpGedcom/Record/Repo.php index 0d625914..0e3e0de6 100644 --- a/library/PhpGedcom/Record/Repo.php +++ b/library/PhpGedcom/Record/Repo.php @@ -20,193 +20,6 @@ * Class Repo * @package PhpGedcom\Record */ -<<<<<<< HEAD -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) - { - $this->phon[] = $phon; - return $this; - } - - /** - * @return array - */ - public function getPhon() - { - return $this->phon; - } - - /** - * @param Refn $refn - * @return Repo - */ - public function addRefn($refn) - { - $this->refn[] = $refn; - return $this; - } - - /** - * @return array - */ - public function getRefn() - { - return $this->refn; - } - - /** - * @param NoteRef $note - * @return Repo - */ - public function addNote($note = array()) - { - $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; - } -======= class Repo extends Record implements Noteable { /** * @var string @@ -387,5 +200,4 @@ public function setChan($chan = []) { public function getChan() { return $this->chan; } ->>>>>>> origin/pr/5 } diff --git a/library/PhpGedcom/Writer/Addr.php b/library/PhpGedcom/Writer/Addr.php index 200272f3..9191a43e 100644 --- a/library/PhpGedcom/Writer/Addr.php +++ b/library/PhpGedcom/Writer/Addr.php @@ -27,7 +27,7 @@ class Addr */ public static function convert(\PhpGedcom\Record\Addr &$addr, $format = self::GEDCOM55, $level = 1) { - $addrs = explode("\n", $addr->addr); + $addrs = explode("\n", $addr->getAddr()); $output = "{$level} ADDR " . $addrs[0] . "\n"; @@ -38,11 +38,11 @@ public static function convert(\PhpGedcom\Record\Addr &$addr, $format = self::GE } $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"; + ($level+1) . " ADR2 " . $addr->getAdr2() . "\n" . + ($level+1) . " CITY " . $addr->getCity() . "\n" . + ($level+1) . " STAE " . $addr->getStae() . "\n" . + ($level+1) . " POST " . $addr->getPost() . "\n" . + ($level+1) . " CTRY " . $addr->getCtry() . "\n"; return $output; } diff --git a/library/PhpGedcom/Writer/Indi.php b/library/PhpGedcom/Writer/Indi.php new file mode 100644 index 00000000..d73a855a --- /dev/null +++ b/library/PhpGedcom/Writer/Indi.php @@ -0,0 +1,238 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer; + +/** + * + */ +class Indi +{ + /** + * @param \PhpGedcom\Record\Indi $indi + * @param string $format + * @return string + */ + public static function convert(\PhpGedcom\Record\Indi &$indi, $format = self::GEDCOM55) + { + $level = 0; + + // id + $id = $indi->getId(); + $output = $level." @".$id."@ INDI\n"; + + // increase level after start indi + $level++; + + // name + // $name = $indi->getName(); + // if(!empty($name)){ + // $output.=$level." NAME ".$name."\n"; + // } + + // chan + $chan = $indi->getChan(); + if(!empty($chan)){ + $output .= $level." CHAN ".$chan."\n"; + } + + // $attr + // PhpGedcom/Record/Attr extend PhpGedcom/Record/Even and there is no change. + // So used convert Even + $attr = $indi->getAttr(); + if(!empty($attr) && count($attr) > 0){ + foreach($attr as $item){ + $_convert = \PhpGedcom\Writer\Indi\Even::convert($item, $level); + $output.=$_convert; + } + } + + // $even + $even = $indi->getEven(); + if(!empty($even) && count($even) > 0){ + foreach($even as $item){ + $_convert = \PhpGedcom\Writer\Indi\Even::convert($item, $level); + $output.=$_convert; + } + } + + // $note + $note = $indi->getNote(); + if(!empty($note) && count($note) > 0){ + foreach($note as $item){ + $_convert = \PhpGedcom\Writer\Indi\Note::convert($item, $level); + $output.=$_convert; + } + } + + // $obje + $obje = $indi->getObje(); + if(!empty($obje) && count($obje) > 0){ + foreach($obje as $item){ + $_convert = \PhpGedcom\Writer\Indi\Obje::convert($item, $level); + $output.=$_convert; + } + } + + // $sour + $sour = $indi->getSour(); + if(!empty($sour) && count($sour) > 0){ + foreach($sour as $item){ + $_convert = \PhpGedcom\Writer\Indi\Sour::convert($item, $level); + $output.=$_convert; + } + } + + // $name + $name = $indi->getName(); + if(!empty($name) && count($name) > 0){ + foreach($name as $item){ + $_convert = \PhpGedcom\Writer\Indi\Name::convert($item, $level); + $output.=$_convert; + } + } + + // $alia + $alia = $indi->getAlia(); + if(!empty($alia) && count($alia) > 0){ + foreach($alia as $item){ + $_convert = \PhpGedcom\Writer\Indi\Alia::convert($item, $level); + $output.=$_convert; + } + } + + // $sex + $sex = $indi->getSex(); + if(!empty($sex)){ + $output .= $level." SEX ".$sex."\n"; + } + + // $rin + $rin = $indi->getRin(); + if(!empty($rin)){ + $output .= $level." RIN ".$rin."\n"; + } + + // $resn + $resn = $indi->getResn(); + if(!empty($resn)){ + $output .= $level." RESN ".$resn."\n"; + } + + // $rfn + $rfn = $indi->getRfn(); + if(!empty($rfn)){ + $output .= $level." RFN ".$rfn."\n"; + } + + // $afn + $afn = $indi->getAfn(); + if(!empty($afn)){ + $output .= $level." AFN ".$afn."\n"; + } + + // Fams[] + $fams = $indi->getFams(); + if(!empty($fams) && count($fams) > 0){ + foreach($fams as $item){ + $_convert = \PhpGedcom\Writer\Indi\Fams::convert($item, $level); + $output.=$_convert; + } + } + + // Famc[] + $famc = $indi->getFamc(); + if(!empty($famc) && count($famc) > 0){ + foreach($famc as $item){ + $_convert = \PhpGedcom\Writer\Indi\Famc::convert($item, $level); + $output.=$_convert; + } + } + + // Asso[] + $asso = $indi->getAsso(); + if(!empty($asso) && count($asso) > 0){ + foreach($asso as $item){ + $_convert = \PhpGedcom\Writer\Indi\Asso::convert($item, $level); + $output.=$_convert; + } + } + + // $subm + $subm = $indi->getSubm(); + if(!empty($subm) && count($subm) > 0){ + foreach($subm as $item){ + $_convert = \PhpGedcom\Writer\Indi\Subm::convert($item, $level); + $output.=$_convert; + } + } + + // $anci + $anci = $indi->getAnci(); + if(!empty($anci) && count($anci) > 0){ + foreach($subm as $item){ + $_convert = \PhpGedcom\Writer\Indi\Anci::convert($item, $level); + $output.=$_convert; + } + } + + // $desi + $desi = $indi->getDesi(); + if(!empty($desi) && count($desi) > 0){ + foreach($subm as $item){ + $_convert = \PhpGedcom\Writer\Indi\Desi::convert($item, $level); + $output.=$_convert; + } + } + + // Refn[] + $refn = $indi->getRefn(); + if(!empty($refn) && count($refn) > 0){ + foreach($subm as $item){ + $_convert = \PhpGedcom\Writer\Indi\Refn::convert($item, $level); + $output.=$_convert; + } + } + + // Bapl + $bapl = $indi->getBapl(); + if(!empty($bapl)){ + $_convert = \PhpGedcom\Writer\Indi\Bapl::convert($bapl, $level); + $output.=$_convert; + } + + // Conl + $conl = $indi->getConl(); + if(!empty($conl)){ + $_convert = \PhpGedcom\Writer\Indi\Conl::convert($conl, $level); + $output.=$_convert; + } + + // Endl + $endl = $indi->getEndl(); + if(!empty($endl)){ + $_convert = \PhpGedcom\Writer\Indi\Endl::convert($endl, $level); + $output.=$_convert; + } + + // Slgc + $slgc = $indi->getSlgc(); + if(!empty($slgc)){ + $_convert = \PhpGedcom\Writer\Indi\Slgc::convert($slgc, $level); + $output.=$_convert; + } + + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Indi/Attr.php b/library/PhpGedcom/Writer/Indi/Attr.php new file mode 100644 index 00000000..e262344b --- /dev/null +++ b/library/PhpGedcom/Writer/Indi/Attr.php @@ -0,0 +1,32 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer\Indi; + +/** + * + */ +class Attr +{ + /** + * @param \PhpGedcom\Record\Indi\Attr $attr + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Indi\Attr &$attr, $level = 0) + { + $output = ''; + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Indi/Even.php b/library/PhpGedcom/Writer/Indi/Even.php new file mode 100644 index 00000000..a2647552 --- /dev/null +++ b/library/PhpGedcom/Writer/Indi/Even.php @@ -0,0 +1,105 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer\Indi; + +/** + * + */ +class Even +{ + /** + * @param \PhpGedcom\Record\Indi\Even $even + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Indi\Even &$even, $level = 0) + { + $output = ""; + + // $_attr; + $attr = $even->getAttr(); + if(!empty($attr)){ + $output.=$level." EVEN ".$attr."\n"; + }else{ + $output = $level." EVEN\n"; + } + $level++; + + // $type; + $type = $even->getType(); + if(!empty($type)){ + $output.=$level." TYPE ".$type."\n"; + } + + // $date; + $date = $even->getDate(); + if(!empty($date)){ + $output.=$level." DATE ".$date."\n"; + } + + // Plac + $plac = $even->getPlac(); + if(!empty($plac)){ + $_convert = \PhpGedcom\Writer\Indi\Even\Plac::convert($plac, $level); + $output.=$_convert; + } + + // $caus; + $caus = $even->getCaus(); + if(!empty($caus)){ + $output.=$level." CAUS ".$caus."\n"; + } + + // $age; + $age = $even->getAge(); + if(!empty($age)){ + $output.=$level." AGE ".$age."\n"; + } + + // $addr + $addr = $even->getAddr(); + if(!empty($addr)){ + $_convert = \PhpGedcom\Writer\Addr::convert($addr, $level); + $output.=$_convert; + } + + // $phon = array() + $phon = $even->getPhon(); + if(!empty($phon) && count($phon) > 0){ + foreach($phon as $item){ + $_convert = \PhpGedcom\Writer\Phon::convert($item, $level); + $output.=$_convert; + } + } + // $agnc + $agnc = $even->getAgnc(); + if(!empty($agnc)){ + $output.=$level." AGNC ".$agnc."\n"; + } + + // $ref = array(); + // This is not in parser + + // $obje = array(); + + // $sour = array(); + + // $note = array(); + + // Record\Chan + + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Indi/Even/Plac.php b/library/PhpGedcom/Writer/Indi/Even/Plac.php new file mode 100644 index 00000000..91dc391f --- /dev/null +++ b/library/PhpGedcom/Writer/Indi/Even/Plac.php @@ -0,0 +1,66 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer\Indi; + +/** + * + */ +class Plac +{ + /** + * @param \PhpGedcom\Record\Indi\Even\Plac $plac + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Indi\Even\Plac &$plac, $level = 0) + { + $output = ''; + + // $plac + $_plac = $plac->getPlac(); + if(!empty($_plac)){ + $output .= $level." PLAC ".$_plac."\n"; + }else{ + $output .= $level." PLAC\n"; + } + + // level up + $level++; + + // $form + $form = $plac->getForm(); + if(!empty($form)){ + $output .= $level." FORM ".$form."\n"; + } + + // $note -array + $note = $plac->getNote(); + if($note && count($note) > 0){ + foreach($note as $item){ + $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); + $output.= $_convert; + } + } + // $sour -array + $sour = $plac->getSour(); + if($sour && count($sour) > 0){ + foreach($sour as $item){ + $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); + $output.= $_convert; + } + } + return $output; + } +} diff --git a/library/PhpGedcom/Writer/NoteRef.php b/library/PhpGedcom/Writer/NoteRef.php new file mode 100644 index 00000000..ae4b52ee --- /dev/null +++ b/library/PhpGedcom/Writer/NoteRef.php @@ -0,0 +1,48 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer; + +/** + * + */ +class NoteRef +{ + /** + * @param \PhpGedcom\Record\NoteRef $note + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\NoteRef &$note, $level) + { + $output = ""; + + // $_note + $_note = $note->getNote(); + if(!empty($_note)){ + $output.=$level." NOTE ".$_note."\n"; + } + + $level++; + // $sour + $sour = $note->getSour(); + if($sour && count($sour) > 0){ + foreach($sour as $item){ + $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); + $output.=$_convert; + } + } + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Sour/Data.php b/library/PhpGedcom/Writer/Sour/Data.php new file mode 100644 index 00000000..327748c2 --- /dev/null +++ b/library/PhpGedcom/Writer/Sour/Data.php @@ -0,0 +1,72 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer\Sour; + +/** + * + */ +class Data +{ + /** + * @param \PhpGedcom\Record\Sour\Data $data + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Sour\Data &$data, $level = 0) + { + $output = ""; + + $output = $level." DATA\n"; + $level++; + + // $_date; + $date = $data->getDate(); + if(!empty($date)){ + $output.=$level." DATE ".$date."\n"; + } + + // $_agnc AGNC + $_agnc = $data->getAgnc(); + if(!empty($_agnc)){ + $output.=$level." AGNC ".$_agnc."\n"; + } + + // $_text + $_text = $data->getText(); + if(!empty($_text)){ + $output.=$level." TEXT ".$_text."\n"; + } + + // $_note + $note = $data->getNote(); + if($note && count($note) > 0){ + foreach($note as $item){ + $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); + $output.= $_convert; + } + } + + // $_even + $_even = $data->getEven(); + if($_even && count($_even) > 0){ + foreach($_even as $item){ + $_convert = \PhpGedcom\Writer\Sour\Data\Even::convert($item, $level); + $output.= $_convert; + } + } + + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Sour/Data/Even.php b/library/PhpGedcom/Writer/Sour/Data/Even.php new file mode 100644 index 00000000..9dd0a64e --- /dev/null +++ b/library/PhpGedcom/Writer/Sour/Data/Even.php @@ -0,0 +1,48 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer\Sour\Data; + +/** + * + */ +class Even +{ + /** + * @param \PhpGedcom\Record\Sour\Data\Even $even + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Sour\Data\Even &$even, $level) + { + $output = ""; + + $output = $level." EVEN\n"; + $level++; + + // $date; + $date = $even->getDate(); + if(!empty($date)){ + $output.=$level." DATE ".$date."\n"; + } + + // Plac + $plac = $even->getPlac(); + if(!empty($plac)){ + $output.=$level." PLAC ".$plac."\n"; + } + + return $output; + } +} diff --git a/library/PhpGedcom/Writer/SourRef.php b/library/PhpGedcom/Writer/SourRef.php new file mode 100644 index 00000000..a58f833d --- /dev/null +++ b/library/PhpGedcom/Writer/SourRef.php @@ -0,0 +1,74 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer; + +/** + * + */ +class SourRef +{ + /** + * @param \PhpGedcom\Record\SourRef $sour + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\SourRef &$sour, $level) + { + $output = ""; + $_sour = $sour->getSour(); + if(!empty($_sour)){ + $output.=$level." SOUR ".$_sour."\n"; + } + $level++; + // protected $_text = null; + $_text = $sour->getText(); + if(!empty($_text)){ + $output.=$level." TEXT ".$_text."\n"; + } + // protected $_note = array(); + $note = $sour->getNote(); + if($note && count($note) > 0){ + foreach($note as $item){ + $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); + $output.= $_convert; + } + } + // protected $_data = null; + $_data = $sour->getData(); + if($_data){ + $_convert = \PhpGedcom\Writer\Sour\Data::convert($_data, $level); + $output.= $_convert; + } + // protected $_page setPage + $_page = $sour->getPage(); + if(!empty($_page)){ + $output.=$level." PAGE ".$_page."\n"; + } + // protected $_even = null; + $_even = $sour->getData(); + if($_even){ + $_convert = \PhpGedcom\Writer\SourRef\Even::convert($_even, $level); + $output.= $_convert; + } + // protected $_quay + $_quay = $sour->getQuay(); + if(!empty($_quay)){ + $output.=$level." QUAY ".$_quay."\n"; + } + // protected $_obje = array(); + // This is not defined in parser. + return $output; + } +} diff --git a/library/PhpGedcom/Writer/SourRef/Even.php b/library/PhpGedcom/Writer/SourRef/Even.php new file mode 100644 index 00000000..484cd1f1 --- /dev/null +++ b/library/PhpGedcom/Writer/SourRef/Even.php @@ -0,0 +1,50 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer\SourRef; + +/** + * + */ +class Even +{ + /** + * @param \PhpGedcom\Record\SourRef\Even $even + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\SourRef\Even &$even, $level = 0) + { + $output = ""; + + // $_date; + $_even = $even->getEven(); + if(!empty($_even)){ + $output.=$level." EVEN ".$_even."\n"; + }else{ + $output = $level." EVEN\n"; + } + // level up + $level++; + + + // $_role ROLE + $_role = $data->getRole(); + if(!empty($_role)){ + $output.=$level." ROLE ".$_role."\n"; + } + + return $output; + } +} From feadb71bbfc19d0e8f4d84afff9303af690425ce Mon Sep 17 00:00:00 2001 From: jyyblue Date: Wed, 17 Jun 2020 00:14:28 -0700 Subject: [PATCH 12/99] complete indi/event --- library/PhpGedcom/Writer/Chan.php | 52 ++++++++++++++++++++ library/PhpGedcom/Writer/Indi/Even.php | 30 ++++++++++-- library/PhpGedcom/Writer/ObjeRef.php | 68 ++++++++++++++++++++++++++ 3 files changed, 146 insertions(+), 4 deletions(-) create mode 100644 library/PhpGedcom/Writer/Chan.php create mode 100644 library/PhpGedcom/Writer/ObjeRef.php diff --git a/library/PhpGedcom/Writer/Chan.php b/library/PhpGedcom/Writer/Chan.php new file mode 100644 index 00000000..f5754261 --- /dev/null +++ b/library/PhpGedcom/Writer/Chan.php @@ -0,0 +1,52 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer; + +/** + * + */ +class Chan +{ + /** + * @param \PhpGedcom\Record\Chan $note + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Chan &$chan, $level) + { + $output.=$level." CHAN \n"; + // level up + $level++; + // DATE + $_date = $chan->getDate(); + if(!empty($_date)){ + $output.=$level." DATE ".$_date."\n"; + } + // TIME + $_time = $chan->getDate(); + if(!empty($_time)){ + $output.=$level." DATE ".$_time."\n"; + } + // $_note = array() + $_note = $chan->getNote(); + if(!empty($_note) && count($_note) > 0){ + foreach($_note as $item){ + $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); + $output.=$_convert; + } + } + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Indi/Even.php b/library/PhpGedcom/Writer/Indi/Even.php index a2647552..2b2cf81a 100644 --- a/library/PhpGedcom/Writer/Indi/Even.php +++ b/library/PhpGedcom/Writer/Indi/Even.php @@ -93,13 +93,35 @@ public static function convert(\PhpGedcom\Record\Indi\Even &$even, $level = 0) // This is not in parser // $obje = array(); - + $obje = $even->getObje(); + if(!empty($obje) && count($obje) > 0){ + foreach($obje as $item){ + $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); + $output.=$_convert; + } + } // $sour = array(); - + $sour = $even->getSour(); + if(!empty($sour) && count($sour) > 0){ + foreach($sour as $item){ + $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); + $output.=$_convert; + } + } // $note = array(); - + $note = $even->getSour(); + if(!empty($note) && count($note) > 0){ + foreach($note as $item){ + $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); + $output.=$_convert; + } + } // Record\Chan - + $chan = $even->getChan(); + if(!empty($chan) ){ + $_convert = \PhpGedcom\Writer\Chan::convert($item, $level); + $output.=$_convert; + } return $output; } } diff --git a/library/PhpGedcom/Writer/ObjeRef.php b/library/PhpGedcom/Writer/ObjeRef.php new file mode 100644 index 00000000..54d0e193 --- /dev/null +++ b/library/PhpGedcom/Writer/ObjeRef.php @@ -0,0 +1,68 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer; + +/** + * + */ +class ObjeRef +{ + /** + * @param \PhpGedcom\Record\ObjeRef $note + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\ObjeRef &$obje, $level) + { + $output = ""; + + // $_note + $_obje = $obje->getObje(); + if(!empty($_note)){ + $output.=$level." OBJE ".$_obje."\n"; + }else{ + $output.=$level." OBJE \n"; + } + + $level++; + // _form + $_form = $obje->getForm(); + if(!empty($_form)){ + $output.=$level." FORM ".$_form."\n"; + } + + // _titl + $_titl = $obje->getTitl(); + if(!empty($_titl)){ + $output.=$level." TITL ".$_titl."\n"; + } + + // _file + $_file = $obje->getFile(); + if(!empty($_file)){ + $output.=$level." FILE ".$_file."\n"; + } + + // $_note = array() + $_note = $obje->getNote(); + if(!empty($_note) && count($_note) > 0){ + foreach($_note as $item){ + $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); + $output.=$_convert; + } + } + return $output; + } +} From d398595e00b543d2a2e72f87672136fb9fcc8f45 Mon Sep 17 00:00:00 2001 From: jyyblue Date: Wed, 17 Jun 2020 01:22:25 -0700 Subject: [PATCH 13/99] complete indi and realted writer --- library/PhpGedcom/Writer/Chan.php | 2 +- library/PhpGedcom/Writer/Indi.php | 75 ++++++++++++---------- library/PhpGedcom/Writer/Indi/Asso.php | 64 ++++++++++++++++++ library/PhpGedcom/Writer/Indi/Famc.php | 56 ++++++++++++++++ library/PhpGedcom/Writer/Indi/Fams.php | 50 +++++++++++++++ library/PhpGedcom/Writer/Indi/Name.php | 89 ++++++++++++++++++++++++++ library/PhpGedcom/Writer/Refn.php | 47 ++++++++++++++ 7 files changed, 349 insertions(+), 34 deletions(-) create mode 100644 library/PhpGedcom/Writer/Indi/Asso.php create mode 100644 library/PhpGedcom/Writer/Indi/Famc.php create mode 100644 library/PhpGedcom/Writer/Indi/Fams.php create mode 100644 library/PhpGedcom/Writer/Indi/Name.php create mode 100644 library/PhpGedcom/Writer/Refn.php diff --git a/library/PhpGedcom/Writer/Chan.php b/library/PhpGedcom/Writer/Chan.php index f5754261..29c7fd39 100644 --- a/library/PhpGedcom/Writer/Chan.php +++ b/library/PhpGedcom/Writer/Chan.php @@ -26,7 +26,7 @@ class Chan */ public static function convert(\PhpGedcom\Record\Chan &$chan, $level) { - $output.=$level." CHAN \n"; + $output = $level." CHAN \n"; // level up $level++; // DATE diff --git a/library/PhpGedcom/Writer/Indi.php b/library/PhpGedcom/Writer/Indi.php index d73a855a..06cffc4b 100644 --- a/library/PhpGedcom/Writer/Indi.php +++ b/library/PhpGedcom/Writer/Indi.php @@ -68,10 +68,11 @@ public static function convert(\PhpGedcom\Record\Indi &$indi, $format = self::GE } // $note + $note = $indi->getNote(); if(!empty($note) && count($note) > 0){ foreach($note as $item){ - $_convert = \PhpGedcom\Writer\Indi\Note::convert($item, $level); + $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); $output.=$_convert; } } @@ -80,7 +81,7 @@ public static function convert(\PhpGedcom\Record\Indi &$indi, $format = self::GE $obje = $indi->getObje(); if(!empty($obje) && count($obje) > 0){ foreach($obje as $item){ - $_convert = \PhpGedcom\Writer\Indi\Obje::convert($item, $level); + $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); $output.=$_convert; } } @@ -89,7 +90,7 @@ public static function convert(\PhpGedcom\Record\Indi &$indi, $format = self::GE $sour = $indi->getSour(); if(!empty($sour) && count($sour) > 0){ foreach($sour as $item){ - $_convert = \PhpGedcom\Writer\Indi\Sour::convert($item, $level); + $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); $output.=$_convert; } } @@ -107,8 +108,10 @@ public static function convert(\PhpGedcom\Record\Indi &$indi, $format = self::GE $alia = $indi->getAlia(); if(!empty($alia) && count($alia) > 0){ foreach($alia as $item){ - $_convert = \PhpGedcom\Writer\Indi\Alia::convert($item, $level); - $output.=$_convert; + if(!empty($item)){ + $_convert = $level." ALIA ".$item."\n"; + $output.=$_convert; + } } } @@ -173,16 +176,18 @@ public static function convert(\PhpGedcom\Record\Indi &$indi, $format = self::GE $subm = $indi->getSubm(); if(!empty($subm) && count($subm) > 0){ foreach($subm as $item){ - $_convert = \PhpGedcom\Writer\Indi\Subm::convert($item, $level); - $output.=$_convert; + if(!empty($item)){ + $_convert = $level." SUBM ".$item."\n"; + $output.=$_convert; + } } } // $anci $anci = $indi->getAnci(); if(!empty($anci) && count($anci) > 0){ - foreach($subm as $item){ - $_convert = \PhpGedcom\Writer\Indi\Anci::convert($item, $level); + foreach($anci as $item){ + $_convert = $level." ANCI ".$item."\n"; $output.=$_convert; } } @@ -190,8 +195,8 @@ public static function convert(\PhpGedcom\Record\Indi &$indi, $format = self::GE // $desi $desi = $indi->getDesi(); if(!empty($desi) && count($desi) > 0){ - foreach($subm as $item){ - $_convert = \PhpGedcom\Writer\Indi\Desi::convert($item, $level); + foreach($desi as $item){ + $_convert = $level." DESI ".$item."\n"; $output.=$_convert; } } @@ -199,39 +204,43 @@ public static function convert(\PhpGedcom\Record\Indi &$indi, $format = self::GE // Refn[] $refn = $indi->getRefn(); if(!empty($refn) && count($refn) > 0){ - foreach($subm as $item){ - $_convert = \PhpGedcom\Writer\Indi\Refn::convert($item, $level); + foreach($refn as $item){ + $_convert = \PhpGedcom\Writer\Refn::convert($item, $level); $output.=$_convert; } } // Bapl - $bapl = $indi->getBapl(); - if(!empty($bapl)){ - $_convert = \PhpGedcom\Writer\Indi\Bapl::convert($bapl, $level); - $output.=$_convert; - } + // Currently Bapl is empty + // $bapl = $indi->getBapl(); + // if(!empty($bapl)){ + // $_convert = \PhpGedcom\Writer\Indi\Bapl::convert($bapl, $level); + // $output.=$_convert; + // } // Conl - $conl = $indi->getConl(); - if(!empty($conl)){ - $_convert = \PhpGedcom\Writer\Indi\Conl::convert($conl, $level); - $output.=$_convert; - } + // Currently Conl is empty + // $conl = $indi->getConl(); + // if(!empty($conl)){ + // $_convert = \PhpGedcom\Writer\Indi\Conl::convert($conl, $level); + // $output.=$_convert; + // } // Endl - $endl = $indi->getEndl(); - if(!empty($endl)){ - $_convert = \PhpGedcom\Writer\Indi\Endl::convert($endl, $level); - $output.=$_convert; - } + // Currently Endl is empty + // $endl = $indi->getEndl(); + // if(!empty($endl)){ + // $_convert = \PhpGedcom\Writer\Indi\Endl::convert($endl, $level); + // $output.=$_convert; + // } // Slgc - $slgc = $indi->getSlgc(); - if(!empty($slgc)){ - $_convert = \PhpGedcom\Writer\Indi\Slgc::convert($slgc, $level); - $output.=$_convert; - } + // Currently Endl is empty + // $slgc = $indi->getSlgc(); + // if(!empty($slgc)){ + // $_convert = \PhpGedcom\Writer\Indi\Slgc::convert($slgc, $level); + // $output.=$_convert; + // } return $output; } diff --git a/library/PhpGedcom/Writer/Indi/Asso.php b/library/PhpGedcom/Writer/Indi/Asso.php new file mode 100644 index 00000000..837050ba --- /dev/null +++ b/library/PhpGedcom/Writer/Indi/Asso.php @@ -0,0 +1,64 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer\Indi; + +/** + * + */ +class Asso +{ + /** + * @param \PhpGedcom\Record\Indi\Asso $attr + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Indi\Asso &$asso, $level = 0) + { + $output = ''; + // _indi + $_indi = $asso->getIndi(); + if(empty($_indi)){ + return $output; + } + $output.= $level." ASSO ".$_indi."\n"; + // level up + $level++; + + // RELA + $rela = $asso->getRela(); + if(!empty($rela)){ + $output.=$level." RELA ".$rela."\n"; + } + // sour + $sour = $asso->getSour(); + if(!empty($sour) && count($sour) > 0){ + foreach($sour as $item){ + $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); + $output.=$_convert; + } + } + + // note + $note = $asso->getSour(); + if(!empty($note) && count($note) > 0){ + foreach($note as $item){ + $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); + $output.=$_convert; + } + } + + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Indi/Famc.php b/library/PhpGedcom/Writer/Indi/Famc.php new file mode 100644 index 00000000..2145e9da --- /dev/null +++ b/library/PhpGedcom/Writer/Indi/Famc.php @@ -0,0 +1,56 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer\Indi; + +/** + * + */ +class Famc +{ + /** + * @param \PhpGedcom\Record\Indi\Famc $attr + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Indi\Famc &$famc, $level = 0) + { + $output = ''; + // NAME + $_famc = $famc->getFams(); + if(empty($_fams)){ + return $output; + } + $output.= $level." NAME ".$_famc."\n"; + // level up + $level++; + + // PEDI + $pedi = $famc->getPedi(); + if(!empty($pedi)){ + $output.=$level." PEDI ".$pedi."\n"; + } + + // note + $note = $famc->getSour(); + if(!empty($note) && count($note) > 0){ + foreach($note as $item){ + $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); + $output.=$_convert; + } + } + + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Indi/Fams.php b/library/PhpGedcom/Writer/Indi/Fams.php new file mode 100644 index 00000000..8534b1f9 --- /dev/null +++ b/library/PhpGedcom/Writer/Indi/Fams.php @@ -0,0 +1,50 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer\Indi; + +/** + * + */ +class Fams +{ + /** + * @param \PhpGedcom\Record\Indi\Fams $attr + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Indi\Fams &$fams, $level = 0) + { + $output = ''; + // NAME + $_fams = $fams->getFams(); + if(empty($_fams)){ + return $output; + } + $output.= $level." NAME ".$_fams."\n"; + // level up + $level++; + + // note + $note = $fams->getSour(); + if(!empty($note) && count($note) > 0){ + foreach($note as $item){ + $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); + $output.=$_convert; + } + } + + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Indi/Name.php b/library/PhpGedcom/Writer/Indi/Name.php new file mode 100644 index 00000000..74889268 --- /dev/null +++ b/library/PhpGedcom/Writer/Indi/Name.php @@ -0,0 +1,89 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer\Indi; + +/** + * + */ +class Name +{ + /** + * @param \PhpGedcom\Record\Indi\Name $attr + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Indi\Name &$name, $level = 0) + { + $output = ''; + // NAME + $_name = $name->getName(); + if(empty($_name)){ + return $output; + } + $output.= $level." NAME ".$_name."\n"; + // level up + $level++; + + // NPFX + $npfx = $name->getNpfx(); + if(!empty($npfx)){ + $output.=$level." NPFX ".$npfx."\n"; + } + + // GIVN + $givn = $name->getGivn(); + if(!empty($givn)){ + $output.=$level." GIVN ".$givn."\n"; + } + // NICK + $nick = $name->getNick(); + if(!empty($nick)){ + $output.=$level." NICK ".$nick."\n"; + } + // SPFX + $spfx = $name->getSpfx(); + if(!empty($spfx)){ + $output.=$level." SPFX ".$spfx."\n"; + } + // SURN + $surn = $name->getSurn(); + if(!empty($surn)){ + $output.=$level." SURN ".$surn."\n"; + } + // NSFX + $nsfx = $name->getNsfx(); + if(!empty($nsfx)){ + $output.=$level." NSFX ".$nsfx."\n"; + } + // SOUR + $sour = $name->getSour(); + if(!empty($sour) && count($sour) > 0){ + foreach($sour as $item){ + $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); + $output.=$_convert; + } + } + // note + $note = $name->getSour(); + if(!empty($note) && count($note) > 0){ + foreach($note as $item){ + $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); + $output.=$_convert; + } + } + + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Refn.php b/library/PhpGedcom/Writer/Refn.php new file mode 100644 index 00000000..74e276c2 --- /dev/null +++ b/library/PhpGedcom/Writer/Refn.php @@ -0,0 +1,47 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer; + +/** + * + */ +class Refn +{ + /** + * @param \PhpGedcom\Record\Refn $note + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Refn &$refn, $level) + { + + $output = ""; + $_refn = $refn->getRefn(); + if(empty($_refn)){ + return $output; + }else{ + $output.=$level." REFN \n"; + } + // level up + $level++; + // DATE + $type = $refn->getType(); + if(!empty($type)){ + $output.=$level." TYPE ".$type."\n"; + } + + return $output; + } +} From 0d6a8a659d9c6797db1e6b24a23e6ad258789f63 Mon Sep 17 00:00:00 2001 From: jyyblue Date: Wed, 17 Jun 2020 01:49:03 -0700 Subject: [PATCH 14/99] add Subn Writer --- library/PhpGedcom/Writer.php | 79 ++++++++++++++++++++++++++++- library/PhpGedcom/Writer/Refn.php | 2 +- library/PhpGedcom/Writer/Subn.php | 83 +++++++++++++++++++++++++++++++ 3 files changed, 162 insertions(+), 2 deletions(-) create mode 100644 library/PhpGedcom/Writer/Subn.php diff --git a/library/PhpGedcom/Writer.php b/library/PhpGedcom/Writer.php index 0e1524d9..581d54c0 100644 --- a/library/PhpGedcom/Writer.php +++ b/library/PhpGedcom/Writer.php @@ -16,6 +16,10 @@ use \PhpGedcom\Gedcom; use \PhpGedcom\Writer\Head; +use \PhpGedcom\Writer\Subn; +use \PhpGedcom\Writer\Subm; +use \PhpGedcom\Writer\Sour; +use \PhpGedcom\Writer\Indi; /** * @@ -35,9 +39,82 @@ class Writer public static function convert(Gedcom $gedcom, $format = self::GEDCOM55) { $head = $gedcom->getHead(); - + $subn = $gedcom->getSubn(); + $subms = $gedcom->getSubm(); // array() + $sours = $gedcom->getSour(); // array() + $indis = $gedcom->getIndi(); // array() + $fams = $gedcom->getFam(); // array() + $notes = $gedcom->getNote(); // array() + $repos = $gedcom->getRepo(); // array() + $objes = $gedcom->getObje(); // array() + + // head $output = Head::convert($head, $format); + + // subn + $output .= Subn::convert($subn); + + // subms + if(!empty($subms) && count($subms) > 0){ + foreach($subms as $item){ + if($item){ + $output .= Subm::convert($item); + } + } + } + // sours + if(!empty($sours) && count($sours) > 0){ + foreach($sours as $item){ + if($item){ + $output .= Sour::convert($item); + } + } + } + + // indis + if(!empty($indis) && count($indis) > 0){ + foreach($indis as $item){ + if($item){ + $output .= Indi::convert($item); + } + } + } + + // fams + if(!empty($fams) && count($fams) > 0){ + foreach($fams as $item){ + if($item){ + $output .= Fam::convert($item); + } + } + } + // notes + if(!empty($notes) && count($notes) > 0){ + foreach($notes as $item){ + if($item){ + $output .= Note::convert($item); + } + } + } + // repos + if(!empty($repos) && count($repos) > 0){ + foreach($repos as $item){ + if($item){ + $output .= Repo::convert($item); + } + } + } + // Objes + if(!empty($objes) && count($objes) > 0){ + foreach($objes as $item){ + if($item){ + $output .= Obje::convert($item); + } + } + } + // EOF + $output .= "0 TRLR\n"; return $output; } } diff --git a/library/PhpGedcom/Writer/Refn.php b/library/PhpGedcom/Writer/Refn.php index 74e276c2..bc39ab57 100644 --- a/library/PhpGedcom/Writer/Refn.php +++ b/library/PhpGedcom/Writer/Refn.php @@ -32,7 +32,7 @@ public static function convert(\PhpGedcom\Record\Refn &$refn, $level) if(empty($_refn)){ return $output; }else{ - $output.=$level." REFN \n"; + $output.=$level." REFN ".$_refn."\n"; } // level up $level++; diff --git a/library/PhpGedcom/Writer/Subn.php b/library/PhpGedcom/Writer/Subn.php new file mode 100644 index 00000000..3a98e436 --- /dev/null +++ b/library/PhpGedcom/Writer/Subn.php @@ -0,0 +1,83 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer; + +/** + * + */ +class Subn +{ + /** + * @param \PhpGedcom\Record\Subn $note + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Subn &$subn) + { + $level = 0; + $output = ""; + $_subn = $refn->getSubn(); + if(empty($_refn)){ + return $output; + }else{ + $output.=$level." SUBN ".$_subn."\n"; + } + // level up + $level++; + + // SUBM + $subm = $subn->getSubm(); + if(!empty($subm)){ + $output.=$level." SUBM ".$subm."\n"; + } + + // FAMF + $famf = $subn->getFamf(); + if(!empty($famf)){ + $output.=$level." FAMF ".$famf."\n"; + } + + // TEMP + $temp = $subn->getTemp(); + if(!empty($temp)){ + $output.=$level." TEMP ".$temp."\n"; + } + + // ANCE + $ance = $subn->getAnce(); + if(!empty($ance)){ + $output.=$level." ANCE ".$ance."\n"; + } + + // DESC + $desc = $subn->getDesc(); + if(!empty($desc)){ + $output.=$level." DESC ".$desc."\n"; + } + // ORDI + $ordi = $subn->getOrdi(); + if(!empty($ordi)){ + $output.=$level." ORDI ".$ordi."\n"; + } + + // RIN + $rin = $subn->getRin(); + if(!empty($rin)){ + $output.=$level." RIN ".$rin."\n"; + } + + return $output; + } +} From 41090492632d6b62c3d6dd5c264163d84170818b Mon Sep 17 00:00:00 2001 From: jyyblue Date: Wed, 17 Jun 2020 02:03:53 -0700 Subject: [PATCH 15/99] add Subm writer --- library/PhpGedcom/Writer/Subm.php | 113 ++++++++++++++++++++++++++++++ library/PhpGedcom/Writer/Subn.php | 4 +- 2 files changed, 115 insertions(+), 2 deletions(-) create mode 100644 library/PhpGedcom/Writer/Subm.php diff --git a/library/PhpGedcom/Writer/Subm.php b/library/PhpGedcom/Writer/Subm.php new file mode 100644 index 00000000..6c050651 --- /dev/null +++ b/library/PhpGedcom/Writer/Subm.php @@ -0,0 +1,113 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer; + +/** + * + */ +class Subm +{ + /** + * @param \PhpGedcom\Record\Subm $note + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Subm &$subm) + { + $level = 0; + $output = ""; + $_subm = $subm->getSubn(); + if(empty($_subm)){ + return $output; + }else{ + $output.=$level." SUBM ".$_subm."\n"; + } + // level up + $level++; + + // NAME + $name = $subm->getName(); + if(!empty($name)){ + $output.=$level." NAME ".$name."\n"; + } + // $chan + $chan = $subm->getChan(); + if($chan){ + $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level); + $output.=$_convert; + } + + // $addr + $addr = $subm->getAddr(); + if($addr){ + $_convert = \PhpGedcom\Writer\Addr::convert($addr, $level); + $output.=$_convert; + } + + // $rin + $rin = $subm->getRin(); + if(!empty($rin)){ + $output.=$level." RIN ".$rin."\n"; + } + + // $rfn + $rfn = $subm->getRfn(); + if(!empty($rfn)){ + $output.=$level." RFN ".$rfn."\n"; + } + + // $lang = array() + $langs = $subm->getLang(); + if(!empty($langs) && count($langs) > 0){ + foreach($langs as $item){ + if($item){ + $_convert = $level." LANG ".$item."\n"; + $output.=$_convert; + } + } + } + + // $phon = array() + $phon = $subm->getLang(); + if(!empty($phon) && count($phon) > 0){ + foreach($phon as $item){ + if($item){ + $_convert = \PhpGedcom\Writer\Phon::convert($item, $level); + $output.= $_convert; + } + } + } + + // $obje = array() + $obje = $subm->getObje(); + if(!empty($obje) && count($obje) > 0){ + foreach($obje as $item){ + $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); + $output.=$_convert; + } + } + + // note + $note = $subm->getNote(); + if(!empty($note) && count($note) > 0){ + foreach($note as $item){ + $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); + $output.=$_convert; + } + } + + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Subn.php b/library/PhpGedcom/Writer/Subn.php index 3a98e436..89cc4d2d 100644 --- a/library/PhpGedcom/Writer/Subn.php +++ b/library/PhpGedcom/Writer/Subn.php @@ -28,8 +28,8 @@ public static function convert(\PhpGedcom\Record\Subn &$subn) { $level = 0; $output = ""; - $_subn = $refn->getSubn(); - if(empty($_refn)){ + $_subn = $subn->getSubn(); + if(empty($_subn)){ return $output; }else{ $output.=$level." SUBN ".$_subn."\n"; From 4d038c8f11475a70bb9726517cae20b8d5831973 Mon Sep 17 00:00:00 2001 From: jyyblue Date: Wed, 17 Jun 2020 06:49:36 -0700 Subject: [PATCH 16/99] add Sour related writer. --- library/PhpGedcom/Writer/Caln.php | 47 ++++++++++ library/PhpGedcom/Writer/Repo.php | 33 +++++++ library/PhpGedcom/Writer/RepoRef.php | 60 +++++++++++++ library/PhpGedcom/Writer/Sour.php | 125 +++++++++++++++++++++++++++ 4 files changed, 265 insertions(+) create mode 100644 library/PhpGedcom/Writer/Caln.php create mode 100644 library/PhpGedcom/Writer/Repo.php create mode 100644 library/PhpGedcom/Writer/RepoRef.php create mode 100644 library/PhpGedcom/Writer/Sour.php diff --git a/library/PhpGedcom/Writer/Caln.php b/library/PhpGedcom/Writer/Caln.php new file mode 100644 index 00000000..e5966a10 --- /dev/null +++ b/library/PhpGedcom/Writer/Caln.php @@ -0,0 +1,47 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer; + +/** + * + */ +class Caln +{ + /** + * @param \PhpGedcom\Record\Caln $note + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Caln &$caln, $level) + { + $output = ""; + $_caln = $caln->getCaln(); + if(empty($_caln)){ + return $output; + }else{ + $output.=$level." CALN ".$_caln."\n"; + } + + // level up + $level++; + + // medi + $medi = $caln->getMedi(); + if(!empty($medi)){ + $output.=$level." MEDI ".$medi."\n"; + } + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Repo.php b/library/PhpGedcom/Writer/Repo.php new file mode 100644 index 00000000..59110308 --- /dev/null +++ b/library/PhpGedcom/Writer/Repo.php @@ -0,0 +1,33 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer; + +/** + * + */ +class Repo +{ + /** + * @param \PhpGedcom\Record\Repo $sour + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Repo &$repo, $level) + { + + $output = ""; + return $output; + } +} diff --git a/library/PhpGedcom/Writer/RepoRef.php b/library/PhpGedcom/Writer/RepoRef.php new file mode 100644 index 00000000..f9f7d72b --- /dev/null +++ b/library/PhpGedcom/Writer/RepoRef.php @@ -0,0 +1,60 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer; + +/** + * + */ +class RepoRef +{ + /** + * @param \PhpGedcom\Record\RepoRef $reporef + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\RepoRef &$reporef, $level) + { + + $output = ""; + $_repo = $reporef->getRepo(); + if(empty($_sour)){ + return $output; + }else{ + $output.=$level." REPO ".$_repo."\n"; + } + // level up + $level++; + + // Note array + $note = $reporef->getNote(); + if(!empty($note) && count($note) > 0){ + foreach($note as $item){ + $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); + $output.=$_convert; + } + } + + // _caln array + $_caln = $reporef->getCaln(); + if(!empty($_caln) && count($_caln) > 0){ + foreach($_caln as $item){ + $_convert = \PhpGedcom\Writer\Caln::convert($item, $level); + $output.=$_convert; + } + } + + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Sour.php b/library/PhpGedcom/Writer/Sour.php new file mode 100644 index 00000000..a7a13490 --- /dev/null +++ b/library/PhpGedcom/Writer/Sour.php @@ -0,0 +1,125 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer; + +/** + * + */ +class Sour +{ + /** + * @param \PhpGedcom\Record\Sour $sour + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Sour &$sour, $level) + { + + $output = ""; + $_sour = $sour->getSour(); + if(empty($_sour)){ + return $output; + }else{ + $output.=$level." SOUR ".$_sour."\n"; + } + // level up + $level++; + + // TITL + $titl = $sour->getType(); + if(!empty($type)){ + $output.=$level." TITL ".$titl."\n"; + } + + // RIN + $rin = $sour->getRin(); + if(!empty($rin)){ + $output.=$level." RIN ".$rin."\n"; + } + + // AUTH + $auth = $sour->getAuth(); + if(!empty($auth)){ + $output.=$level." AUTH ".$auth."\n"; + } + + // TEXT + $text = $sour->getText(); + if(!empty($text)){ + $output.=$level." TEXT ".$text."\n"; + } + + // PUBL + $publ = $sour->getPubl(); + if(!empty($publ)){ + $output.=$level." PUBL ".$publ."\n"; + } + + // ABBR + $abbr = $sour->getAbbr(); + if(!empty($abbr)){ + $output.=$level." ABBR ".$abbr."\n"; + } + + // REPO + $repo = $sour->getRepo(); + if(!empty($repo)){ + $_convert = \PhpGedcom\Writer\RepoRef::convert($repo, $level); + $output.=$_convert; + } + + // NOTE array + $note = $sour->getNote(); + if(!empty($note) && count($note) > 0){ + foreach($note as $item){ + $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); + $output.=$_convert; + } + } + + // DATA + $data = $sour->getData(); + if(!empty($data)){ + $_convert = \PhpGedcom\Writer\Sour\Data::convert($data, $level); + $output.=$_convert; + } + + // OBJE array + $obje = $sour->getObje(); + if(!empty($obje) && count($obje) > 0){ + foreach($obje as $item){ + $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); + $output.=$_convert; + } + } + + // REFN array + $refn = $sour->getRefn(); + if(!empty($refn) && count($refn) > 0){ + foreach($refn as $item){ + $_convert = \PhpGedcom\Writer\Refn::convert($item, $level); + $output.=$_convert; + } + } + + // chan + $chan = $sour->getChan(); + if(!empty($chan)){ + $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level); + $output.=$_convert; + } + return $output; + } +} From d85e70fcae11ed3ca6db1187e7c623a1fdd44b73 Mon Sep 17 00:00:00 2001 From: jyyblue Date: Wed, 17 Jun 2020 07:13:18 -0700 Subject: [PATCH 17/99] fix identifier issue --- library/PhpGedcom/Record/Fam.php | 2 -- library/PhpGedcom/Writer.php | 2 +- library/PhpGedcom/Writer/Sour.php | 2 +- library/PhpGedcom/Writer/Subm.php | 2 +- library/PhpGedcom/Writer/Subn.php | 2 +- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/library/PhpGedcom/Record/Fam.php b/library/PhpGedcom/Record/Fam.php index 3b05742a..70a2c67d 100644 --- a/library/PhpGedcom/Record/Fam.php +++ b/library/PhpGedcom/Record/Fam.php @@ -111,8 +111,6 @@ public function getEven($key = '') { } } - /** - /** * */ diff --git a/library/PhpGedcom/Writer.php b/library/PhpGedcom/Writer.php index 581d54c0..ea67584e 100644 --- a/library/PhpGedcom/Writer.php +++ b/library/PhpGedcom/Writer.php @@ -20,7 +20,7 @@ use \PhpGedcom\Writer\Subm; use \PhpGedcom\Writer\Sour; use \PhpGedcom\Writer\Indi; - +use \PhpGedcom\Writer\Fam; /** * */ diff --git a/library/PhpGedcom/Writer/Sour.php b/library/PhpGedcom/Writer/Sour.php index a7a13490..6464757b 100644 --- a/library/PhpGedcom/Writer/Sour.php +++ b/library/PhpGedcom/Writer/Sour.php @@ -32,7 +32,7 @@ public static function convert(\PhpGedcom\Record\Sour &$sour, $level) if(empty($_sour)){ return $output; }else{ - $output.=$level." SOUR ".$_sour."\n"; + $output.=$level." ".$_sour." SOUR "."\n"; } // level up $level++; diff --git a/library/PhpGedcom/Writer/Subm.php b/library/PhpGedcom/Writer/Subm.php index 6c050651..c1829274 100644 --- a/library/PhpGedcom/Writer/Subm.php +++ b/library/PhpGedcom/Writer/Subm.php @@ -32,7 +32,7 @@ public static function convert(\PhpGedcom\Record\Subm &$subm) if(empty($_subm)){ return $output; }else{ - $output.=$level." SUBM ".$_subm."\n"; + $output.=$level." ".$_subm." SUBM "."\n"; } // level up $level++; diff --git a/library/PhpGedcom/Writer/Subn.php b/library/PhpGedcom/Writer/Subn.php index 89cc4d2d..39abc8fe 100644 --- a/library/PhpGedcom/Writer/Subn.php +++ b/library/PhpGedcom/Writer/Subn.php @@ -32,7 +32,7 @@ public static function convert(\PhpGedcom\Record\Subn &$subn) if(empty($_subn)){ return $output; }else{ - $output.=$level." SUBN ".$_subn."\n"; + $output.=$level." ".$_subn." SUBN \n"; } // level up $level++; From 8b8652e018c8ca21a8f48d0700ddda3458a5ec1f Mon Sep 17 00:00:00 2001 From: jyyblue Date: Thu, 18 Jun 2020 03:14:37 -0700 Subject: [PATCH 18/99] add fam and realted writers --- library/PhpGedcom/Writer/Fam.php | 155 +++++++++++++++++++++ library/PhpGedcom/Writer/Fam/Even.php | 141 +++++++++++++++++++ library/PhpGedcom/Writer/Fam/Even/Husb.php | 43 ++++++ library/PhpGedcom/Writer/Fam/Even/Wife.php | 43 ++++++ library/PhpGedcom/Writer/Fam/Slgs.php | 78 +++++++++++ 5 files changed, 460 insertions(+) create mode 100644 library/PhpGedcom/Writer/Fam.php create mode 100644 library/PhpGedcom/Writer/Fam/Even.php create mode 100644 library/PhpGedcom/Writer/Fam/Even/Husb.php create mode 100644 library/PhpGedcom/Writer/Fam/Even/Wife.php create mode 100644 library/PhpGedcom/Writer/Fam/Slgs.php diff --git a/library/PhpGedcom/Writer/Fam.php b/library/PhpGedcom/Writer/Fam.php new file mode 100644 index 00000000..1ec4a671 --- /dev/null +++ b/library/PhpGedcom/Writer/Fam.php @@ -0,0 +1,155 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer; + +/** + * + */ +class Fam +{ + /** + * @param \PhpGedcom\Record\Fam $sour + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Fam &$fam, $level) + { + + $output = ""; + $id = $fam->getId(); + if(empty($id)){ + return $output; + }else{ + $output.=$level." ".$id." FAM "."\n"; + } + // level up + $level++; + + // HUSB + $husb = $fam->getHusb(); + if(!empty($husb)){ + $output.=$level." HUSB ".$husb."\n"; + } + + // WIFE + $wife = $fam->getWife(); + if(!empty($wife)){ + $output.=$level." WIFE ".$wife."\n"; + } + + // CHIL + $chil = $fam->getChil(); + if(!empty($chil) && count($chil) > 0){ + foreach($chil as $item){ + if($item){ + $_convert = $level.' CHIL '.$item.'\n'; + $output.=$_convert; + } + } + } + // NCHI + $nchi = $fam->getNchi(); + if(!empty($nchi)){ + $output.=$level." NCHI ".$nchi."\n"; + } + + // SUBM array + $subm = $fam->getSubm(); + + if(!empty($subm) && count($subm) > 0){ + foreach($subm as $item){ + if($item){ + $output.=$level." SUBM ".$item."\n"; + } + } + } + + // RIN + $rin = $fam->getRin(); + if(!empty($rin)){ + $output.=$level." RIN ".$rin."\n"; + } + // CHAN + $chan = $fam->getChan(); + if(!empty($chan)){ + $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level); + $output.=$_convert; + } + // SLGS + $slgs = $fam->getSlgs(); + if(!empty($slgs) && count($slgs) > 0){ + if($slgs){ + $_convert = \PhpGedcom\Writer\Fam\Slgs::convert($item, $level); + $output.=$_convert; + } + } + + // REFN array + $refn = $fam->getRefn(); + if(!empty($refn) && count($refn) > 0){ + foreach($refn as $item){ + if($item){ + $_convert = \PhpGedcom\Writer\Refn::convert($item, $level); + $output.=$_convert; + } + } + } + + // NOTE array + $note = $fam->getNote(); + if(!empty($note) && count($note) > 0){ + foreach($note as $item){ + if($item){ + $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); + $output.=$_convert; + } + } + } + + // SOUR + $sour = $fam->getSour(); + if(!empty($sour) && count($sour) > 0){ + foreach($sour as $item){ + if($item){ + $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); + $output.=$_convert; + } + } + } + + // OBJE + $obje = $fam->getObje(); + if(!empty($obje) && count($obje) > 0){ + foreach($obje as $item){ + if($item){ + $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); + $output.=$_convert; + } + } + } + + // EVEN + $even = $fam->getAllEven(); + if(!empty($even) && count($even) > 0){ + foreach($even as $item){ + if($item){ + $_convert = \PhpGedcom\Writer\Fam\Even::convert($item, $level); + $output.=$_convert; + } + } + } + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Fam/Even.php b/library/PhpGedcom/Writer/Fam/Even.php new file mode 100644 index 00000000..524a138c --- /dev/null +++ b/library/PhpGedcom/Writer/Fam/Even.php @@ -0,0 +1,141 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer\Fam; + +/** + * + */ +class Even +{ + /** + * @param \PhpGedcom\Record\Fam\Even $even + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Fam\Even &$even, $level) + { + $output = ""; + + // $type; + $type = $even->getType(); + if(!empty($type)){ + $output.=$level." ".$type."\n"; + }else{ + return $output; + } + $level++; + + // $type; + $type = $even->getType(); + if(!empty($type)){ + $output.=$level." TYPE ".$type."\n"; + } + + // $date; + $date = $even->getDate(); + if(!empty($date)){ + $output.=$level." DATE ".$date."\n"; + } + + // Plac + $plac = $even->getPlac(); + if(!empty($plac)){ + $_convert = \PhpGedcom\Writer\Indi\Even\Plac::convert($plac, $level); + $output.=$_convert; + } + + // $caus; + $caus = $even->getCaus(); + if(!empty($caus)){ + $output.=$level." CAUS ".$caus."\n"; + } + + // $age; + $age = $even->getAge(); + if(!empty($age)){ + $output.=$level." AGE ".$age."\n"; + } + + // $addr + $addr = $even->getAddr(); + if(!empty($addr)){ + $_convert = \PhpGedcom\Writer\Addr::convert($addr, $level); + $output.=$_convert; + } + + // $phon = array() + $phon = $even->getPhon(); + if(!empty($phon) && count($phon) > 0){ + foreach($phon as $item){ + $_convert = \PhpGedcom\Writer\Phon::convert($item, $level); + $output.=$_convert; + } + } + // $agnc + $agnc = $even->getAgnc(); + if(!empty($agnc)){ + $output.=$level." AGNC ".$agnc."\n"; + } + + // HUSB + $husb = $even->getHusb(); + if(!empty($husb)){ + $_convert = \PhpGedcom\Writer\Fam\Even\Husb::convert($husb, $level); + $output.=$_convert; + } + + // WIFE + $wife = $even->getWife(); + if(!empty($wife)){ + $_convert = \PhpGedcom\Writer\Fam\Even\Wife::convert($wife, $level); + $output.=$_convert; + } + + // $ref = array(); + // This is not in parser + + // $obje = array(); + $obje = $even->getObje(); + if(!empty($obje) && count($obje) > 0){ + foreach($obje as $item){ + $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); + $output.=$_convert; + } + } + // $sour = array(); + $sour = $even->getSour(); + if(!empty($sour) && count($sour) > 0){ + foreach($sour as $item){ + $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); + $output.=$_convert; + } + } + // $note = array(); + $note = $even->getNote(); + if(!empty($note) && count($note) > 0){ + foreach($note as $item){ + $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); + $output.=$_convert; + } + } + // Record\Chan + $chan = $even->getChan(); + if(!empty($chan) ){ + $_convert = \PhpGedcom\Writer\Chan::convert($item, $level); + $output.=$_convert; + } + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Fam/Even/Husb.php b/library/PhpGedcom/Writer/Fam/Even/Husb.php new file mode 100644 index 00000000..2cd68c0f --- /dev/null +++ b/library/PhpGedcom/Writer/Fam/Even/Husb.php @@ -0,0 +1,43 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer\Fam\Even; + +/** + * + */ +class Husb +{ + /** + * @param \PhpGedcom\Record\Fam\Even\Husb $attr + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Fam\Even\Husb &$husb, $level = 0) + { + $output = ''; + + $output.= $level." WIFE \n"; + // level up + $level++; + + // AGE + $age = $husb->getAge(); + if(!empty($age)){ + $output.=$level." AGE ".$age."\n"; + } + + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Fam/Even/Wife.php b/library/PhpGedcom/Writer/Fam/Even/Wife.php new file mode 100644 index 00000000..d6b2e202 --- /dev/null +++ b/library/PhpGedcom/Writer/Fam/Even/Wife.php @@ -0,0 +1,43 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer\Fam\Even; + +/** + * + */ +class Wife +{ + /** + * @param \PhpGedcom\Record\Fam\Even\Wife $attr + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Fam\Even\Wife &$wife, $level = 0) + { + $output = ''; + + $output.= $level." HUSB \n"; + // level up + $level++; + + // AGE + $age = $wife->getAge(); + if(!empty($age)){ + $output.=$level." AGE ".$age."\n"; + } + + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Fam/Slgs.php b/library/PhpGedcom/Writer/Fam/Slgs.php new file mode 100644 index 00000000..39aa17ee --- /dev/null +++ b/library/PhpGedcom/Writer/Fam/Slgs.php @@ -0,0 +1,78 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer\Fam; + +/** + * + */ +class Slgs +{ + /** + * @param \PhpGedcom\Record\Fam\Slgs $slgs + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Fam\Slgs &$slgs, $level) + { + $output = ""; + $output.=$level." SLGS \n"; + + // Level up + $level++; + + // $STAT; + $stat = $slgs->getStat(); + if(!empty($stat)){ + $output.=$level." STAT ".$stat."\n"; + } + + // $date; + $date = $slgs->getDate(); + if(!empty($date)){ + $output.=$level." DATE ".$date."\n"; + } + + // PLAC + $plac = $slgs->getPlac(); + if(!empty($plac)){ + $output.=$level." PLAC ".$plac."\n"; + } + + // $TEMP; + $temp = $slgs->getTemp(); + if(!empty($temp)){ + $output.=$level." TEMP ".$temp."\n"; + } + + // $sour = array(); + $sour = $slgs->getSour(); + if(!empty($sour) && count($sour) > 0){ + foreach($sour as $item){ + $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); + $output.=$_convert; + } + } + // $note = array(); + $note = $slgs->getNote(); + if(!empty($note) && count($note) > 0){ + foreach($note as $item){ + $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); + $output.=$_convert; + } + } + + return $output; + } +} From 57dcb9193d73b90aacbd7a5ea4c2a9a3c5d3a604 Mon Sep 17 00:00:00 2001 From: jyyblue Date: Thu, 18 Jun 2020 06:08:56 -0700 Subject: [PATCH 19/99] add Repo and related writer --- library/PhpGedcom/Writer.php | 5 ++ library/PhpGedcom/Writer/Head/Sour.php | 7 --- library/PhpGedcom/Writer/Note.php | 82 ++++++++++++++++++++++++++ library/PhpGedcom/Writer/Obje.php | 34 +++++++++++ library/PhpGedcom/Writer/Phon.php | 2 +- library/PhpGedcom/Writer/Repo.php | 68 ++++++++++++++++++++- 6 files changed, 188 insertions(+), 10 deletions(-) create mode 100644 library/PhpGedcom/Writer/Note.php create mode 100644 library/PhpGedcom/Writer/Obje.php diff --git a/library/PhpGedcom/Writer.php b/library/PhpGedcom/Writer.php index ea67584e..04044f0d 100644 --- a/library/PhpGedcom/Writer.php +++ b/library/PhpGedcom/Writer.php @@ -21,6 +21,10 @@ use \PhpGedcom\Writer\Sour; use \PhpGedcom\Writer\Indi; use \PhpGedcom\Writer\Fam; +use \PhpGedcom\Writer\Note; +use \PhpGedcom\Writer\Repo; +use \PhpGedcom\Writer\Obje; + /** * */ @@ -97,6 +101,7 @@ public static function convert(Gedcom $gedcom, $format = self::GEDCOM55) } } } + // repos if(!empty($repos) && count($repos) > 0){ foreach($repos as $item){ diff --git a/library/PhpGedcom/Writer/Head/Sour.php b/library/PhpGedcom/Writer/Head/Sour.php index e218170d..64350e66 100644 --- a/library/PhpGedcom/Writer/Head/Sour.php +++ b/library/PhpGedcom/Writer/Head/Sour.php @@ -32,13 +32,6 @@ public static function convert(\PhpGedcom\Record\Head\Sour &$sour, $format = sel \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/Note.php b/library/PhpGedcom/Writer/Note.php new file mode 100644 index 00000000..a8119320 --- /dev/null +++ b/library/PhpGedcom/Writer/Note.php @@ -0,0 +1,82 @@ + + * @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 Note +{ + /** + * @param \PhpGedcom\Record\Note $sour + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Note &$note) + { + $level = 0; + $output = ""; + $id = $note->getId(); + if(!empty($id)){ + $output.= $level." ".$id." "." NOTE \n"; + }else{ + return $output; + } + + // Level Up + $level++; + // RIN + $rin = $note->getRin(); + if($rin){ + $output.=$level." RIN ".$rin."\n"; + } + + // cont + $cont = $note->getNote(); + if($cont){ + $output.=$level." CONT ".$cont."\n"; + } + + // REFN + $refn = $note->getRefn(); + if(!empty($refn) && count($refn) > 0) { + foreach($refn as $item){ + if($item){ + $_convert = \PhpGedcom\Writer\Refn::convert($item, $level); + $output.=$_convert; + } + } + } + // CHAN + $chan = $note->getChan(); + if($chan){ + $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level); + $output.=$_convert; + } + + // SOUR array + $sour = $note->getSour(); + if(!empty($sour) && count($sour) > 0) { + foreach($sour as $item){ + if($item){ + $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); + $output.=$_convert; + } + } + } + + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Obje.php b/library/PhpGedcom/Writer/Obje.php new file mode 100644 index 00000000..4cf19281 --- /dev/null +++ b/library/PhpGedcom/Writer/Obje.php @@ -0,0 +1,34 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer; + +/** + * + */ +class Obje +{ + /** + * @param \PhpGedcom\Record\Obje $sour + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Obje &$obje) + { + $level = 0; + $output = ""; + + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Phon.php b/library/PhpGedcom/Writer/Phon.php index 75505963..7deec6c0 100644 --- a/library/PhpGedcom/Writer/Phon.php +++ b/library/PhpGedcom/Writer/Phon.php @@ -25,7 +25,7 @@ class Phon * @param int $level * @return string */ - public static function convert($phon, $format = self::GEDCOM55, $level = 1) + public static function convert($phon, $level = 1) { $output = "{$level} PHON " . $phon . "\n"; diff --git a/library/PhpGedcom/Writer/Repo.php b/library/PhpGedcom/Writer/Repo.php index 59110308..d44b0dc8 100644 --- a/library/PhpGedcom/Writer/Repo.php +++ b/library/PhpGedcom/Writer/Repo.php @@ -24,10 +24,74 @@ class Repo * @param int $level * @return string */ - public static function convert(\PhpGedcom\Record\Repo &$repo, $level) + public static function convert(\PhpGedcom\Record\Repo &$repo) { - + $level = 0; $output = ""; + $_repo = $repo->getRepo(); + if($_repo){ + $output.=$level." ".$id." REPO\n"; + }else{ + return $output; + } + + // level up + $level++; + + //NAME + $name = $repo->getName(); + if($name){ + $output.=$level." NAME ".$name."\n"; + } + + // ADDR + $addr = $repo->getAddr(); + if($addr){ + $_convert = \PhpGedcom\Writer\Addr::convert($addr, $level); + $output.=$_convert; + } + + // PHON + $phon = $repo->getPhon(); + if($phon){ + $_convert = \PhpGedcom\Writer\Phon::convert($phon, $level); + $output.=$_convert; + } + + // NOTE array + $note = $repo->getNote(); + if($note && count($note) > 0) { + foreach($note as $item){ + if($item){ + $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); + $output.=$_convert; + } + } + } + + // REFN + $refn = $repo->getRefn(); + if(!empty($refn) && count($refn) > 0) { + foreach($refn as $item){ + if($item){ + $_convert = \PhpGedcom\Writer\Refn::convert($item, $level); + $output.=$_convert; + } + } + } + + // CHAN + $chan = $repo->getChan(); + if($chan){ + $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level); + $output.=$_convert; + } + + // RIN + $rin = $repo->getRin(); + if($rin){ + $output.=$level." RIN ".$rin."\n"; + } return $output; } } From 4cd2125feaaa693a6859d2d39df906e04fa766d3 Mon Sep 17 00:00:00 2001 From: jyyblue Date: Thu, 18 Jun 2020 06:44:34 -0700 Subject: [PATCH 20/99] ADD OBJE AND RELATED WRITER --- library/PhpGedcom/Writer/Obje.php | 74 ++++++++++++++++++++++++++++++- library/PhpGedcom/Writer/Repo.php | 2 +- 2 files changed, 74 insertions(+), 2 deletions(-) diff --git a/library/PhpGedcom/Writer/Obje.php b/library/PhpGedcom/Writer/Obje.php index 4cf19281..bec22b9d 100644 --- a/library/PhpGedcom/Writer/Obje.php +++ b/library/PhpGedcom/Writer/Obje.php @@ -28,7 +28,79 @@ public static function convert(\PhpGedcom\Record\Obje &$obje) { $level = 0; $output = ""; - + $id = $obje->getId(); + if($id){ + $output.=$level." ".$id." OBJE\n"; + }else{ + return $output; + } + + // level up + $level++; + + // FORM + $form = $obje->getName(); + if($form){ + $output.=$level." FORM ".$form."\n"; + } + + // TITL + $titl = $obje->getTitl(); + if($titl){ + $output.=$level." TITL ".$titl."\n"; + } + + // OBJE + // This is same as FORM + + // RIN + $rin = $obje->getRin(); + if($rin){ + $output.=$level." RIN ".$rin."\n"; + } + + // REFN + $refn = $obje->getRefn(); + if(!empty($refn) && count($refn) > 0) { + foreach($refn as $item){ + if($item){ + $_convert = \PhpGedcom\Writer\Refn::convert($item, $level); + $output.=$_convert; + } + } + } + + // BLOB + $blob = $obje->getBlob(); + if($blob){ + $output.=$level." BLOB ".$blob."\n"; + } + + // NOTE + $note = $obje->getNote(); + if($note && count($note) > 0) { + foreach($note as $item){ + if($item){ + $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); + $output.=$_convert; + } + } + } + + // CHAN + $chan = $obje->getChan(); + if($chan){ + $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level); + $output.=$_convert; + } + + // FILE + $file = $obje->getFile(); + if($file){ + $output.=$level." FILE ".$file."\n"; + } + + // return $output; } } diff --git a/library/PhpGedcom/Writer/Repo.php b/library/PhpGedcom/Writer/Repo.php index d44b0dc8..df8f4821 100644 --- a/library/PhpGedcom/Writer/Repo.php +++ b/library/PhpGedcom/Writer/Repo.php @@ -30,7 +30,7 @@ public static function convert(\PhpGedcom\Record\Repo &$repo) $output = ""; $_repo = $repo->getRepo(); if($_repo){ - $output.=$level." ".$id." REPO\n"; + $output.=$level." ".$_repo." REPO\n"; }else{ return $output; } From c1e846b1af6e3388d00e1146faf6d935d4986779 Mon Sep 17 00:00:00 2001 From: jyyblue Date: Thu, 18 Jun 2020 08:32:50 -0700 Subject: [PATCH 21/99] add Head and related writer --- library/PhpGedcom/Writer/Head.php | 88 +++++++++++++++++++-- library/PhpGedcom/Writer/Head/Char.php | 50 ++++++++++++ library/PhpGedcom/Writer/Head/Date.php | 48 +++++++++++ library/PhpGedcom/Writer/Head/Gedc.php | 47 +++++++++++ library/PhpGedcom/Writer/Head/Plac.php | 42 ++++++++++ library/PhpGedcom/Writer/Head/Sour.php | 47 +++++++++-- library/PhpGedcom/Writer/Head/Sour/Corp.php | 34 ++++++-- library/PhpGedcom/Writer/Head/Sour/Data.php | 55 +++++++++++++ 8 files changed, 392 insertions(+), 19 deletions(-) create mode 100644 library/PhpGedcom/Writer/Head/Char.php create mode 100644 library/PhpGedcom/Writer/Head/Date.php create mode 100644 library/PhpGedcom/Writer/Head/Gedc.php create mode 100644 library/PhpGedcom/Writer/Head/Plac.php create mode 100644 library/PhpGedcom/Writer/Head/Sour/Data.php diff --git a/library/PhpGedcom/Writer/Head.php b/library/PhpGedcom/Writer/Head.php index 47874d63..ad49e5c7 100644 --- a/library/PhpGedcom/Writer/Head.php +++ b/library/PhpGedcom/Writer/Head.php @@ -26,13 +26,91 @@ class Head */ public static function convert(\PhpGedcom\Record\Head &$head, $format = self::GEDCOM55) { - $output = "0 HEAD\n" . + $level = 0; + $output = $level." 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"; + // level up + $level++; +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + //SOUR + $sour = $head->getSour(); + if($sour){ + $_convert = \PhpGedcom\Writer\Head\Sour::convert($sour, $level); + $output.=$_convert; + } +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + // DEST + $dest = $head->getDest(); + if($dest){ + $output.=$level." DEST ".$dest."\n"; + } + + //Subm + $subm = $head->getSubm(); + if($subm){ + $output.=$level." SUBM ".$subm."\n"; + } + + // SUBN + $subn = $head->getSubn(); + if($subn){ + $output.=$level." SUBN ".$subn."\n"; + } + + // FILE + $file = $head->getFile(); + if($file){ + $output.=$level." FILE ".$file."\n"; + } + + // COPR + $copr = $head->getCopr(); + if($copr){ + $output.=$level." COPR ".$copr."\n"; + } + + // LANG + $lang = $head->getLang(); + if($lang){ + $output.=$level." LANG ".$lang."\n"; + } + // DATE + $date = $head->getDate(); + if($date){ + $_convert = \PhpGedcom\Writer\Head\Date::convert($date, $level); + $output.=$_convert; + } + + + // GEDC + $gedc = $head->getGedc(); + if($gedc){ + $_convert = \PhpGedcom\Writer\Head\Gedc::convert($gedc, $level); + $output.=$_convert; + } + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // CHAR + $char = $head->getChar(); + if($char){ + $_convert = \PhpGedcom\Writer\Head\Char::convert($char, $level); + $output.=$_convert; + } + // PLAC + $plac = $head->getPlac(); + if($plac){ + $_convert = \PhpGedcom\Writer\Head\Plac::convert($plac, $level); + $output.=$_convert; + } + + // NOTE + $note = $head->getNote(); + if($note){ + $output.=$level." NOTE ".$note."\n"; + } + // /* +1 SUBM @@ {1:1} +1 SUBN @@ {0:1} diff --git a/library/PhpGedcom/Writer/Head/Char.php b/library/PhpGedcom/Writer/Head/Char.php new file mode 100644 index 00000000..fbc2b0a7 --- /dev/null +++ b/library/PhpGedcom/Writer/Head/Char.php @@ -0,0 +1,50 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer\Head; + +/** + * + */ +class Char +{ + /** + * @param \PhpGedcom\Record\Head\Char $char + * @param string $format + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Head\Char &$char, $level) + { + $output =""; + // char + $_char = $char->getChar(); + if($_char){ + $output.=$level." CHAR ".$_char."\n"; + }else{ + return $output; + } + + // level up + $level++; + // VERS + $vers = $char->getVersion(); + if($vers){ + $output.=$level." VERS ".$vers."\n"; + } + + + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Head/Date.php b/library/PhpGedcom/Writer/Head/Date.php new file mode 100644 index 00000000..37e0107a --- /dev/null +++ b/library/PhpGedcom/Writer/Head/Date.php @@ -0,0 +1,48 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer\Head; + +/** + * + */ +class Date +{ + /** + * @param \PhpGedcom\Record\Head\Date $date + * @param string $format + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Head\Date &$date, $level) + { + $output = ""; + $_date = $date->getDate(); + if($_date){ + $output .=$level." DATE ".$_date."\n"; + }else{ + return $output; + } + + // level up + $level++; + // Time + $time = $date->getTime(); + if($time){ + $output.=$level." TIME ".$time."\n"; + } + + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Head/Gedc.php b/library/PhpGedcom/Writer/Head/Gedc.php new file mode 100644 index 00000000..e8cea23e --- /dev/null +++ b/library/PhpGedcom/Writer/Head/Gedc.php @@ -0,0 +1,47 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer\Head; + +/** + * + */ +class Gedc +{ + /** + * @param \PhpGedcom\Record\Head\Gedc $gedc + * @param string $format + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Head\Gedc &$gedc, $level) + { + $output = $level." GEDC \n"; + + // level up + $level++; + // VERS + $vers = $gedc->getVersion(); + if($vers){ + $output.=$level." VERS ".$vers."\n"; + } + + // FORM + $form = $gedc->getForm(); + if($form){ + $output.=$level." FORM ".$form."\n"; + } + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Head/Plac.php b/library/PhpGedcom/Writer/Head/Plac.php new file mode 100644 index 00000000..9a43f9c5 --- /dev/null +++ b/library/PhpGedcom/Writer/Head/Plac.php @@ -0,0 +1,42 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Writer\Head; + +/** + * + */ +class Plac +{ + /** + * @param \PhpGedcom\Record\Head\Plac $plac + * @param string $format + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Head\Plac &$plac, $level) + { + $output = $level." PLAC \n"; + + // level up + $level++; + // FORM + $form = $plac->getForm(); + if($form){ + $output.=$level." FORM ".$form."\n"; + } + + return $output; + } +} diff --git a/library/PhpGedcom/Writer/Head/Sour.php b/library/PhpGedcom/Writer/Head/Sour.php index 64350e66..e5020df7 100644 --- a/library/PhpGedcom/Writer/Head/Sour.php +++ b/library/PhpGedcom/Writer/Head/Sour.php @@ -5,8 +5,8 @@ * php-gedcom is a library for parsing, manipulating, importing and exporting * GEDCOM 5.5 files in PHP 5.3+. * - * @author Kristopher Wilson - * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @author Xiang Ming + * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom * @license GPL-3.0 * @link http://github.com/mrkrstphr/php-gedcom @@ -25,13 +25,44 @@ class Sour * @param int $level * @return string */ - public static function convert(\PhpGedcom\Record\Head\Sour &$sour, $format = self::GEDCOM55, $level = 0) + public static function convert(\PhpGedcom\Record\Head\Sour &$sour, $level) { - $output = "1 SOUR " . $sour->sour . "\n" . - "2 VERS " . $sour->vers . "\n" . - \PhpGedcom\Writer\Head\Sour\Corp::convert($sour->corp, $format, 2) . - // TODO DATA; - ""; + $output = ""; + $_sour = $sour->getSour(); + if($_sour){ + $output.=$level." SOUR ".$_sour."\n"; + }else{ + return $output; + } + + // level up + $level++; + + // VERS + $vers = $sour->getVersion(); + if($vers){ + $output.=$level." VERS ".$vers."\n"; + } + + // NAME + $name = $sour->getName(); + if($name){ + $output.=$level." NAME ".$name."\n"; + } + + // CORP + $corp = $sour->getCorp(); + if($corp){ + $_convert = \PhpGedcom\Writer\Head\Sour\Corp::convert($corp, $level); + $output.=$_convert; + } + + // DATA + $data = $sour->getData(); + if($data){ + $_convert = \PhpGedcom\Writer\Head\Sour\Data::convert($data, $level); + $output.=$_convert; + } return $output; } } diff --git a/library/PhpGedcom/Writer/Head/Sour/Corp.php b/library/PhpGedcom/Writer/Head/Sour/Corp.php index d1e8b418..13aca6e1 100644 --- a/library/PhpGedcom/Writer/Head/Sour/Corp.php +++ b/library/PhpGedcom/Writer/Head/Sour/Corp.php @@ -25,13 +25,35 @@ class Corp * @param int $level * @return string */ - public static function convert(\PhpGedcom\Record\Head\Sour\Corp &$corp, $format = self::GEDCOM55, $level = 2) + public static function convert(\PhpGedcom\Record\Head\Sour\Corp &$corp, $level) { - $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); + $output = ""; + $_corp = $corp->getCorp(); + if($_corp){ + $output.=$level." CORP ".$_corp."\n"; + }else{ + return $output; + } + + // level up + $level++; + + // ADDR + $addr = $corp->getAddr(); + if($addr){ + $_convert = \PhpGedcom\Writer\Addr::convert($addr, $level); + $output.=$_convert; + } + + // phon + $phon = $corp->getPhon(); + if($phon && count($phon) > 0){ + foreach($phon as $item){ + if($item){ + $_convert = \PhpGedcom\Writer\Phon::convert($item, $level); + $output.=$_convert; + } + } } return $output; diff --git a/library/PhpGedcom/Writer/Head/Sour/Data.php b/library/PhpGedcom/Writer/Head/Sour/Data.php new file mode 100644 index 00000000..0066c119 --- /dev/null +++ b/library/PhpGedcom/Writer/Head/Sour/Data.php @@ -0,0 +1,55 @@ + + * @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 Data +{ + /** + * @param \PhpGedcom\Record\Head\Sour\Data $data + * @param string $format + * @param int $level + * @return string + */ + public static function convert(\PhpGedcom\Record\Head\Sour\Data &$data, $level) + { + $output = ""; + $_data = $data->getData(); + if($_data){ + $output.=$level." DATA ".$_data."\n"; + }else{ + return $output; + } + + // level up + $level++; + + // DATE + $date = $corp->getDate(); + if($date){ + $output.=$level." DATE ".$date."\n"; + } + + // COPR + $corp = $corp->getCorp(); + if($corp){ + $output.=$level." COPR ".$corp."\n"; + } + + return $output; + } +} From 15eb72fad5b180fc9e1d3b9de97f0c91cfcc3895 Mon Sep 17 00:00:00 2001 From: jyyblue Date: Thu, 18 Jun 2020 13:48:46 -0700 Subject: [PATCH 22/99] CHECK AGAIN WRITER & FIX SMALL ISSUES --- library/PhpGedcom/Parser/Head/Gedc.php | 2 +- library/PhpGedcom/Writer.php | 12 +++++++++--- library/PhpGedcom/Writer/Head.php | 4 +--- library/PhpGedcom/Writer/Indi.php | 4 ++-- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/library/PhpGedcom/Parser/Head/Gedc.php b/library/PhpGedcom/Parser/Head/Gedc.php index f65862b5..e4c7742a 100644 --- a/library/PhpGedcom/Parser/Head/Gedc.php +++ b/library/PhpGedcom/Parser/Head/Gedc.php @@ -46,7 +46,7 @@ public static function parse(\PhpGedcom\Parser $parser) switch ($recordType) { case 'VERS': - $gedc->setVers(trim($record[2])); + $gedc->setVersion(trim($record[2])); break; case 'FORM': $gedc->setForm(trim($record[2])); diff --git a/library/PhpGedcom/Writer.php b/library/PhpGedcom/Writer.php index 04044f0d..178ad951 100644 --- a/library/PhpGedcom/Writer.php +++ b/library/PhpGedcom/Writer.php @@ -52,11 +52,17 @@ public static function convert(Gedcom $gedcom, $format = self::GEDCOM55) $repos = $gedcom->getRepo(); // array() $objes = $gedcom->getObje(); // array() - // head - $output = Head::convert($head, $format); + $output = $level." FORMAT ".$format."\n"; + // head + if($head){ + $output = Head::convert($head, $format); + } + // subn - $output .= Subn::convert($subn); + if($subn){ + $output .= Subn::convert($subn); + } // subms if(!empty($subms) && count($subms) > 0){ diff --git a/library/PhpGedcom/Writer/Head.php b/library/PhpGedcom/Writer/Head.php index ad49e5c7..78171e25 100644 --- a/library/PhpGedcom/Writer/Head.php +++ b/library/PhpGedcom/Writer/Head.php @@ -32,14 +32,12 @@ public static function convert(\PhpGedcom\Record\Head &$head, $format = self::GE // level up $level++; -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //SOUR $sour = $head->getSour(); if($sour){ $_convert = \PhpGedcom\Writer\Head\Sour::convert($sour, $level); $output.=$_convert; } -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // DEST $dest = $head->getDest(); @@ -91,7 +89,7 @@ public static function convert(\PhpGedcom\Record\Head &$head, $format = self::GE $output.=$_convert; } -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // CHAR $char = $head->getChar(); if($char){ diff --git a/library/PhpGedcom/Writer/Indi.php b/library/PhpGedcom/Writer/Indi.php index 06cffc4b..e242ffbd 100644 --- a/library/PhpGedcom/Writer/Indi.php +++ b/library/PhpGedcom/Writer/Indi.php @@ -50,7 +50,7 @@ public static function convert(\PhpGedcom\Record\Indi &$indi, $format = self::GE // $attr // PhpGedcom/Record/Attr extend PhpGedcom/Record/Even and there is no change. // So used convert Even - $attr = $indi->getAttr(); + $attr = $indi->getAllAttr(); if(!empty($attr) && count($attr) > 0){ foreach($attr as $item){ $_convert = \PhpGedcom\Writer\Indi\Even::convert($item, $level); @@ -59,7 +59,7 @@ public static function convert(\PhpGedcom\Record\Indi &$indi, $format = self::GE } // $even - $even = $indi->getEven(); + $even = $indi->getAllEven(); if(!empty($even) && count($even) > 0){ foreach($even as $item){ $_convert = \PhpGedcom\Writer\Indi\Even::convert($item, $level); From 30304b0e7d0e643bf8e10dbc7890b0114848410f Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Thu, 18 Jun 2020 22:59:14 +0100 Subject: [PATCH 23/99] Update composer.json --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 758a2bc8..935890a2 100644 --- a/composer.json +++ b/composer.json @@ -6,10 +6,10 @@ "homepage": "http://github.com/oguz463/php-gedcom", "license": "GPL-3.0", "require": { - "php": ">=5.3" + "php": ">=7.3" }, "require-dev": { - "phpunit/PHPUnit": "3.7.*", + "phpunit/phpunit": "3.7.*", "squizlabs/php_codesniffer": "1.*" }, "autoload": { From 166a7b16f70c0d8a7c47e3407e82b1ec522640a8 Mon Sep 17 00:00:00 2001 From: jyyblue Date: Fri, 19 Jun 2020 18:24:41 -0700 Subject: [PATCH 24/99] fix some bug --- library/PhpGedcom/Record/Repo.php | 2 +- library/PhpGedcom/Writer/Fam/Even.php | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/library/PhpGedcom/Record/Repo.php b/library/PhpGedcom/Record/Repo.php index 0e3e0de6..a52010eb 100644 --- a/library/PhpGedcom/Record/Repo.php +++ b/library/PhpGedcom/Record/Repo.php @@ -66,7 +66,7 @@ class Repo extends Record implements Noteable { * @return Repo */ public function addPhon($phon = null) { - if (empty($phon)) { + if(empty($phon)) { $phon = new \PhpGedcom\Record\Phon(); } $this->phon[] = $phon; diff --git a/library/PhpGedcom/Writer/Fam/Even.php b/library/PhpGedcom/Writer/Fam/Even.php index 524a138c..c90098ef 100644 --- a/library/PhpGedcom/Writer/Fam/Even.php +++ b/library/PhpGedcom/Writer/Fam/Even.php @@ -130,12 +130,7 @@ public static function convert(\PhpGedcom\Record\Fam\Even &$even, $level) $output.=$_convert; } } - // Record\Chan - $chan = $even->getChan(); - if(!empty($chan) ){ - $_convert = \PhpGedcom\Writer\Chan::convert($item, $level); - $output.=$_convert; - } + return $output; } } From f3af343e0f7a39f00eae98beb40c73ca7e5bf8f6 Mon Sep 17 00:00:00 2001 From: jyyblue Date: Sun, 21 Jun 2020 19:23:27 -0700 Subject: [PATCH 25/99] Fix import gedcom issues. --- library/PhpGedcom/Writer.php | 2 +- library/PhpGedcom/Writer/Fam.php | 6 +++--- library/PhpGedcom/Writer/Indi.php | 2 +- library/PhpGedcom/Writer/Indi/Fams.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/library/PhpGedcom/Writer.php b/library/PhpGedcom/Writer.php index 178ad951..ea0dff60 100644 --- a/library/PhpGedcom/Writer.php +++ b/library/PhpGedcom/Writer.php @@ -52,7 +52,7 @@ public static function convert(Gedcom $gedcom, $format = self::GEDCOM55) $repos = $gedcom->getRepo(); // array() $objes = $gedcom->getObje(); // array() - $output = $level." FORMAT ".$format."\n"; + $output = "0 FORMAT ".$format."\n"; // head if($head){ diff --git a/library/PhpGedcom/Writer/Fam.php b/library/PhpGedcom/Writer/Fam.php index 1ec4a671..3742eb0d 100644 --- a/library/PhpGedcom/Writer/Fam.php +++ b/library/PhpGedcom/Writer/Fam.php @@ -24,7 +24,7 @@ class Fam * @param int $level * @return string */ - public static function convert(\PhpGedcom\Record\Fam &$fam, $level) + public static function convert(\PhpGedcom\Record\Fam &$fam, $level=0) { $output = ""; @@ -32,7 +32,7 @@ public static function convert(\PhpGedcom\Record\Fam &$fam, $level) if(empty($id)){ return $output; }else{ - $output.=$level." ".$id." FAM "."\n"; + $output.=$level." @".$id."@ FAM "."\n"; } // level up $level++; @@ -54,7 +54,7 @@ public static function convert(\PhpGedcom\Record\Fam &$fam, $level) if(!empty($chil) && count($chil) > 0){ foreach($chil as $item){ if($item){ - $_convert = $level.' CHIL '.$item.'\n'; + $_convert = $level." CHIL ".$item."\n"; $output.=$_convert; } } diff --git a/library/PhpGedcom/Writer/Indi.php b/library/PhpGedcom/Writer/Indi.php index e242ffbd..889ac066 100644 --- a/library/PhpGedcom/Writer/Indi.php +++ b/library/PhpGedcom/Writer/Indi.php @@ -24,7 +24,7 @@ class Indi * @param string $format * @return string */ - public static function convert(\PhpGedcom\Record\Indi &$indi, $format = self::GEDCOM55) + public static function convert(\PhpGedcom\Record\Indi &$indi) { $level = 0; diff --git a/library/PhpGedcom/Writer/Indi/Fams.php b/library/PhpGedcom/Writer/Indi/Fams.php index 8534b1f9..09982821 100644 --- a/library/PhpGedcom/Writer/Indi/Fams.php +++ b/library/PhpGedcom/Writer/Indi/Fams.php @@ -37,7 +37,7 @@ public static function convert(\PhpGedcom\Record\Indi\Fams &$fams, $level = 0) $level++; // note - $note = $fams->getSour(); + $note = $fams->getNote(); if(!empty($note) && count($note) > 0){ foreach($note as $item){ $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); From a96453b00ce27304ad6c868ff27c1937951f096b Mon Sep 17 00:00:00 2001 From: jyyblue Date: Mon, 22 Jun 2020 06:26:46 -0700 Subject: [PATCH 26/99] change NAME to FAMS, FAMC in writer. --- library/PhpGedcom/Writer/Fam.php | 6 +++--- library/PhpGedcom/Writer/Indi/Famc.php | 2 +- library/PhpGedcom/Writer/Indi/Fams.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/library/PhpGedcom/Writer/Fam.php b/library/PhpGedcom/Writer/Fam.php index 3742eb0d..5e5fad3d 100644 --- a/library/PhpGedcom/Writer/Fam.php +++ b/library/PhpGedcom/Writer/Fam.php @@ -40,13 +40,13 @@ public static function convert(\PhpGedcom\Record\Fam &$fam, $level=0) // HUSB $husb = $fam->getHusb(); if(!empty($husb)){ - $output.=$level." HUSB ".$husb."\n"; + $output.=$level." HUSB @".$husb."@\n"; } // WIFE $wife = $fam->getWife(); if(!empty($wife)){ - $output.=$level." WIFE ".$wife."\n"; + $output.=$level." WIFE @".$wife."@\n"; } // CHIL @@ -54,7 +54,7 @@ public static function convert(\PhpGedcom\Record\Fam &$fam, $level=0) if(!empty($chil) && count($chil) > 0){ foreach($chil as $item){ if($item){ - $_convert = $level." CHIL ".$item."\n"; + $_convert = $level." CHIL @".$item."@\n"; $output.=$_convert; } } diff --git a/library/PhpGedcom/Writer/Indi/Famc.php b/library/PhpGedcom/Writer/Indi/Famc.php index 2145e9da..04a647a3 100644 --- a/library/PhpGedcom/Writer/Indi/Famc.php +++ b/library/PhpGedcom/Writer/Indi/Famc.php @@ -32,7 +32,7 @@ public static function convert(\PhpGedcom\Record\Indi\Famc &$famc, $level = 0) if(empty($_fams)){ return $output; } - $output.= $level." NAME ".$_famc."\n"; + $output.= $level." FAMC @".$_famc."@\n"; // level up $level++; diff --git a/library/PhpGedcom/Writer/Indi/Fams.php b/library/PhpGedcom/Writer/Indi/Fams.php index 09982821..25138419 100644 --- a/library/PhpGedcom/Writer/Indi/Fams.php +++ b/library/PhpGedcom/Writer/Indi/Fams.php @@ -32,7 +32,7 @@ public static function convert(\PhpGedcom\Record\Indi\Fams &$fams, $level = 0) if(empty($_fams)){ return $output; } - $output.= $level." NAME ".$_fams."\n"; + $output.= $level." FAMS @".$_fams."@\n"; // level up $level++; From 178d9d5a2715f8553f82d93ecec01d2eae0bb51a Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Mon, 22 Jun 2020 14:00:09 +0000 Subject: [PATCH 27/99] Change namespace for PSR-0 --- library/PhpGedcom/Writer/Indi/Even/Plac.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/PhpGedcom/Writer/Indi/Even/Plac.php b/library/PhpGedcom/Writer/Indi/Even/Plac.php index 91dc391f..83ec34b4 100644 --- a/library/PhpGedcom/Writer/Indi/Even/Plac.php +++ b/library/PhpGedcom/Writer/Indi/Even/Plac.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace PhpGedcom\Writer\Indi; +namespace PhpGedcom\Writer\Indi\Even; /** * From 2eec70405e5f6e7327d1503a28ab518c183bbd52 Mon Sep 17 00:00:00 2001 From: VFFTECH JSC <67114434+vfftech@users.noreply.github.com> Date: Wed, 22 Jul 2020 10:33:12 +0700 Subject: [PATCH 28/99] Fix Record getData _text --- library/PhpGedcom/Record.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/library/PhpGedcom/Record.php b/library/PhpGedcom/Record.php index 02dbed93..0e155569 100644 --- a/library/PhpGedcom/Record.php +++ b/library/PhpGedcom/Record.php @@ -73,6 +73,14 @@ public function __call($method, $args) } elseif (substr($method, 0, 3) == 'get') { $arr = strtolower(substr($method, 3)); + // hotfix getData + if ('data' == $arr) { + if (!property_exists($this, '_text')) { + throw new \Exception('Unknown ' . get_class($this) . '::' . $arr); + } + return $this->{'_text'}; + } + if (!property_exists($this, '_' . $arr)) { throw new \Exception('Unknown ' . get_class($this) . '::' . $arr); } From 73269ea46e411ea685b0ac0c8d5f376dc63483ad Mon Sep 17 00:00:00 2001 From: jyyblue Date: Tue, 18 Aug 2020 16:49:24 -0700 Subject: [PATCH 29/99] fix record according to standard document. --- library/PhpGedcom/Record/Fam/Slgs/Stat.php | 32 ++++++++ library/PhpGedcom/Record/Indi/Name/Fone.php | 82 +++++++++++++++++++ library/PhpGedcom/Record/Indi/Name/Romn.php | 82 +++++++++++++++++++ library/PhpGedcom/Record/ObjeRef/File.php | 34 ++++++++ .../PhpGedcom/Record/ObjeRef/File/Form.php | 34 ++++++++ library/PhpGedcom/Record/Plac.php | 51 ++++++++++++ library/PhpGedcom/Record/Plac/Fone.php | 34 ++++++++ library/PhpGedcom/Record/Plac/Map.php | 34 ++++++++ library/PhpGedcom/Record/Plac/Romn.php | 34 ++++++++ library/PhpGedcom/Record/Sour/Repo.php | 48 +++++++++++ library/PhpGedcom/Record/Sour/Repo/Caln.php | 30 +++++++ library/PhpGedcom/Record/SourRef/Data.php | 30 +++++++ .../PhpGedcom/Record/SourRef/Data/Text.php | 26 ++++++ 13 files changed, 551 insertions(+) create mode 100644 library/PhpGedcom/Record/Fam/Slgs/Stat.php create mode 100644 library/PhpGedcom/Record/Indi/Name/Fone.php create mode 100644 library/PhpGedcom/Record/Indi/Name/Romn.php create mode 100644 library/PhpGedcom/Record/ObjeRef/File.php create mode 100644 library/PhpGedcom/Record/ObjeRef/File/Form.php create mode 100644 library/PhpGedcom/Record/Plac.php create mode 100644 library/PhpGedcom/Record/Plac/Fone.php create mode 100644 library/PhpGedcom/Record/Plac/Map.php create mode 100644 library/PhpGedcom/Record/Plac/Romn.php create mode 100644 library/PhpGedcom/Record/Sour/Repo.php create mode 100644 library/PhpGedcom/Record/Sour/Repo/Caln.php create mode 100644 library/PhpGedcom/Record/SourRef/Data.php create mode 100644 library/PhpGedcom/Record/SourRef/Data/Text.php diff --git a/library/PhpGedcom/Record/Fam/Slgs/Stat.php b/library/PhpGedcom/Record/Fam/Slgs/Stat.php new file mode 100644 index 00000000..a6094aaa --- /dev/null +++ b/library/PhpGedcom/Record/Fam/Slgs/Stat.php @@ -0,0 +1,32 @@ + + * @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\Name; + +use PhpGedcom\Record; + +/** + * Class Refn + * @package PhpGedcom\Record + */ +class Fone extends Record +{ + /** + * @var string phonetic_variation + */ + protected $fone; + + /** + * @var string phonetic_type + */ + protected $type; + /** + * string name_piece_prefix + */ + protected $_npfx = null; + /** + * string name_piece_given + */ + protected $_givn = null; + /** + * string name_piece_nickname + */ + protected $_nick = null; + /** + * strign name_piece_surname_prefix + */ + protected $_spfx = null; + /** + * string name_piece_surname + */ + protected $_surn = null; + /** + * string name_piece_suffix + */ + protected $_nsfx = null; + + /** + * PhpGedcom\Record\NoteRef + */ + protected $_note = array(); + + /** + * PhpGedcom\Record\SourRef + */ + protected $_sour = array(); + + /** + * + */ + public function addSour($sour = []) { + $this->_sour[] = $sour; + } + + /** + * + */ + public function addNote($note = []) { + $this->_note[] = $note; + } +} diff --git a/library/PhpGedcom/Record/Indi/Name/Romn.php b/library/PhpGedcom/Record/Indi/Name/Romn.php new file mode 100644 index 00000000..224f15ec --- /dev/null +++ b/library/PhpGedcom/Record/Indi/Name/Romn.php @@ -0,0 +1,82 @@ + + * @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\Name; + +use PhpGedcom\Record; + +/** + * Class Refn + * @package PhpGedcom\Record + */ +class Romn extends Record +{ + /** + * @var string romanized_variation + */ + protected $romn; + + /** + * @var string romanized_type + */ + protected $type; + /** + * string name_piece_prefix + */ + protected $_npfx = null; + /** + * string name_piece_given + */ + protected $_givn = null; + /** + * string name_piece_nickname + */ + protected $_nick = null; + /** + * strign name_piece_surname_prefix + */ + protected $_spfx = null; + /** + * string name_piece_surname + */ + protected $_surn = null; + /** + * string name_piece_suffix + */ + protected $_nsfx = null; + + /** + * PhpGedcom\Record\NoteRef + */ + protected $_note = array(); + + /** + * PhpGedcom\Record\SourRef + */ + protected $_sour = array(); + + /** + * + */ + public function addSour($sour = []) { + $this->_sour[] = $sour; + } + + /** + * + */ + public function addNote($note = []) { + $this->_note[] = $note; + } +} diff --git a/library/PhpGedcom/Record/ObjeRef/File.php b/library/PhpGedcom/Record/ObjeRef/File.php new file mode 100644 index 00000000..716658b4 --- /dev/null +++ b/library/PhpGedcom/Record/ObjeRef/File.php @@ -0,0 +1,34 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Record\ObjeRef; + +use PhpGedcom\Record; + +/** + * Class Refn + * @package PhpGedcom\Record + */ +class File extends Record +{ + /** + * @var string multimedia_file_refn + */ + protected $file; + + /** + * @var PhpGedcom\Record\ObjeRef\File\Form + */ + protected $form; +} diff --git a/library/PhpGedcom/Record/ObjeRef/File/Form.php b/library/PhpGedcom/Record/ObjeRef/File/Form.php new file mode 100644 index 00000000..da99cb8c --- /dev/null +++ b/library/PhpGedcom/Record/ObjeRef/File/Form.php @@ -0,0 +1,34 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Record\ObjeRef\File; + +use PhpGedcom\Record; + +/** + * Class Refn + * @package PhpGedcom\Record + */ +class Form extends Record +{ + /** + * @var string multimedia_format + */ + protected $form; + + /** + * @var string source_media_type + */ + protected $medi; +} diff --git a/library/PhpGedcom/Record/Plac.php b/library/PhpGedcom/Record/Plac.php new file mode 100644 index 00000000..19755f92 --- /dev/null +++ b/library/PhpGedcom/Record/Plac.php @@ -0,0 +1,51 @@ + + * @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\Noteable; +/** + * + */ +class Plac extends \PhpGedcom\Record implements Noteable +{ + /** + * string place_hierarchy + */ + protected $_form = null; + /** + * array PhpGedcom\Record\Plac\Fone + */ + protected $_fone = null; + /** + * array PhpGedcom\Record\Plac\Romn + */ + protected $_romn = null; + /** + * PhpGedcom\Record\Plac\Map + */ + protected $_map = null; + /** + * array PhpGedcom\Record\NoteRef + */ + protected $_note= null; + + /** + * @param PhpGedcom\Record\NoteRef $note + * @return Plac + */ + public function addNote($note = null) { + $this->_note[] = $note; + return $this; + } +} diff --git a/library/PhpGedcom/Record/Plac/Fone.php b/library/PhpGedcom/Record/Plac/Fone.php new file mode 100644 index 00000000..a4772bce --- /dev/null +++ b/library/PhpGedcom/Record/Plac/Fone.php @@ -0,0 +1,34 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Record\Plac; + +use PhpGedcom\Record; + +/** + * Class Refn + * @package PhpGedcom\Record + */ +class Fone extends Record +{ + /** + * @var string phonetic_variation + */ + protected $fone; + + /** + * @var string phonetic_type + */ + protected $type; +} diff --git a/library/PhpGedcom/Record/Plac/Map.php b/library/PhpGedcom/Record/Plac/Map.php new file mode 100644 index 00000000..f5b7a100 --- /dev/null +++ b/library/PhpGedcom/Record/Plac/Map.php @@ -0,0 +1,34 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Record\Plac; + +use PhpGedcom\Record; + +/** + * Class Refn + * @package PhpGedcom\Record + */ +class Map extends Record +{ + /** + * @var string place_latitude + */ + protected $lati; + + /** + * @var string place_longitude + */ + protected $long; +} diff --git a/library/PhpGedcom/Record/Plac/Romn.php b/library/PhpGedcom/Record/Plac/Romn.php new file mode 100644 index 00000000..fc1e2a65 --- /dev/null +++ b/library/PhpGedcom/Record/Plac/Romn.php @@ -0,0 +1,34 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Record\Plac; + +use PhpGedcom\Record; + +/** + * Class Refn + * @package PhpGedcom\Record + */ +class Romn extends Record +{ + /** + * @var string romanized_variation + */ + protected $romn; + + /** + * @var string romanized_type + */ + protected $type; +} diff --git a/library/PhpGedcom/Record/Sour/Repo.php b/library/PhpGedcom/Record/Sour/Repo.php new file mode 100644 index 00000000..67dde5d5 --- /dev/null +++ b/library/PhpGedcom/Record/Sour/Repo.php @@ -0,0 +1,48 @@ + + * @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 Repo extends \PhpGedcom\Record implements Noteable +{ + /** + * array PhpGedcom\Record\Sour\Repo\Caln + */ + protected $_caln = array(); + + /** + * array PhpGedcom\Record\NoteRef + */ + protected $_note = array(); + + /** + * + */ + public function addNote($note = []) + { + $this->_note[] = $note; + } + + /** + * + */ + public function addCaln($caln=[]){ + $this->_caln[] = $caln; + } +} diff --git a/library/PhpGedcom/Record/Sour/Repo/Caln.php b/library/PhpGedcom/Record/Sour/Repo/Caln.php new file mode 100644 index 00000000..5465dc89 --- /dev/null +++ b/library/PhpGedcom/Record/Sour/Repo/Caln.php @@ -0,0 +1,30 @@ + + * @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\Repo; + +/** + * + */ +class Caln extends \PhpGedcom\Record +{ + /** + * string source_call_number + */ + protected $_caln = null; + /** + * string source_media_type + */ + protected $_medi = null; +} diff --git a/library/PhpGedcom/Record/SourRef/Data.php b/library/PhpGedcom/Record/SourRef/Data.php new file mode 100644 index 00000000..c06b73ef --- /dev/null +++ b/library/PhpGedcom/Record/SourRef/Data.php @@ -0,0 +1,30 @@ + + * @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 Data extends \PhpGedcom\Record +{ + /** + * string entry_recording_date + */ + protected $_date = null; + /** + * PhpGedcom\Record\SourRef\Data\Text text_from_source + */ + protected $_text = null; +} diff --git a/library/PhpGedcom/Record/SourRef/Data/Text.php b/library/PhpGedcom/Record/SourRef/Data/Text.php new file mode 100644 index 00000000..b473a38a --- /dev/null +++ b/library/PhpGedcom/Record/SourRef/Data/Text.php @@ -0,0 +1,26 @@ + + * @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\Data; + +/** + * + */ +class Data extends \PhpGedcom\Record +{ + /** + * PhpGedcom\Record\SourRef\Data\Text text_from_source + */ + protected $_text = null; +} From f94474733e9f4cec1da46be2162304347d457252 Mon Sep 17 00:00:00 2001 From: jyyblue Date: Thu, 20 Aug 2020 05:25:24 -0700 Subject: [PATCH 30/99] modify phpgedcom-parser according to standard 5.5.1 document. --- library/PhpGedcom/Parser/Fam/Even.php | 2 +- library/PhpGedcom/Parser/Fam/Slgs.php | 3 +- library/PhpGedcom/Parser/Fam/Slgs/Stat.php | 67 ++++++++++++++ library/PhpGedcom/Parser/Indi/Even.php | 2 +- library/PhpGedcom/Parser/Indi/Name.php | 9 ++ library/PhpGedcom/Parser/Indi/Name/Fone.php | 88 ++++++++++++++++++ library/PhpGedcom/Parser/Indi/Name/Romn.php | 89 +++++++++++++++++++ library/PhpGedcom/Parser/ObjeRef.php | 2 +- library/PhpGedcom/Parser/ObjeRef/File.php | 63 +++++++++++++ .../PhpGedcom/Parser/ObjeRef/File/Form.php | 64 +++++++++++++ library/PhpGedcom/Parser/Plac.php | 85 ++++++++++++++++++ library/PhpGedcom/Parser/Plac/Fone.php | 68 ++++++++++++++ library/PhpGedcom/Parser/Plac/Map.php | 64 +++++++++++++ library/PhpGedcom/Parser/Plac/Romn.php | 68 ++++++++++++++ library/PhpGedcom/Parser/Sour.php | 2 +- library/PhpGedcom/Parser/Sour/Repo.php | 66 ++++++++++++++ library/PhpGedcom/Parser/Sour/Repo/Caln.php | 65 ++++++++++++++ library/PhpGedcom/Parser/SourRef.php | 2 +- library/PhpGedcom/Parser/SourRef/Data.php | 62 +++++++++++++ library/PhpGedcom/Record/Fam.php | 2 +- library/PhpGedcom/Record/Indi/Name.php | 4 +- library/PhpGedcom/Record/Plac.php | 4 + library/PhpGedcom/Record/Plac/Fone.php | 4 +- library/PhpGedcom/Record/Sour.php | 2 +- library/PhpGedcom/Record/Sour/Repo.php | 1 + library/PhpGedcom/Record/SourRef/Data.php | 2 +- .../PhpGedcom/Record/SourRef/Data/Text.php | 26 ------ 27 files changed, 878 insertions(+), 38 deletions(-) create mode 100644 library/PhpGedcom/Parser/Fam/Slgs/Stat.php create mode 100644 library/PhpGedcom/Parser/Indi/Name/Fone.php create mode 100644 library/PhpGedcom/Parser/Indi/Name/Romn.php create mode 100644 library/PhpGedcom/Parser/ObjeRef/File.php create mode 100644 library/PhpGedcom/Parser/ObjeRef/File/Form.php create mode 100644 library/PhpGedcom/Parser/Plac.php create mode 100644 library/PhpGedcom/Parser/Plac/Fone.php create mode 100644 library/PhpGedcom/Parser/Plac/Map.php create mode 100644 library/PhpGedcom/Parser/Plac/Romn.php create mode 100644 library/PhpGedcom/Parser/Sour/Repo.php create mode 100644 library/PhpGedcom/Parser/Sour/Repo/Caln.php create mode 100644 library/PhpGedcom/Parser/SourRef/Data.php delete mode 100644 library/PhpGedcom/Record/SourRef/Data/Text.php diff --git a/library/PhpGedcom/Parser/Fam/Even.php b/library/PhpGedcom/Parser/Fam/Even.php index 1f32d7b7..ae99d757 100644 --- a/library/PhpGedcom/Parser/Fam/Even.php +++ b/library/PhpGedcom/Parser/Fam/Even.php @@ -56,7 +56,7 @@ public static function parse(\PhpGedcom\Parser $parser) { //$even->setDate(trim($record[2])); break; case 'PLAC': - $plac = \PhpGedcom\Parser\Indi\Even\Plac::parse($parser); + $plac = \PhpGedcom\Parser\Plac::parse($parser); $even->setPlac($plac); break; case 'ADDR': diff --git a/library/PhpGedcom/Parser/Fam/Slgs.php b/library/PhpGedcom/Parser/Fam/Slgs.php index 52491834..f1e45958 100644 --- a/library/PhpGedcom/Parser/Fam/Slgs.php +++ b/library/PhpGedcom/Parser/Fam/Slgs.php @@ -46,7 +46,8 @@ public static function parse(\PhpGedcom\Parser $parser) switch ($recordType) { case 'STAT': - $slgs->setStat(trim($record[2])); + $stat = \PhpGedcom\Parser\Fam\Slgs\Stat::parse($parser); + $slgs->setStat($stat); break; case 'DATE': $slgs->setDate(trim($record[2])); diff --git a/library/PhpGedcom/Parser/Fam/Slgs/Stat.php b/library/PhpGedcom/Parser/Fam/Slgs/Stat.php new file mode 100644 index 00000000..9bafa755 --- /dev/null +++ b/library/PhpGedcom/Parser/Fam/Slgs/Stat.php @@ -0,0 +1,67 @@ + + * @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\Slgs; + +/** + * + * + */ +class Stat extends \PhpGedcom\Parser\Component +{ + + /** + * + * + */ + public static function parse(\PhpGedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $_stat = $record[2]; + } else { + $parser->skipToNextLevel($depth); + return null; + } + + $stat = new \PhpGedcom\Record\Fam\Slgs\Stat(); + $stat->setStat($_stat); + + $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': + $stat->setDate(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + } + + $parser->forward(); + } + + return $stat; + } +} diff --git a/library/PhpGedcom/Parser/Indi/Even.php b/library/PhpGedcom/Parser/Indi/Even.php index f09136c1..07abfddb 100644 --- a/library/PhpGedcom/Parser/Indi/Even.php +++ b/library/PhpGedcom/Parser/Indi/Even.php @@ -74,7 +74,7 @@ public static function parse(\PhpGedcom\Parser $parser) { //$even->setDate(trim($record[2])) break; case 'PLAC': - $plac = \PhpGedcom\Parser\Indi\Even\Plac::parse($parser); + $plac = \PhpGedcom\Parser\Plac::parse($parser); $even->setPlac($plac); break; case 'ADDR': diff --git a/library/PhpGedcom/Parser/Indi/Name.php b/library/PhpGedcom/Parser/Indi/Name.php index 08038b92..bedcd5db 100644 --- a/library/PhpGedcom/Parser/Indi/Name.php +++ b/library/PhpGedcom/Parser/Indi/Name.php @@ -56,6 +56,9 @@ public static function parse(\PhpGedcom\Parser $parser) } switch ($recordType) { + case 'TYPE': + $name->setType(trim($record[2])); + break; case 'NPFX': $name->setNpfx(trim($record[2])); break; @@ -84,6 +87,12 @@ public static function parse(\PhpGedcom\Parser $parser) $name->addNote($note); } break; + case 'FONE': + $name->setFone(\PhpGedcom\Parser\Indi\Name\Fone::parse($parser)); + break; + case 'ROMN': + $name->setRomn(\PhpGedcom\Parser\Indi\Name\Romn::parse($parser)); + break; default: $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); } diff --git a/library/PhpGedcom/Parser/Indi/Name/Fone.php b/library/PhpGedcom/Parser/Indi/Name/Fone.php new file mode 100644 index 00000000..dd8298f9 --- /dev/null +++ b/library/PhpGedcom/Parser/Indi/Name/Fone.php @@ -0,0 +1,88 @@ + + * @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\Name; + +/** + * + * + */ +class Fone extends \PhpGedcom\Parser\Component +{ + + /** + * + * + */ + public static function parse(\PhpGedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int)$record[0]; + if(isset($record[2])){ + $fone = new \PhpGedcom\Record\Indi\Name\Fone(); + $fone->setFone(trim($record[2])); + } + else{ + return null; + } + + + $parser->forward(); + + while (!$parser->eof()) { + $record = $parser->getCurrentLineRecord(); + $recordType = strtoupper(trim($record[1])); + $currentDepth = (int)$record[0]; + + if ($currentDepth <= $depth) { + $parser->back(); + break; + } + + if (!isset($record[2])) { + $record[2] = ''; + } + + switch ($recordType) { + case 'TYPE': + $fone->setType(trim($record[2])); + break; + case 'NPFX': + $fone->setNpfx(trim($record[2])); + break; + case 'GIVN': + $fone->setGivn(trim($record[2])); + break; + case 'NICK': + $fone->setNick(trim($record[2])); + break; + case 'SPFX': + $fone->setSpfx(trim($record[2])); + break; + case 'SURN': + $fone->setSurn(trim($record[2])); + break; + case 'NSFX': + $fone->setNsfx(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + } + + $parser->forward(); + } + + return $fone; + } +} diff --git a/library/PhpGedcom/Parser/Indi/Name/Romn.php b/library/PhpGedcom/Parser/Indi/Name/Romn.php new file mode 100644 index 00000000..07846b84 --- /dev/null +++ b/library/PhpGedcom/Parser/Indi/Name/Romn.php @@ -0,0 +1,89 @@ + + * @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\Name; + +/** + * + * + */ +class Romn extends \PhpGedcom\Parser\Component +{ + + /** + * + * + */ + public static function parse(\PhpGedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int)$record[0]; + if(isset($record[2])){ + $romn = new \PhpGedcom\Record\Indi\Name\Romn(); + $romn->setRomn(trim($record[2])); + } + else{ + $parser->skipToNextLevel($depth); + return null; + } + + + $parser->forward(); + + while (!$parser->eof()) { + $record = $parser->getCurrentLineRecord(); + $recordType = strtoupper(trim($record[1])); + $currentDepth = (int)$record[0]; + + if ($currentDepth <= $depth) { + $parser->back(); + break; + } + + if (!isset($record[2])) { + $record[2] = ''; + } + + switch ($recordType) { + case 'TYPE': + $romn->setRomn(trim($record[2])); + break; + case 'NPFX': + $romn->setNpfx(trim($record[2])); + break; + case 'GIVN': + $romn->setGivn(trim($record[2])); + break; + case 'NICK': + $romn->setNick(trim($record[2])); + break; + case 'SPFX': + $romn->setSpfx(trim($record[2])); + break; + case 'SURN': + $romn->setSurn(trim($record[2])); + break; + case 'NSFX': + $romn->setNsfx(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + } + + $parser->forward(); + } + + return $romn; + } +} diff --git a/library/PhpGedcom/Parser/ObjeRef.php b/library/PhpGedcom/Parser/ObjeRef.php index 41d545d8..f7d65dd3 100644 --- a/library/PhpGedcom/Parser/ObjeRef.php +++ b/library/PhpGedcom/Parser/ObjeRef.php @@ -54,7 +54,7 @@ public static function parse(\PhpGedcom\Parser $parser) $obje->setTitl(trim($record[2])); break; case 'FILE': - $obje->setFile(trim($record[2])); + $obje->setFile(\PhpGedcom\Parser\ObjeRef\File::parse($parser)); break; case 'FORM': $obje->setForm(trim($record[2])); diff --git a/library/PhpGedcom/Parser/ObjeRef/File.php b/library/PhpGedcom/Parser/ObjeRef/File.php new file mode 100644 index 00000000..ef7e127d --- /dev/null +++ b/library/PhpGedcom/Parser/ObjeRef/File.php @@ -0,0 +1,63 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Parser\ObjeRef; + +/** + * + * + */ +class File extends \PhpGedcom\Parser\Component +{ + + /** + * + * + */ + public static function parse(\PhpGedcom\Parser $parser) + { + $file = new \PhpGedcom\Record\ObjeRef\File(); + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if(isset($record[2])) { + $file->setFile($record[2]); + }else { + return null; + } + $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': + $file->setDate(\PhpGedcom\Parser\ObjeRef\File\Form::parse($parser)); + break; + default: + $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + } + + $parser->forward(); + } + + return $file; + } +} diff --git a/library/PhpGedcom/Parser/ObjeRef/File/Form.php b/library/PhpGedcom/Parser/ObjeRef/File/Form.php new file mode 100644 index 00000000..643827e5 --- /dev/null +++ b/library/PhpGedcom/Parser/ObjeRef/File/Form.php @@ -0,0 +1,64 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Parser\ObjeRef\File; + +/** + * + * + */ +class Form extends \PhpGedcom\Parser\Component +{ + + /** + * + * + */ + public static function parse(\PhpGedcom\Parser $parser) + { + $form = new \PhpGedcom\Record\ObjeRef\File\Form(); + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if(isset($record[2])) { + $form->setForm($record[2]); + } else { + $parser->skipToNextLevel($depth); + return null; + } + $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 'MEDI': + $form->setDate(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + } + + $parser->forward(); + } + + return $form; + } +} diff --git a/library/PhpGedcom/Parser/Plac.php b/library/PhpGedcom/Parser/Plac.php new file mode 100644 index 00000000..11bee323 --- /dev/null +++ b/library/PhpGedcom/Parser/Plac.php @@ -0,0 +1,85 @@ + + * @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 Plac extends \PhpGedcom\Parser\Component +{ + + /** + * + * + */ + public static function parse(\PhpGedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int)$record[0]; + if(isset($record[2])){ + $_plac = trim($record[2]); + } + else{ + $parser->skipToNextLevel($depth); + return null; + } + + $plac = new \PhpGedcom\Record\Plac(); + $plac->setPlac($_plac); + + $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': + $plac->setForm(trim($record[2])); + break; + case 'FONE': + $fone = \PhpGedcom\Parser\Plac\Fone::parse($parser); + $plac->setFone($fone); + break; + case 'ROMN': + $romn = \PhpGedcom\Parser\Plac\Romn::parse($parser); + $plac->setRomn($romn); + break; + case 'NOTE': + if ($note = \PhpGedcom\Parser\NoteRef::parse($parser)) { + $plac->addNote($note); + } + break; + case 'MAP': + $map = \PhpGedcom\Parser\Plac\Map::parse($parser); + $plac->setMap($map); + break; + default: + $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + } + + $parser->forward(); + } + + return $plac; + } +} diff --git a/library/PhpGedcom/Parser/Plac/Fone.php b/library/PhpGedcom/Parser/Plac/Fone.php new file mode 100644 index 00000000..18169067 --- /dev/null +++ b/library/PhpGedcom/Parser/Plac/Fone.php @@ -0,0 +1,68 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Parser\Plac; + +/** + * + * + */ +class Fone extends \PhpGedcom\Parser\Component +{ + + /** + * + * + */ + public static function parse(\PhpGedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int)$record[0]; + if(isset($record[2])){ + $_fone = trim($record[2]); + } + else{ + $parser->skipToNextLevel($depth); + return null; + } + + $fone = new \PhpGedcom\Record\Plac\Fone(); + $fone->setPlac($_fone); + + $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 'TYPE': + $fone->setType(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + } + + $parser->forward(); + } + + return $fone; + } +} diff --git a/library/PhpGedcom/Parser/Plac/Map.php b/library/PhpGedcom/Parser/Plac/Map.php new file mode 100644 index 00000000..b0b2e583 --- /dev/null +++ b/library/PhpGedcom/Parser/Plac/Map.php @@ -0,0 +1,64 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Parser\Plac; + +/** + * + * + */ +class Map extends \PhpGedcom\Parser\Component +{ + + /** + * + * + */ + public static function parse(\PhpGedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int)$record[0]; + + + $map = new \PhpGedcom\Record\Plac\Map(); + + $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 'LATI': + $map->setLati(trim($record[2])); + break; + case 'LONG': + $map->setLong(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + } + + $parser->forward(); + } + + return $map; + } +} diff --git a/library/PhpGedcom/Parser/Plac/Romn.php b/library/PhpGedcom/Parser/Plac/Romn.php new file mode 100644 index 00000000..b9838529 --- /dev/null +++ b/library/PhpGedcom/Parser/Plac/Romn.php @@ -0,0 +1,68 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @package php-gedcom + * @license GPL-3.0 + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace PhpGedcom\Parser\Plac; + +/** + * + * + */ +class Romn extends \PhpGedcom\Parser\Component +{ + + /** + * + * + */ + public static function parse(\PhpGedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int)$record[0]; + if(isset($record[2])){ + $_romn = trim($record[2]); + } + else{ + $parser->skipToNextLevel($depth); + return null; + } + + $romn = new \PhpGedcom\Record\Plac\Romn(); + $romn->setPlac($_romn); + + $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 'TYPE': + $romn->setType(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + } + + $parser->forward(); + } + + return $romn; + } +} diff --git a/library/PhpGedcom/Parser/Sour.php b/library/PhpGedcom/Parser/Sour.php index e5970a8b..d5880599 100644 --- a/library/PhpGedcom/Parser/Sour.php +++ b/library/PhpGedcom/Parser/Sour.php @@ -74,7 +74,7 @@ public static function parse(\PhpGedcom\Parser $parser) $sour->setAbbr(trim($record[2])); break; case 'REPO': - $sour->setRepo(\PhpGedcom\Parser\RepoRef::parse($parser)); + $sour->setRepo(\PhpGedcom\Parser\Sour\Repo::parse($parser)); break; case 'NOTE': $note = \PhpGedcom\Parser\NoteRef::parse($parser); diff --git a/library/PhpGedcom/Parser/Sour/Repo.php b/library/PhpGedcom/Parser/Sour/Repo.php new file mode 100644 index 00000000..5e1d7dce --- /dev/null +++ b/library/PhpGedcom/Parser/Sour/Repo.php @@ -0,0 +1,66 @@ + + * @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 Repo extends \PhpGedcom\Parser\Component +{ + + /** + * + * + */ + public static function parse(\PhpGedcom\Parser $parser) + { + $repo = new \PhpGedcom\Record\Sour\Repo(); + $record = $parser->getCurrentLineRecord(); + $depth = (int)$record[0]; + if (isset($record[2])) { + $_repo = $record[2]; + $repo->setRepo($_repo); + } + + $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': + $repo->addNote(\PhpGedcom\Parser\NoteRef::parse($parser)); + break; + case 'CALN': + $repo->addCaln(\PhpGedcom\Parser\Sour\Repo\Caln::parse($parser)); + break; + default: + $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + } + + $parser->forward(); + } + + return $repo; + } +} diff --git a/library/PhpGedcom/Parser/Sour/Repo/Caln.php b/library/PhpGedcom/Parser/Sour/Repo/Caln.php new file mode 100644 index 00000000..b0f773be --- /dev/null +++ b/library/PhpGedcom/Parser/Sour/Repo/Caln.php @@ -0,0 +1,65 @@ + + * @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\Repo; + +/** + * + * + */ +class Caln extends \PhpGedcom\Parser\Component +{ + + /** + * + * + */ + public static function parse(\PhpGedcom\Parser $parser) + { + $caln = new \PhpGedcom\Record\Sour\Repo\Caln(); + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $_caln = $record[2]; + $caln->setCaln($_caln); + }else{ + return null; + } + + $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 'MEDI': + $caln->setMedi(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + } + + $parser->forward(); + } + + return $caln; + } +} diff --git a/library/PhpGedcom/Parser/SourRef.php b/library/PhpGedcom/Parser/SourRef.php index 2d075f27..17b8b7e5 100644 --- a/library/PhpGedcom/Parser/SourRef.php +++ b/library/PhpGedcom/Parser/SourRef.php @@ -73,7 +73,7 @@ public static function parse(\PhpGedcom\Parser $parser) } break; case 'DATA': - $sour->setData(\PhpGedcom\Parser\Sour\Data::parse($parser)); + $sour->setData(\PhpGedcom\Parser\SourRef\Data::parse($parser)); break; case 'QUAY': $sour->setQuay(trim($record[2])); diff --git a/library/PhpGedcom/Parser/SourRef/Data.php b/library/PhpGedcom/Parser/SourRef/Data.php new file mode 100644 index 00000000..62a7de61 --- /dev/null +++ b/library/PhpGedcom/Parser/SourRef/Data.php @@ -0,0 +1,62 @@ + + * @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 Data extends \PhpGedcom\Parser\Component +{ + + /** + * + * + */ + public static function parse(\PhpGedcom\Parser $parser) + { + $data = new \PhpGedcom\Record\SourRef\Data(); + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + + $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 'TEXT': + $data->setText($parser->parseMultiLineRecord()); + break; + default: + $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + } + + $parser->forward(); + } + + return $data; + } +} diff --git a/library/PhpGedcom/Record/Fam.php b/library/PhpGedcom/Record/Fam.php index 70a2c67d..702276cb 100644 --- a/library/PhpGedcom/Record/Fam.php +++ b/library/PhpGedcom/Record/Fam.php @@ -92,7 +92,7 @@ class Fam extends \PhpGedcom\Record implements Noteable, Sourceable, Objectable /** * */ - public function addEven($even = []) { + public function addEven($even) { $this->_even[$even->getType()] = $even; } diff --git a/library/PhpGedcom/Record/Indi/Name.php b/library/PhpGedcom/Record/Indi/Name.php index 4cd3756b..79bf5cf1 100644 --- a/library/PhpGedcom/Record/Indi/Name.php +++ b/library/PhpGedcom/Record/Indi/Name.php @@ -31,7 +31,9 @@ class Name extends \PhpGedcom\Record implements \PhpGedcom\Record\Sourceable { protected $_spfx = null; protected $_surn = null; protected $_nsfx = null; - + protected $_fone = null; // PhpGedcom/ + protected $_romn = null; + protected $_type = null; /** * */ diff --git a/library/PhpGedcom/Record/Plac.php b/library/PhpGedcom/Record/Plac.php index 19755f92..07725860 100644 --- a/library/PhpGedcom/Record/Plac.php +++ b/library/PhpGedcom/Record/Plac.php @@ -19,6 +19,10 @@ */ class Plac extends \PhpGedcom\Record implements Noteable { + /** + * string plac + */ + protected $_plac = null; /** * string place_hierarchy */ diff --git a/library/PhpGedcom/Record/Plac/Fone.php b/library/PhpGedcom/Record/Plac/Fone.php index a4772bce..9cb42b66 100644 --- a/library/PhpGedcom/Record/Plac/Fone.php +++ b/library/PhpGedcom/Record/Plac/Fone.php @@ -25,10 +25,10 @@ class Fone extends Record /** * @var string phonetic_variation */ - protected $fone; + protected $_fone; /** * @var string phonetic_type */ - protected $type; + protected $_type; } diff --git a/library/PhpGedcom/Record/Sour.php b/library/PhpGedcom/Record/Sour.php index 6b179ad5..982f2015 100644 --- a/library/PhpGedcom/Record/Sour.php +++ b/library/PhpGedcom/Record/Sour.php @@ -181,7 +181,7 @@ public function getPubl() * @param \PhpGedcom\Record\Repo $repo * @return Sour */ - public function setRepo($repo = []) + public function setRepo($repo) { $this->repo = $repo; return $this; diff --git a/library/PhpGedcom/Record/Sour/Repo.php b/library/PhpGedcom/Record/Sour/Repo.php index 67dde5d5..ab29e452 100644 --- a/library/PhpGedcom/Record/Sour/Repo.php +++ b/library/PhpGedcom/Record/Sour/Repo.php @@ -21,6 +21,7 @@ */ class Repo extends \PhpGedcom\Record implements Noteable { + protected $_repo = null; /** * array PhpGedcom\Record\Sour\Repo\Caln */ diff --git a/library/PhpGedcom/Record/SourRef/Data.php b/library/PhpGedcom/Record/SourRef/Data.php index c06b73ef..cffe895b 100644 --- a/library/PhpGedcom/Record/SourRef/Data.php +++ b/library/PhpGedcom/Record/SourRef/Data.php @@ -24,7 +24,7 @@ class Data extends \PhpGedcom\Record */ protected $_date = null; /** - * PhpGedcom\Record\SourRef\Data\Text text_from_source + * string text_from_source */ protected $_text = null; } diff --git a/library/PhpGedcom/Record/SourRef/Data/Text.php b/library/PhpGedcom/Record/SourRef/Data/Text.php deleted file mode 100644 index b473a38a..00000000 --- a/library/PhpGedcom/Record/SourRef/Data/Text.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\SourRef\Data; - -/** - * - */ -class Data extends \PhpGedcom\Record -{ - /** - * PhpGedcom\Record\SourRef\Data\Text text_from_source - */ - protected $_text = null; -} From 229b4e13398152bb8f071a0418098a0837ca6965 Mon Sep 17 00:00:00 2001 From: jyyblue Date: Mon, 24 Aug 2020 05:45:18 -0700 Subject: [PATCH 31/99] .working.y phpgedcom-importer according to standard 5.5.1 document. --- library/PhpGedcom/Parser/ObjeRef.php | 9 --------- library/PhpGedcom/Parser/SourRef.php | 14 +------------- library/PhpGedcom/Record/ObjeRef.php | 19 +------------------ 3 files changed, 2 insertions(+), 40 deletions(-) diff --git a/library/PhpGedcom/Parser/ObjeRef.php b/library/PhpGedcom/Parser/ObjeRef.php index f7d65dd3..806c1b88 100644 --- a/library/PhpGedcom/Parser/ObjeRef.php +++ b/library/PhpGedcom/Parser/ObjeRef.php @@ -56,15 +56,6 @@ public static function parse(\PhpGedcom\Parser $parser) case 'FILE': $obje->setFile(\PhpGedcom\Parser\ObjeRef\File::parse($parser)); 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__); } diff --git a/library/PhpGedcom/Parser/SourRef.php b/library/PhpGedcom/Parser/SourRef.php index 17b8b7e5..a8a96f51 100644 --- a/library/PhpGedcom/Parser/SourRef.php +++ b/library/PhpGedcom/Parser/SourRef.php @@ -31,7 +31,7 @@ public static function parse(\PhpGedcom\Parser $parser) $depth = (int)$record[0]; if(isset($record[2])){ $sour = new \PhpGedcom\Record\SourRef(); - $sour->setSour($record[2]); + $sour->setSour($parser->normalizeIdentifier($record[2])); } else{ $parser->skipToNextLevel($depth); @@ -51,18 +51,6 @@ public static function parse(\PhpGedcom\Parser $parser) } 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; diff --git a/library/PhpGedcom/Record/ObjeRef.php b/library/PhpGedcom/Record/ObjeRef.php index eb56fc86..7c0a3d42 100644 --- a/library/PhpGedcom/Record/ObjeRef.php +++ b/library/PhpGedcom/Record/ObjeRef.php @@ -17,7 +17,7 @@ /** * */ -class ObjeRef extends \PhpGedcom\Record implements Noteable +class ObjeRef extends \PhpGedcom\Record { /** * @@ -29,11 +29,6 @@ class ObjeRef extends \PhpGedcom\Record implements Noteable */ protected $_obje = null; - /** - * - */ - protected $_form = null; - /** * */ @@ -44,10 +39,6 @@ class ObjeRef extends \PhpGedcom\Record implements Noteable */ protected $_file = null; - /** - * - */ - protected $_note = array(); /** * @@ -64,12 +55,4 @@ public function getIsReference() { return $this->_isRef; } - - /** - * - */ - public function addNote($note = []) - { - $this->_note[] = $note; - } } From 126c2c0cc49ad41610cfd2f768917a50271e128b Mon Sep 17 00:00:00 2001 From: jyyblue Date: Sun, 30 Aug 2020 06:25:21 -0700 Subject: [PATCH 32/99] working import --- library/PhpGedcom/Parser/Obje.php | 27 +++--- library/PhpGedcom/Parser/ObjeRef/File.php | 2 + .../PhpGedcom/Parser/ObjeRef/File/Form.php | 5 +- library/PhpGedcom/Parser/SourRef.php | 26 +++--- library/PhpGedcom/Parser/Subm.php | 14 ++- library/PhpGedcom/Parser/Subn.php | 10 +++ library/PhpGedcom/Record/Obje.php | 22 ++++- library/PhpGedcom/Record/ObjeRef/File.php | 2 + .../PhpGedcom/Record/ObjeRef/File/Form.php | 7 ++ library/PhpGedcom/Record/Subm.php | 85 +++++++++++++++++-- library/PhpGedcom/Record/Subn.php | 28 ++++++ 11 files changed, 187 insertions(+), 41 deletions(-) diff --git a/library/PhpGedcom/Parser/Obje.php b/library/PhpGedcom/Parser/Obje.php index f06c6995..8ea72fa3 100644 --- a/library/PhpGedcom/Parser/Obje.php +++ b/library/PhpGedcom/Parser/Obje.php @@ -55,38 +55,33 @@ public static function parse(\PhpGedcom\Parser $parser) } 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])); + case 'FILE': + $obje->setFile(trim($record[2])); break; case 'REFN': $refn = \PhpGedcom\Parser\Refn::parse($parser); $obje->addRefn($refn); break; - case 'BLOB': - $obje->setBlob($parser->parseMultiLineRecord()); + case 'RIN': + $obje->setRin(trim($record[2])); break; + case 'NOTE': $note = \PhpGedcom\Parser\NoteRef::parse($parser); if ($note) { $obje->addNote($note); } break; - case 'CHAN': + case 'SOUR': $chan = \PhpGedcom\Parser\Chan::parse($parser); $obje->setChan($chan); break; - case 'FILE': - $obje->setFile(trim($record[2])); + + case 'CHAN': + $chan = \PhpGedcom\Parser\Chan::parse($parser); + $obje->setChan($chan); break; + default: $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); } diff --git a/library/PhpGedcom/Parser/ObjeRef/File.php b/library/PhpGedcom/Parser/ObjeRef/File.php index ef7e127d..37c7d68e 100644 --- a/library/PhpGedcom/Parser/ObjeRef/File.php +++ b/library/PhpGedcom/Parser/ObjeRef/File.php @@ -51,6 +51,8 @@ public static function parse(\PhpGedcom\Parser $parser) case 'FORM': $file->setDate(\PhpGedcom\Parser\ObjeRef\File\Form::parse($parser)); break; + case 'TITL': + $file->setTitl(trim($record[2])); default: $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); } diff --git a/library/PhpGedcom/Parser/ObjeRef/File/Form.php b/library/PhpGedcom/Parser/ObjeRef/File/Form.php index 643827e5..a41a3eaf 100644 --- a/library/PhpGedcom/Parser/ObjeRef/File/Form.php +++ b/library/PhpGedcom/Parser/ObjeRef/File/Form.php @@ -50,7 +50,10 @@ public static function parse(\PhpGedcom\Parser $parser) switch ($recordType) { case 'MEDI': - $form->setDate(trim($record[2])); + $form->setMedi(trim($record[2])); + break; + case 'TYPE': + $form->setType(trim($record[2])); break; default: $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); diff --git a/library/PhpGedcom/Parser/SourRef.php b/library/PhpGedcom/Parser/SourRef.php index a8a96f51..7c56f141 100644 --- a/library/PhpGedcom/Parser/SourRef.php +++ b/library/PhpGedcom/Parser/SourRef.php @@ -51,28 +51,34 @@ public static function parse(\PhpGedcom\Parser $parser) } switch ($recordType) { + case 'PAGE': + $sour->setPage(trim($record[2])); + break; + case 'EVEN': + $even = \PhpGedcom\Parser\SourRef\Even::parse($parser); + $sour->setEven($even); + break; + case 'DATA': + $sour->setData(\PhpGedcom\Parser\SourRef\Data::parse($parser)); + break; case 'TEXT': $sour->setText($parser->parseMultiLineRecord()); break; + case 'OBJE': + $obje = \PhpGedcom\Parser\ObjeRef::parse($parser); + if ($obje) { + $sour->addNote($obje); + } + break; case 'NOTE': $note = \PhpGedcom\Parser\NoteRef::parse($parser); if ($note) { $sour->addNote($note); } break; - case 'DATA': - $sour->setData(\PhpGedcom\Parser\SourRef\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__); } diff --git a/library/PhpGedcom/Parser/Subm.php b/library/PhpGedcom/Parser/Subm.php index 6609a191..8a333e67 100644 --- a/library/PhpGedcom/Parser/Subm.php +++ b/library/PhpGedcom/Parser/Subm.php @@ -63,9 +63,21 @@ public static function parse(\PhpGedcom\Parser $parser) $subm->setAddr($addr); break; case 'PHON': - $phone = \PhpGedcom\Parser\Phon::parse($parser); + $phone = isset($record[2]) ? trim($record[2]): ''; $subm->addPhon($phone); break; + case 'EMAIL': + $email = isset($record[2]) ? trim($record[2]): ''; + $subm->addEmail($email); + break; + case 'FAX': + $fax = isset($record[2]) ? trim($record[2]): ''; + $subm->addFax($fax); + break; + case 'WWW': + $www = isset($record[2]) ? trim($record[2]): ''; + $subm->addWww($www); + break; case 'NOTE': $note = \PhpGedcom\Parser\NoteRef::parse($parser); if ($note) { diff --git a/library/PhpGedcom/Parser/Subn.php b/library/PhpGedcom/Parser/Subn.php index 77e19b73..ed5c7d0c 100644 --- a/library/PhpGedcom/Parser/Subn.php +++ b/library/PhpGedcom/Parser/Subn.php @@ -76,6 +76,16 @@ public static function parse(\PhpGedcom\Parser $parser) case 'RIN': $subn->setRin(trim($record[2])); break; + case 'NOTE': + $note = \PhpGedcom\Parser\NoteRef::parse($parser); + if ($note) { + $subn->addNote($note); + } + break; + case 'CHAN': + $chan = \PhpGedcom\Parser\Chan::parse($parser); + $subn->setChan($chan); + break; default: $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); } diff --git a/library/PhpGedcom/Record/Obje.php b/library/PhpGedcom/Record/Obje.php index e9f93be5..fc351537 100644 --- a/library/PhpGedcom/Record/Obje.php +++ b/library/PhpGedcom/Record/Obje.php @@ -21,12 +21,9 @@ class Obje extends \PhpGedcom\Record implements Noteable { protected $_id = null; - protected $_form = null; - protected $_titl = null; - protected $_blob = null; + protected $_file = array(); protected $_rin = null; protected $_chan = null; - protected $_file = null; protected $_refn = array(); @@ -35,6 +32,8 @@ class Obje extends \PhpGedcom\Record implements Noteable */ protected $_note = array(); + protected $_sour = array(); + /** * */ @@ -50,4 +49,19 @@ public function addNote($note = []) { $this->_note[] = $note; } + /** + * + */ + public function addFile($file) + { + $this->_file[] = $file; + } + + /** + * + */ + public function addSour($sour) + { + $this->_sour[] = $sour; + } } diff --git a/library/PhpGedcom/Record/ObjeRef/File.php b/library/PhpGedcom/Record/ObjeRef/File.php index 716658b4..278d3834 100644 --- a/library/PhpGedcom/Record/ObjeRef/File.php +++ b/library/PhpGedcom/Record/ObjeRef/File.php @@ -31,4 +31,6 @@ class File extends Record * @var PhpGedcom\Record\ObjeRef\File\Form */ protected $form; + protected $titl; + } diff --git a/library/PhpGedcom/Record/ObjeRef/File/Form.php b/library/PhpGedcom/Record/ObjeRef/File/Form.php index da99cb8c..a08ee89d 100644 --- a/library/PhpGedcom/Record/ObjeRef/File/Form.php +++ b/library/PhpGedcom/Record/ObjeRef/File/Form.php @@ -29,6 +29,13 @@ class Form extends Record /** * @var string source_media_type + * for only obje + */ + protected $type; + + /** + * @var string source_media_type + * for only objeref */ protected $medi; } diff --git a/library/PhpGedcom/Record/Subm.php b/library/PhpGedcom/Record/Subm.php index 21eff443..74754db7 100644 --- a/library/PhpGedcom/Record/Subm.php +++ b/library/PhpGedcom/Record/Subm.php @@ -61,6 +61,21 @@ class Subm extends Record implements Objectable { */ protected $phon = array(); + /** + * @var array + */ + protected $email = array(); + + /** + * @var array + */ + protected $fax = array(); + + /** + * @var array + */ + protected $www = array(); + /** * @var array */ @@ -119,6 +134,67 @@ public function getPhon() { return $this->phon; } + + /** + * @param Record\Phon $phon + * @return Subm + */ + public function addPhon($phon = []) { + $this->phon[] = $phon; + return $this; + } + + /** + * @return array + */ + public function getEmail() { + return $this->email; + } + + + /** + * @param Record\Phon $phon + * @return Subm + */ + public function addEmail($email) { + $this->email[] = $email; + return $this; + } + + /** + * @return array + */ + public function getFax() { + return $this->fax; + } + + + /** + * @param Record\Phon $phon + * @return Subm + */ + public function addFax($fax) { + $this->fax[] = $fax; + return $this; + } + + /** + * @return array + */ + public function getWww() { + return $this->www; + } + + + /** + * @param Record\Phon $phon + * @return Subm + */ + public function addWww($www) { + $this->www[] = $www; + return $this; + } + /** * @param string $rfn * @return Subm @@ -183,15 +259,6 @@ public function addLang($lang = '') { return $this; } - /** - * @param Record\Phon $phon - * @return Subm - */ - public function addPhon($phon = []) { - $this->phon[] = $phon; - return $this; - } - /** * @return Addr */ diff --git a/library/PhpGedcom/Record/Subn.php b/library/PhpGedcom/Record/Subn.php index d2584cdd..9ffba3a6 100644 --- a/library/PhpGedcom/Record/Subn.php +++ b/library/PhpGedcom/Record/Subn.php @@ -62,6 +62,34 @@ class Subn extends Record */ protected $rin; + /** + * @var array + */ + protected $_note = array(); + + /** + * @var \PhpGedcom\Record\Chan + */ + protected $_chan = null; + + public function setChan($chan) { + $this->_chan = $chan; + return $this; + } + + public function getChan() { + return $this->_chan; + } + + public function addNote($note) { + $this->_note[] = $note; + return $this; + } + + public function getNote() { + return $this->_note; + } + /** * @param string $subn * @return Subn From dba9048e603745c5f7d363160e8bd5d0fdeb3bde Mon Sep 17 00:00:00 2001 From: jyyblue Date: Mon, 31 Aug 2020 06:28:22 -0700 Subject: [PATCH 33/99] working on gedcom importer --- library/PhpGedcom/Parser/Note.php | 16 +++--- library/PhpGedcom/Parser/Repo.php | 18 +++++-- library/PhpGedcom/Parser/Sour.php | 42 +++++++-------- library/PhpGedcom/Parser/Sour/Data.php | 4 +- library/PhpGedcom/Record/Note.php | 4 +- library/PhpGedcom/Record/Repo.php | 73 +++++++++++++++++++++++--- library/PhpGedcom/Record/Sour.php | 22 ++++---- library/PhpGedcom/Record/Sour/Data.php | 10 +--- 8 files changed, 122 insertions(+), 67 deletions(-) diff --git a/library/PhpGedcom/Parser/Note.php b/library/PhpGedcom/Parser/Note.php index 963caf43..ed7b35f7 100644 --- a/library/PhpGedcom/Parser/Note.php +++ b/library/PhpGedcom/Parser/Note.php @@ -44,8 +44,6 @@ public static function parse(\PhpGedcom\Parser $parser) $note->setNote($record[3]); } - $parser->getGedcom()->addNote($note); - $parser->forward(); while (!$parser->eof()) { @@ -59,12 +57,8 @@ public static function parse(\PhpGedcom\Parser $parser) } 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]); } @@ -78,20 +72,24 @@ public static function parse(\PhpGedcom\Parser $parser) $refn = \PhpGedcom\Parser\Refn::parse($parser); $note->addRefn($refn); break; - case 'CHAN': - $chan = \PhpGedcom\Parser\Chan::parse($parser); - $note->setChan($chan); + case 'RIN': + $note->setRin(trim($record[2])); break; case 'SOUR': $sour = \PhpGedcom\Parser\SourRef::parse($parser); $note->addSour($sour); break; + case 'CHAN': + $chan = \PhpGedcom\Parser\Chan::parse($parser); + $note->setChan($chan); + break; default: $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); } $parser->forward(); } + $parser->getGedcom()->addNote($note); return $note; } diff --git a/library/PhpGedcom/Parser/Repo.php b/library/PhpGedcom/Parser/Repo.php index dd1dddc6..9050dc94 100644 --- a/library/PhpGedcom/Parser/Repo.php +++ b/library/PhpGedcom/Parser/Repo.php @@ -63,8 +63,16 @@ public static function parse(\PhpGedcom\Parser $parser) $repo->setAddr($addr); break; case 'PHON': - $phon = \PhpGedcom\Parser\Phon::parse($parser); - $repo->addPhon($phon); + $repo->addPhon(trim($record[2])); + break; + case 'EMAIL': + $repo->addEmail(trim($record[2])); + break; + case 'FAX': + $repo->addFax(trim($record[2])); + break; + case 'WWW': + $repo->addWww(trim($record[2])); break; case 'NOTE': if ($note = \PhpGedcom\Parser\NoteRef::parse($parser)) { @@ -75,13 +83,13 @@ public static function parse(\PhpGedcom\Parser $parser) $refn = \PhpGedcom\Parser\Refn::parse($parser); $repo->addRefn($refn); break; + case 'RIN': + $repo->setRin(trim($record[2])); + 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__); } diff --git a/library/PhpGedcom/Parser/Sour.php b/library/PhpGedcom/Parser/Sour.php index d5880599..0d9c928a 100644 --- a/library/PhpGedcom/Parser/Sour.php +++ b/library/PhpGedcom/Parser/Sour.php @@ -55,48 +55,48 @@ public static function parse(\PhpGedcom\Parser $parser) } switch ($recordType) { - case 'TITL': - $sour->setTitl($parser->parseMultilineRecord()); - break; - case 'RIN': - $sour->setRin(trim($record[2])); - break; + case 'DATA': + $sour->setData(\PhpGedcom\Parser\Sour\Data::parse($parser)); + break; case 'AUTH': $sour->setAuth($parser->parseMultilineRecord()); break; - case 'TEXT': - $sour->setText($parser->parseMultilineRecord()); + case 'TITL': + $sour->setTitl($parser->parseMultilineRecord()); + break; + case 'ABBR': + $sour->setAbbr(trim($record[2])); break; case 'PUBL': $sour->setPubl($parser->parseMultilineRecord()); break; - case 'ABBR': - $sour->setAbbr(trim($record[2])); + case 'TEXT': + $sour->setText($parser->parseMultilineRecord()); break; case 'REPO': $sour->setRepo(\PhpGedcom\Parser\Sour\Repo::parse($parser)); break; + case 'REFN': + $refn = \PhpGedcom\Parser\Refn::parse($parser); + $sour->addRefn($refn); + break; + case 'RIN': + $sour->setRin(trim($record[2])); + break; + case 'CHAN': + $chan = \PhpGedcom\Parser\Chan::parse($parser); + $sour->setChan($chan); + 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__); } diff --git a/library/PhpGedcom/Parser/Sour/Data.php b/library/PhpGedcom/Parser/Sour/Data.php index ed8e3edc..40886feb 100644 --- a/library/PhpGedcom/Parser/Sour/Data.php +++ b/library/PhpGedcom/Parser/Sour/Data.php @@ -48,7 +48,7 @@ public static function parse(\PhpGedcom\Parser $parser) case 'EVEN': $data->addEven(\PhpGedcom\Parser\Sour\Data\Even::parse($parser)); break; - case 'DATE': + case 'DATE': // not in 5.5.1 $data->setDate(trim($record[2])); break; case 'AGNC': @@ -60,7 +60,7 @@ public static function parse(\PhpGedcom\Parser $parser) $data->addNote($note); } break; - case 'TEXT': + case 'TEXT': // not in 5.5.1 $data->setText($parser->parseMultiLineRecord()); break; default: diff --git a/library/PhpGedcom/Record/Note.php b/library/PhpGedcom/Record/Note.php index 2476f483..86e0ae6a 100644 --- a/library/PhpGedcom/Record/Note.php +++ b/library/PhpGedcom/Record/Note.php @@ -21,9 +21,8 @@ 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; @@ -32,6 +31,7 @@ class Note extends \PhpGedcom\Record implements Sourceable * */ protected $_sour = array(); + protected $_chan = null; /** * diff --git a/library/PhpGedcom/Record/Repo.php b/library/PhpGedcom/Record/Repo.php index a52010eb..c047dcff 100644 --- a/library/PhpGedcom/Record/Repo.php +++ b/library/PhpGedcom/Record/Repo.php @@ -36,6 +36,22 @@ class Repo extends Record implements Noteable { */ protected $addr; + /** + * @var array + */ + protected $phon = array(); + /** + * @var array + */ + protected $email = array(); + /** + * @var array + */ + protected $fax = array(); + /** + * @var array + */ + protected $www = array(); /** * @var string */ @@ -46,10 +62,7 @@ class Repo extends Record implements Noteable { */ protected $chan; - /** - * @var array - */ - protected $phon = array(); + /** * @var array @@ -62,13 +75,10 @@ class Repo extends Record implements Noteable { protected $note = array(); /** - * @param null|\PhpGedcom\Record\Phon $phons + * @param null * @return Repo */ public function addPhon($phon = null) { - if(empty($phon)) { - $phon = new \PhpGedcom\Record\Phon(); - } $this->phon[] = $phon; return $this; } @@ -80,6 +90,53 @@ public function getPhon() { return $this->phon; } + /** + * @param null + * @return Repo + */ + public function addEmail($email = null) { + $this->email[] = $email; + return $this; + } + + /** + * @return array + */ + public function getEmail() { + return $this->email; + } + + /** + * @param null + * @return Repo + */ + public function addFax($fax = null) { + $this->fax[] = $fax; + return $this; + } + + /** + * @return array + */ + public function getFax() { + return $this->fax; + } + /** + * @param null + * @return Repo + */ + public function addWww($www = null) { + $this->www[] = $www; + return $this; + } + + /** + * @return array + */ + public function getWww() { + return $this->www; + } + /** * @param null|\PhpGedcom\Record\Refn $refn * @return Repo diff --git a/library/PhpGedcom/Record/Sour.php b/library/PhpGedcom/Record/Sour.php index 982f2015..3a809bbd 100644 --- a/library/PhpGedcom/Record/Sour.php +++ b/library/PhpGedcom/Record/Sour.php @@ -28,34 +28,34 @@ class Sour extends Record implements Noteable, Objectable protected $sour; /** - * @var Chan + * @var Data */ - protected $chan; + protected $data; /** * @var string */ - protected $titl; + protected $auth; /** * @var string */ - protected $auth; + protected $titl; /** * @var string */ - protected $data; + protected $abbr; /** * @var string */ - protected $text; + protected $publ; /** * @var string */ - protected $publ; + protected $text; /** * @var Repo @@ -63,9 +63,9 @@ class Sour extends Record implements Noteable, Objectable protected $repo; /** - * @var string + * @var array */ - protected $abbr; + protected $refn = array(); /** * @var string @@ -73,9 +73,9 @@ class Sour extends Record implements Noteable, Objectable protected $rin; /** - * @var array + * @var Chan */ - protected $refn = array(); + protected $chan; /** * @var array diff --git a/library/PhpGedcom/Record/Sour/Data.php b/library/PhpGedcom/Record/Sour/Data.php index f7644ed6..6a697ed1 100644 --- a/library/PhpGedcom/Record/Sour/Data.php +++ b/library/PhpGedcom/Record/Sour/Data.php @@ -25,21 +25,13 @@ class Data extends \PhpGedcom\Record implements Noteable protected $_agnc = null; protected $_date = null; - protected $_text = array(); + protected $_text = null; /** * */ protected $_note = array(); - /** - * - */ - public function addText($text = []) - { - $this->_text[] = $text; - } - /** * */ From 34c9bb51987cda86798eb90c735ff345743d3bed Mon Sep 17 00:00:00 2001 From: jyyblue Date: Wed, 2 Sep 2020 00:54:05 -0700 Subject: [PATCH 34/99] worked import --- library/PhpGedcom/Parser/Fam.php | 50 +++++----- library/PhpGedcom/Parser/Indi.php | 147 +++++++++++++++--------------- library/PhpGedcom/Record/Fam.php | 23 +++-- library/PhpGedcom/Record/Indi.php | 143 +++++++++++++++++------------ 4 files changed, 196 insertions(+), 167 deletions(-) diff --git a/library/PhpGedcom/Parser/Fam.php b/library/PhpGedcom/Parser/Fam.php index 5f9f3dfb..da0958fa 100644 --- a/library/PhpGedcom/Parser/Fam.php +++ b/library/PhpGedcom/Parser/Fam.php @@ -67,6 +67,26 @@ public static function parse(\PhpGedcom\Parser $parser) } switch ($recordType) { + case 'RESN': + $fam->setResn(trim($record[2])); + 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; case 'HUSB': $fam->setHusb($parser->normalizeIdentifier($record[2])); break; @@ -82,13 +102,6 @@ public static function parse(\PhpGedcom\Parser $parser) 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); @@ -96,6 +109,13 @@ public static function parse(\PhpGedcom\Parser $parser) case 'REFN': $ref = \PhpGedcom\Parser\Refn::parse($parser); $fam->addRefn($ref); + break; + case 'RIN': + $fam->setRin(trim($record[2])); + break; + case 'CHAN': + $chan = \PhpGedcom\Parser\Chan::parse($parser); + $fam->setChan($chan); break; case 'NOTE': $note = \PhpGedcom\Parser\NoteRef::parse($parser); @@ -111,23 +131,7 @@ public static function parse(\PhpGedcom\Parser $parser) $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__); } diff --git a/library/PhpGedcom/Parser/Indi.php b/library/PhpGedcom/Parser/Indi.php index ec10555e..0733ea87 100644 --- a/library/PhpGedcom/Parser/Indi.php +++ b/library/PhpGedcom/Parser/Indi.php @@ -54,86 +54,16 @@ public static function parse(\PhpGedcom\Parser $parser) { case '_UID': $indi->setUid(trim($record[2])); break; + case 'RESN': + $indi->setResn(trim($record[2])); + break; 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(isset($record[2]) ? 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); - $chan =isset($record[2]) ? trim($record[2]) : ''; - $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; + break; case 'ADOP': case 'BIRT': case 'BAPM': @@ -182,6 +112,75 @@ public static function parse(\PhpGedcom\Parser $parser) { $att = $class::parse($parser); $indi->addAttr($att); break; + case 'BAPL': + case 'CONL': + case 'ENDL': + case 'SLGC': + $className = ucfirst(strtolower($recordType)); + $class = '\\PhpGedcom\\Parser\\Indi\\' . $className; + + $lds = $class::parse($parser); + $indi->{'add' . $recordType}[] = $lds; + break; + case 'FAMC': + $famc = \PhpGedcom\Parser\Indi\Famc::parse($parser); + if ($famc) { + $indi->addFamc($famc); + } + break; + case 'FAMS': + $fams = \PhpGedcom\Parser\Indi\Fams::parse($parser); + if ($fams) { + $indi->addFams($fams); + } + break; + case 'SUBM': + $indi->addSubm($parser->normalizeIdentifier($record[2])); + break; + case 'ASSO': + $asso = \PhpGedcom\Parser\Indi\Asso::parse($parser); + $indi->addAsso($asso); + break; + case 'ALIA': + $indi->addAlia($parser->normalizeIdentifier($record[2])); + break; + case 'ANCI': + $indi->addAnci($parser->normalizeIdentifier($record[2])); + break; + case 'DESI': + $indi->addDesi($parser->normalizeIdentifier($record[2])); + break; + case 'RFN': + $indi->setRfn(trim($record[2])); + break; + case 'AFN': + $indi->setAfn(trim($record[2])); + break; + case 'REFN': + $ref = \PhpGedcom\Parser\Refn::parse($parser); + $indi->addRefn($ref); + break; + case 'RIN': + $indi->setRin(trim($record[2])); + break; + case 'CHAN': + $chan = \PhpGedcom\Parser\Chan::parse($parser); + $indi->setChan($chan); + 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 'OBJE': + $obje = \PhpGedcom\Parser\ObjeRef::parse($parser); + $indi->addObje($obje); + break; default: $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); } diff --git a/library/PhpGedcom/Record/Fam.php b/library/PhpGedcom/Record/Fam.php index 702276cb..db968188 100644 --- a/library/PhpGedcom/Record/Fam.php +++ b/library/PhpGedcom/Record/Fam.php @@ -27,42 +27,41 @@ class Fam extends \PhpGedcom\Record implements Noteable, Sourceable, Objectable /** * */ - protected $_chan = null; - + protected $_resn = null; + /** * */ - protected $_husb = null; + protected $_even = array(); + /** * */ - protected $_wife = null; + protected $_husb = null; /** * */ - protected $_nchi = null; + protected $_wife = null; /** * */ protected $_chil = array(); - /** * */ - protected $_even = array(); - + protected $_nchi = null; /** * */ - protected $_slgs = array(); + protected $_subm = array(); /** * */ - protected $_subm = array(); + protected $_slgs = array(); /** * @@ -73,6 +72,10 @@ class Fam extends \PhpGedcom\Record implements Noteable, Sourceable, Objectable * */ protected $_rin = null; + /** + * + */ + protected $_chan = null; /** * diff --git a/library/PhpGedcom/Record/Indi.php b/library/PhpGedcom/Record/Indi.php index 8bdea74c..2b91fdae 100644 --- a/library/PhpGedcom/Record/Indi.php +++ b/library/PhpGedcom/Record/Indi.php @@ -38,122 +38,113 @@ class Indi extends Record implements Noteable, Objectable, Sourceable { /** * @var string */ - protected $chan; - + protected $resn; /** - * @var Indi\Attr[] + * @var Indi\Name[] */ - protected $attr = array(); + protected $name = array(); + /** + * @var string + */ + protected $sex; /** * @var Indi\Even[] */ protected $even = array(); - /** - * @var Indi\Note[] + * @var Indi\Attr[] */ - protected $note = array(); + protected $attr = array(); + /** + * @var Indi\Bapl + */ + protected $bapl = array(); /** - * @var Obje[] + * @var Indi\Conl */ - protected $obje = array(); + protected $conl = array(); /** - * @var Sour[] + * @var Indi\Endl */ - protected $sour = array(); + protected $endl = array(); /** - * @var Indi\Name[] + * @var Indi\Slgc */ - protected $name = array(); + protected $slgc = array(); + /** + * @var Indi\Famc[] + */ + protected $famc = array(); + /** + * @var Indi\Fams[] + */ + protected $fams = array(); /** * @var string[] */ - protected $alia = array(); - + protected $subm = array(); /** - * @var string + * @var string[] */ - protected $sex; - + protected $alia = array(); /** - * @var string + * @var string[] */ - protected $rin; - + protected $anci = array(); /** - * @var string + * @var string[] */ - protected $resn; - + protected $desi = array(); /** * @var string */ - protected $rfn; - + protected $rfn; /** * @var string */ protected $afn; - /** - * @var Indi\Fams[] + * @var Refn[] */ - protected $fams = array(); - + protected $refn = array(); /** - * @var Indi\Famc[] + * @var string */ - protected $famc = array(); + protected $rin; /** - * @var Indi\Asso[] + * @var string */ - protected $asso = array(); + protected $chan; - /** - * @var string[] - */ - protected $subm = array(); /** - * @var string[] + * @var Indi\Note[] */ - protected $anci = array(); + protected $note = array(); /** - * @var string[] + * @var Obje[] */ - protected $desi = array(); + protected $obje = array(); /** - * @var Refn[] + * @var Sour[] */ - protected $refn = array(); + protected $sour = array(); - /** - * @var Indi\Bapl - */ - protected $bapl; /** - * @var Indi\Conl + * @var Indi\Asso[] */ - protected $conl; + protected $asso = array(); - /** - * @var Indi\Endl - */ - protected $endl; - /** - * @var Indi\Slgc - */ - protected $slgc; /** * @param string $id @@ -509,7 +500,7 @@ public function getAfn() { * @param string $chan * @return Indi */ - public function setChan($chan = '') { + public function setChan($chan = null) { $this->chan = $chan; return $this; } @@ -545,7 +536,14 @@ public function setBapl($bapl = []) { $this->bapl = $bapl; return $this; } - + /** + * @param Indi\Bapl $bapl + * @return Indi + */ + public function addBapl($bapl = []) { + $this->bapl[] = $bapl; + return $this; + } /** * @return Indi\Bapl */ @@ -561,6 +559,14 @@ public function setConl($conl = []) { $this->conl = $conl; return $this; } + /** + * @param Indi\Conl $conl + * @return Indi + */ + public function addConl($conl) { + $this->conl[] = $conl; + return $this; + } /** * @return Indi\Conl @@ -577,6 +583,14 @@ public function setEndl($endl = []) { $this->endl = $endl; return $this; } + /** + * @param Indi\Endl $endl + * @return Indi + */ + public function addEndl($endl) { + $this->endl[] = $endl; + return $this; + } /** * @return Indi\Endl @@ -594,6 +608,15 @@ public function setSlgc($slgc = []) { return $this; } + /** + * @param Indi\Slgc $slgc + * @return Indi + */ + public function addSlgc($slgc) { + $this->slgc[] = $slgc; + return $this; + } + /** * @return Indi\Slgc */ From 96db6380a4cdac4fd895bdb4b6e36691146441a3 Mon Sep 17 00:00:00 2001 From: jyyblue Date: Thu, 3 Sep 2020 02:46:52 -0700 Subject: [PATCH 35/99] fix issue in import --- library/PhpGedcom/Parser/Sour/Repo.php | 2 +- library/PhpGedcom/Record/Indi.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/PhpGedcom/Parser/Sour/Repo.php b/library/PhpGedcom/Parser/Sour/Repo.php index 5e1d7dce..d9c6ddd7 100644 --- a/library/PhpGedcom/Parser/Sour/Repo.php +++ b/library/PhpGedcom/Parser/Sour/Repo.php @@ -31,7 +31,7 @@ public static function parse(\PhpGedcom\Parser $parser) $record = $parser->getCurrentLineRecord(); $depth = (int)$record[0]; if (isset($record[2])) { - $_repo = $record[2]; + $_repo = $parser->normalizeIdentifier($record[2]); $repo->setRepo($_repo); } diff --git a/library/PhpGedcom/Record/Indi.php b/library/PhpGedcom/Record/Indi.php index 2b91fdae..22266225 100644 --- a/library/PhpGedcom/Record/Indi.php +++ b/library/PhpGedcom/Record/Indi.php @@ -540,7 +540,7 @@ public function setBapl($bapl = []) { * @param Indi\Bapl $bapl * @return Indi */ - public function addBapl($bapl = []) { + public function addBapl($bapl = null) { $this->bapl[] = $bapl; return $this; } From 32fd88e4a6369dc6f7eb7c600461b6ca2264d835 Mon Sep 17 00:00:00 2001 From: jyyblue Date: Thu, 3 Sep 2020 20:02:32 -0700 Subject: [PATCH 36/99] fix import issue --- library/PhpGedcom/Record/ObjeRef/File.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/PhpGedcom/Record/ObjeRef/File.php b/library/PhpGedcom/Record/ObjeRef/File.php index 278d3834..d604d8e0 100644 --- a/library/PhpGedcom/Record/ObjeRef/File.php +++ b/library/PhpGedcom/Record/ObjeRef/File.php @@ -25,12 +25,12 @@ class File extends Record /** * @var string multimedia_file_refn */ - protected $file; + protected $_file; /** * @var PhpGedcom\Record\ObjeRef\File\Form */ - protected $form; - protected $titl; + protected $_form; + protected $_titl; } From 20240228d8b8f52455a291bccf172aa568ee019b Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Mon, 7 Sep 2020 14:51:27 +0100 Subject: [PATCH 37/99] Update license according to master fork changing to MIT from GPL-3.0. Also update composer.json --- composer.json | 8 ++++---- library/PhpGedcom/Gedcom.php | 2 +- library/PhpGedcom/Parser.php | 2 +- library/PhpGedcom/Parser/Addr.php | 2 +- library/PhpGedcom/Parser/Caln.php | 2 +- library/PhpGedcom/Parser/Chan.php | 2 +- library/PhpGedcom/Parser/Component.php | 2 +- library/PhpGedcom/Parser/Date.php | 2 +- library/PhpGedcom/Parser/Fam.php | 2 +- library/PhpGedcom/Parser/Fam/Anul.php | 2 +- library/PhpGedcom/Parser/Fam/Cens.php | 2 +- library/PhpGedcom/Parser/Fam/Div.php | 2 +- library/PhpGedcom/Parser/Fam/Divf.php | 2 +- library/PhpGedcom/Parser/Fam/Enga.php | 2 +- library/PhpGedcom/Parser/Fam/Even.php | 2 +- library/PhpGedcom/Parser/Fam/Even/Husb.php | 2 +- library/PhpGedcom/Parser/Fam/Even/Wife.php | 2 +- library/PhpGedcom/Parser/Fam/Marb.php | 2 +- library/PhpGedcom/Parser/Fam/Marc.php | 2 +- library/PhpGedcom/Parser/Fam/Marl.php | 2 +- library/PhpGedcom/Parser/Fam/Marr.php | 2 +- library/PhpGedcom/Parser/Fam/Mars.php | 2 +- library/PhpGedcom/Parser/Fam/Slgs.php | 2 +- library/PhpGedcom/Parser/Fam/Slgs/Stat.php | 2 +- library/PhpGedcom/Parser/Head.php | 2 +- library/PhpGedcom/Parser/Head/Char.php | 2 +- library/PhpGedcom/Parser/Head/Date.php | 2 +- library/PhpGedcom/Parser/Head/Gedc.php | 2 +- library/PhpGedcom/Parser/Head/Plac.php | 2 +- library/PhpGedcom/Parser/Head/Sour.php | 2 +- library/PhpGedcom/Parser/Head/Sour/Corp.php | 2 +- library/PhpGedcom/Parser/Head/Sour/Data.php | 2 +- library/PhpGedcom/Parser/Indi.php | 2 +- library/PhpGedcom/Parser/Indi/Adop.php | 2 +- library/PhpGedcom/Parser/Indi/Asso.php | 2 +- library/PhpGedcom/Parser/Indi/Attr.php | 2 +- library/PhpGedcom/Parser/Indi/Bapl.php | 2 +- library/PhpGedcom/Parser/Indi/Bapm.php | 2 +- library/PhpGedcom/Parser/Indi/Barm.php | 2 +- library/PhpGedcom/Parser/Indi/Basm.php | 2 +- library/PhpGedcom/Parser/Indi/Birt.php | 2 +- library/PhpGedcom/Parser/Indi/Bles.php | 2 +- library/PhpGedcom/Parser/Indi/Buri.php | 2 +- library/PhpGedcom/Parser/Indi/Cast.php | 2 +- library/PhpGedcom/Parser/Indi/Cens.php | 2 +- library/PhpGedcom/Parser/Indi/Chr.php | 2 +- library/PhpGedcom/Parser/Indi/Chra.php | 2 +- library/PhpGedcom/Parser/Indi/Conf.php | 2 +- library/PhpGedcom/Parser/Indi/Conl.php | 2 +- library/PhpGedcom/Parser/Indi/Crem.php | 2 +- library/PhpGedcom/Parser/Indi/Deat.php | 2 +- library/PhpGedcom/Parser/Indi/Dscr.php | 2 +- library/PhpGedcom/Parser/Indi/Educ.php | 2 +- library/PhpGedcom/Parser/Indi/Emig.php | 2 +- library/PhpGedcom/Parser/Indi/Endl.php | 2 +- library/PhpGedcom/Parser/Indi/Even.php | 2 +- library/PhpGedcom/Parser/Indi/Even/Plac.php | 2 +- library/PhpGedcom/Parser/Indi/Famc.php | 2 +- library/PhpGedcom/Parser/Indi/Fams.php | 2 +- library/PhpGedcom/Parser/Indi/Fcom.php | 2 +- library/PhpGedcom/Parser/Indi/Grad.php | 2 +- library/PhpGedcom/Parser/Indi/Idno.php | 2 +- library/PhpGedcom/Parser/Indi/Immi.php | 2 +- library/PhpGedcom/Parser/Indi/Lds.php | 2 +- library/PhpGedcom/Parser/Indi/Name.php | 2 +- library/PhpGedcom/Parser/Indi/Name/Fone.php | 2 +- library/PhpGedcom/Parser/Indi/Name/Romn.php | 2 +- library/PhpGedcom/Parser/Indi/Nati.php | 2 +- library/PhpGedcom/Parser/Indi/Natu.php | 2 +- library/PhpGedcom/Parser/Indi/Nchi.php | 2 +- library/PhpGedcom/Parser/Indi/Nmr.php | 2 +- library/PhpGedcom/Parser/Indi/Occu.php | 2 +- library/PhpGedcom/Parser/Indi/Ordn.php | 2 +- library/PhpGedcom/Parser/Indi/Prob.php | 2 +- library/PhpGedcom/Parser/Indi/Prop.php | 2 +- library/PhpGedcom/Parser/Indi/Reli.php | 2 +- library/PhpGedcom/Parser/Indi/Resi.php | 2 +- library/PhpGedcom/Parser/Indi/Reti.php | 2 +- library/PhpGedcom/Parser/Indi/Slgc.php | 2 +- library/PhpGedcom/Parser/Indi/Ssn.php | 2 +- library/PhpGedcom/Parser/Indi/Titl.php | 2 +- library/PhpGedcom/Parser/Indi/Will.php | 2 +- library/PhpGedcom/Parser/Note.php | 2 +- library/PhpGedcom/Parser/NoteRef.php | 2 +- library/PhpGedcom/Parser/Obje.php | 2 +- library/PhpGedcom/Parser/ObjeRef.php | 2 +- library/PhpGedcom/Parser/ObjeRef/File.php | 2 +- library/PhpGedcom/Parser/ObjeRef/File/Form.php | 2 +- library/PhpGedcom/Parser/Phon.php | 2 +- library/PhpGedcom/Parser/Plac.php | 2 +- library/PhpGedcom/Parser/Plac/Fone.php | 2 +- library/PhpGedcom/Parser/Plac/Map.php | 2 +- library/PhpGedcom/Parser/Plac/Romn.php | 2 +- library/PhpGedcom/Parser/Refn.php | 2 +- library/PhpGedcom/Parser/Repo.php | 2 +- library/PhpGedcom/Parser/RepoRef.php | 2 +- library/PhpGedcom/Parser/Sour.php | 2 +- library/PhpGedcom/Parser/Sour/Data.php | 2 +- library/PhpGedcom/Parser/Sour/Data/Even.php | 2 +- library/PhpGedcom/Parser/Sour/Repo.php | 2 +- library/PhpGedcom/Parser/Sour/Repo/Caln.php | 2 +- library/PhpGedcom/Parser/SourRef.php | 2 +- library/PhpGedcom/Parser/SourRef/Data.php | 2 +- library/PhpGedcom/Parser/SourRef/Even.php | 2 +- library/PhpGedcom/Parser/Subm.php | 2 +- library/PhpGedcom/Parser/Subn.php | 2 +- library/PhpGedcom/Record.php | 2 +- library/PhpGedcom/Record/Addr.php | 2 +- library/PhpGedcom/Record/Caln.php | 2 +- library/PhpGedcom/Record/Chan.php | 2 +- library/PhpGedcom/Record/Data.php | 2 +- library/PhpGedcom/Record/Date.php | 2 +- library/PhpGedcom/Record/Fam.php | 2 +- library/PhpGedcom/Record/Fam/Anul.php | 2 +- library/PhpGedcom/Record/Fam/Cens.php | 2 +- library/PhpGedcom/Record/Fam/Div.php | 2 +- library/PhpGedcom/Record/Fam/Enga.php | 2 +- library/PhpGedcom/Record/Fam/Even.php | 2 +- library/PhpGedcom/Record/Fam/Even/Husb.php | 2 +- library/PhpGedcom/Record/Fam/Even/Wife.php | 2 +- library/PhpGedcom/Record/Fam/Marb.php | 2 +- library/PhpGedcom/Record/Fam/Marc.php | 2 +- library/PhpGedcom/Record/Fam/Marl.php | 2 +- library/PhpGedcom/Record/Fam/Marr.php | 2 +- library/PhpGedcom/Record/Fam/Mars.php | 2 +- library/PhpGedcom/Record/Fam/Slgs.php | 2 +- library/PhpGedcom/Record/Fam/Slgs/Stat.php | 2 +- library/PhpGedcom/Record/Head.php | 2 +- library/PhpGedcom/Record/Head/Char.php | 2 +- library/PhpGedcom/Record/Head/Date.php | 2 +- library/PhpGedcom/Record/Head/Gedc.php | 2 +- library/PhpGedcom/Record/Head/Plac.php | 2 +- library/PhpGedcom/Record/Head/Sour.php | 2 +- library/PhpGedcom/Record/Head/Sour/Corp.php | 2 +- library/PhpGedcom/Record/Head/Sour/Data.php | 2 +- library/PhpGedcom/Record/Indi.php | 2 +- library/PhpGedcom/Record/Indi/Adop.php | 2 +- library/PhpGedcom/Record/Indi/Asso.php | 2 +- library/PhpGedcom/Record/Indi/Attr.php | 2 +- library/PhpGedcom/Record/Indi/Bapl.php | 2 +- library/PhpGedcom/Record/Indi/Bapm.php | 2 +- library/PhpGedcom/Record/Indi/Barm.php | 2 +- library/PhpGedcom/Record/Indi/Basm.php | 2 +- library/PhpGedcom/Record/Indi/Birt.php | 2 +- library/PhpGedcom/Record/Indi/Bles.php | 2 +- library/PhpGedcom/Record/Indi/Buri.php | 2 +- library/PhpGedcom/Record/Indi/Cast.php | 2 +- library/PhpGedcom/Record/Indi/Cens.php | 2 +- library/PhpGedcom/Record/Indi/Chr.php | 2 +- library/PhpGedcom/Record/Indi/Chra.php | 2 +- library/PhpGedcom/Record/Indi/Conf.php | 2 +- library/PhpGedcom/Record/Indi/Conl.php | 2 +- library/PhpGedcom/Record/Indi/Crem.php | 2 +- library/PhpGedcom/Record/Indi/Deat.php | 2 +- library/PhpGedcom/Record/Indi/Dscr.php | 2 +- library/PhpGedcom/Record/Indi/Educ.php | 2 +- library/PhpGedcom/Record/Indi/Emig.php | 2 +- library/PhpGedcom/Record/Indi/Endl.php | 2 +- library/PhpGedcom/Record/Indi/Even.php | 2 +- library/PhpGedcom/Record/Indi/Even/Plac.php | 2 +- library/PhpGedcom/Record/Indi/Famc.php | 2 +- library/PhpGedcom/Record/Indi/Fams.php | 2 +- library/PhpGedcom/Record/Indi/Fcom.php | 2 +- library/PhpGedcom/Record/Indi/Grad.php | 2 +- library/PhpGedcom/Record/Indi/Idno.php | 2 +- library/PhpGedcom/Record/Indi/Immi.php | 2 +- library/PhpGedcom/Record/Indi/Lds.php | 2 +- library/PhpGedcom/Record/Indi/Name.php | 2 +- library/PhpGedcom/Record/Indi/Name/Fone.php | 2 +- library/PhpGedcom/Record/Indi/Name/Romn.php | 2 +- library/PhpGedcom/Record/Indi/Nati.php | 2 +- library/PhpGedcom/Record/Indi/Natu.php | 2 +- library/PhpGedcom/Record/Indi/Nchi.php | 2 +- library/PhpGedcom/Record/Indi/Nmr.php | 2 +- library/PhpGedcom/Record/Indi/Note.php | 2 +- library/PhpGedcom/Record/Indi/Occu.php | 2 +- library/PhpGedcom/Record/Indi/Ordn.php | 2 +- library/PhpGedcom/Record/Indi/Prob.php | 2 +- library/PhpGedcom/Record/Indi/Prop.php | 2 +- library/PhpGedcom/Record/Indi/Reli.php | 2 +- library/PhpGedcom/Record/Indi/Resi.php | 2 +- library/PhpGedcom/Record/Indi/Reti.php | 2 +- library/PhpGedcom/Record/Indi/Slgc.php | 2 +- library/PhpGedcom/Record/Indi/Ssn.php | 2 +- library/PhpGedcom/Record/Indi/Titl.php | 2 +- library/PhpGedcom/Record/Indi/Will.php | 2 +- library/PhpGedcom/Record/Note.php | 2 +- library/PhpGedcom/Record/NoteRef.php | 2 +- library/PhpGedcom/Record/Noteable.php | 2 +- library/PhpGedcom/Record/Obje.php | 2 +- library/PhpGedcom/Record/ObjeRef.php | 2 +- library/PhpGedcom/Record/ObjeRef/File.php | 2 +- library/PhpGedcom/Record/ObjeRef/File/Form.php | 2 +- library/PhpGedcom/Record/Objectable.php | 2 +- library/PhpGedcom/Record/Phon.php | 2 +- library/PhpGedcom/Record/Plac.php | 2 +- library/PhpGedcom/Record/Plac/Fone.php | 2 +- library/PhpGedcom/Record/Plac/Map.php | 2 +- library/PhpGedcom/Record/Plac/Romn.php | 2 +- library/PhpGedcom/Record/Refn.php | 2 +- library/PhpGedcom/Record/Repo.php | 2 +- library/PhpGedcom/Record/RepoRef.php | 2 +- library/PhpGedcom/Record/Sour.php | 2 +- library/PhpGedcom/Record/Sour/Data.php | 2 +- library/PhpGedcom/Record/Sour/Data/Even.php | 2 +- library/PhpGedcom/Record/Sour/Repo.php | 2 +- library/PhpGedcom/Record/Sour/Repo/Caln.php | 2 +- library/PhpGedcom/Record/SourRef.php | 2 +- library/PhpGedcom/Record/SourRef/Data.php | 2 +- library/PhpGedcom/Record/SourRef/Even.php | 2 +- library/PhpGedcom/Record/Sourceable.php | 2 +- library/PhpGedcom/Record/Subm.php | 2 +- library/PhpGedcom/Record/Subn.php | 2 +- library/PhpGedcom/Writer.php | 2 +- library/PhpGedcom/Writer/Addr.php | 2 +- library/PhpGedcom/Writer/Caln.php | 2 +- library/PhpGedcom/Writer/Chan.php | 2 +- library/PhpGedcom/Writer/Fam.php | 2 +- library/PhpGedcom/Writer/Fam/Even.php | 2 +- library/PhpGedcom/Writer/Fam/Even/Husb.php | 2 +- library/PhpGedcom/Writer/Fam/Even/Wife.php | 2 +- library/PhpGedcom/Writer/Fam/Slgs.php | 2 +- library/PhpGedcom/Writer/Head.php | 2 +- library/PhpGedcom/Writer/Head/Char.php | 2 +- library/PhpGedcom/Writer/Head/Date.php | 2 +- library/PhpGedcom/Writer/Head/Gedc.php | 2 +- library/PhpGedcom/Writer/Head/Plac.php | 2 +- library/PhpGedcom/Writer/Head/Sour.php | 2 +- library/PhpGedcom/Writer/Head/Sour/Corp.php | 2 +- library/PhpGedcom/Writer/Head/Sour/Data.php | 2 +- library/PhpGedcom/Writer/Indi.php | 2 +- library/PhpGedcom/Writer/Indi/Asso.php | 2 +- library/PhpGedcom/Writer/Indi/Attr.php | 2 +- library/PhpGedcom/Writer/Indi/Even.php | 2 +- library/PhpGedcom/Writer/Indi/Even/Plac.php | 2 +- library/PhpGedcom/Writer/Indi/Famc.php | 2 +- library/PhpGedcom/Writer/Indi/Fams.php | 2 +- library/PhpGedcom/Writer/Indi/Name.php | 2 +- library/PhpGedcom/Writer/Note.php | 2 +- library/PhpGedcom/Writer/NoteRef.php | 2 +- library/PhpGedcom/Writer/Obje.php | 2 +- library/PhpGedcom/Writer/ObjeRef.php | 2 +- library/PhpGedcom/Writer/Phon.php | 2 +- library/PhpGedcom/Writer/Refn.php | 2 +- library/PhpGedcom/Writer/Repo.php | 2 +- library/PhpGedcom/Writer/RepoRef.php | 2 +- library/PhpGedcom/Writer/Sour.php | 2 +- library/PhpGedcom/Writer/Sour/Data.php | 2 +- library/PhpGedcom/Writer/Sour/Data/Even.php | 2 +- library/PhpGedcom/Writer/SourRef.php | 2 +- library/PhpGedcom/Writer/SourRef/Even.php | 2 +- library/PhpGedcom/Writer/Subm.php | 2 +- library/PhpGedcom/Writer/Subn.php | 2 +- tests/library/Gedcom/ParserTest.php | 2 +- 254 files changed, 257 insertions(+), 257 deletions(-) diff --git a/composer.json b/composer.json index 935890a2..ae3a516a 100644 --- a/composer.json +++ b/composer.json @@ -3,14 +3,14 @@ "description": "A GEDCOM file parser (read + write) for PHP 5.3+", "type": "library", "keywords": ["gedcom","parser"], - "homepage": "http://github.com/oguz463/php-gedcom", - "license": "GPL-3.0", + "homepage": "http://github.com/modularsoftware/php-gedcom", + "license": "MIT", "require": { "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "3.7.*", - "squizlabs/php_codesniffer": "1.*" + "phpunit/phpunit": "5.7.*", + "squizlabs/php_codesniffer": "3.5.*" }, "autoload": { "psr-0": { diff --git a/library/PhpGedcom/Gedcom.php b/library/PhpGedcom/Gedcom.php index b5e317df..cc13f74d 100644 --- a/library/PhpGedcom/Gedcom.php +++ b/library/PhpGedcom/Gedcom.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser.php b/library/PhpGedcom/Parser.php index 4c9554ab..56373239 100644 --- a/library/PhpGedcom/Parser.php +++ b/library/PhpGedcom/Parser.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Addr.php b/library/PhpGedcom/Parser/Addr.php index 1b0160e9..6cc8555e 100644 --- a/library/PhpGedcom/Parser/Addr.php +++ b/library/PhpGedcom/Parser/Addr.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Caln.php b/library/PhpGedcom/Parser/Caln.php index 75466449..4ffc2f2c 100644 --- a/library/PhpGedcom/Parser/Caln.php +++ b/library/PhpGedcom/Parser/Caln.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Chan.php b/library/PhpGedcom/Parser/Chan.php index ca34d2f2..5df7b589 100644 --- a/library/PhpGedcom/Parser/Chan.php +++ b/library/PhpGedcom/Parser/Chan.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Component.php b/library/PhpGedcom/Parser/Component.php index a1e37aff..50aaf487 100644 --- a/library/PhpGedcom/Parser/Component.php +++ b/library/PhpGedcom/Parser/Component.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Date.php b/library/PhpGedcom/Parser/Date.php index ac46d390..dc19a9c6 100644 --- a/library/PhpGedcom/Parser/Date.php +++ b/library/PhpGedcom/Parser/Date.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Fam.php b/library/PhpGedcom/Parser/Fam.php index da0958fa..6dc273c3 100644 --- a/library/PhpGedcom/Parser/Fam.php +++ b/library/PhpGedcom/Parser/Fam.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Fam/Anul.php b/library/PhpGedcom/Parser/Fam/Anul.php index 74468ab0..3b82f82a 100644 --- a/library/PhpGedcom/Parser/Fam/Anul.php +++ b/library/PhpGedcom/Parser/Fam/Anul.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Fam/Cens.php b/library/PhpGedcom/Parser/Fam/Cens.php index 73a1b384..959e9fec 100644 --- a/library/PhpGedcom/Parser/Fam/Cens.php +++ b/library/PhpGedcom/Parser/Fam/Cens.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Fam/Div.php b/library/PhpGedcom/Parser/Fam/Div.php index bc6e07c0..3c7941bd 100644 --- a/library/PhpGedcom/Parser/Fam/Div.php +++ b/library/PhpGedcom/Parser/Fam/Div.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Fam/Divf.php b/library/PhpGedcom/Parser/Fam/Divf.php index e7c810f8..165a5d61 100644 --- a/library/PhpGedcom/Parser/Fam/Divf.php +++ b/library/PhpGedcom/Parser/Fam/Divf.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Fam/Enga.php b/library/PhpGedcom/Parser/Fam/Enga.php index c145b273..a66eb00f 100644 --- a/library/PhpGedcom/Parser/Fam/Enga.php +++ b/library/PhpGedcom/Parser/Fam/Enga.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Fam/Even.php b/library/PhpGedcom/Parser/Fam/Even.php index ae99d757..c006bf8a 100644 --- a/library/PhpGedcom/Parser/Fam/Even.php +++ b/library/PhpGedcom/Parser/Fam/Even.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Fam/Even/Husb.php b/library/PhpGedcom/Parser/Fam/Even/Husb.php index c07123d8..5cfa0034 100644 --- a/library/PhpGedcom/Parser/Fam/Even/Husb.php +++ b/library/PhpGedcom/Parser/Fam/Even/Husb.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Fam/Even/Wife.php b/library/PhpGedcom/Parser/Fam/Even/Wife.php index d2951fae..99565167 100644 --- a/library/PhpGedcom/Parser/Fam/Even/Wife.php +++ b/library/PhpGedcom/Parser/Fam/Even/Wife.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Fam/Marb.php b/library/PhpGedcom/Parser/Fam/Marb.php index 001a19e3..871b7195 100644 --- a/library/PhpGedcom/Parser/Fam/Marb.php +++ b/library/PhpGedcom/Parser/Fam/Marb.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Fam/Marc.php b/library/PhpGedcom/Parser/Fam/Marc.php index 7d45b9bc..2d094385 100644 --- a/library/PhpGedcom/Parser/Fam/Marc.php +++ b/library/PhpGedcom/Parser/Fam/Marc.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Fam/Marl.php b/library/PhpGedcom/Parser/Fam/Marl.php index fb5949b8..29d27133 100644 --- a/library/PhpGedcom/Parser/Fam/Marl.php +++ b/library/PhpGedcom/Parser/Fam/Marl.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Fam/Marr.php b/library/PhpGedcom/Parser/Fam/Marr.php index a81dcac5..9ae0d67c 100644 --- a/library/PhpGedcom/Parser/Fam/Marr.php +++ b/library/PhpGedcom/Parser/Fam/Marr.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Fam/Mars.php b/library/PhpGedcom/Parser/Fam/Mars.php index f219369b..aa98d639 100644 --- a/library/PhpGedcom/Parser/Fam/Mars.php +++ b/library/PhpGedcom/Parser/Fam/Mars.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Fam/Slgs.php b/library/PhpGedcom/Parser/Fam/Slgs.php index f1e45958..38605c91 100644 --- a/library/PhpGedcom/Parser/Fam/Slgs.php +++ b/library/PhpGedcom/Parser/Fam/Slgs.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Fam/Slgs/Stat.php b/library/PhpGedcom/Parser/Fam/Slgs/Stat.php index 9bafa755..ca9e0acc 100644 --- a/library/PhpGedcom/Parser/Fam/Slgs/Stat.php +++ b/library/PhpGedcom/Parser/Fam/Slgs/Stat.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Head.php b/library/PhpGedcom/Parser/Head.php index fe81360a..542e0a29 100644 --- a/library/PhpGedcom/Parser/Head.php +++ b/library/PhpGedcom/Parser/Head.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Head/Char.php b/library/PhpGedcom/Parser/Head/Char.php index 02788dac..2bb8fc52 100644 --- a/library/PhpGedcom/Parser/Head/Char.php +++ b/library/PhpGedcom/Parser/Head/Char.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Head/Date.php b/library/PhpGedcom/Parser/Head/Date.php index 23ee5ed0..1bf2fd7c 100644 --- a/library/PhpGedcom/Parser/Head/Date.php +++ b/library/PhpGedcom/Parser/Head/Date.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Head/Gedc.php b/library/PhpGedcom/Parser/Head/Gedc.php index e4c7742a..7e2ed7fb 100644 --- a/library/PhpGedcom/Parser/Head/Gedc.php +++ b/library/PhpGedcom/Parser/Head/Gedc.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Head/Plac.php b/library/PhpGedcom/Parser/Head/Plac.php index e857abe4..14f5cf5c 100644 --- a/library/PhpGedcom/Parser/Head/Plac.php +++ b/library/PhpGedcom/Parser/Head/Plac.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Head/Sour.php b/library/PhpGedcom/Parser/Head/Sour.php index e13a9214..09c28601 100644 --- a/library/PhpGedcom/Parser/Head/Sour.php +++ b/library/PhpGedcom/Parser/Head/Sour.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Head/Sour/Corp.php b/library/PhpGedcom/Parser/Head/Sour/Corp.php index acb15595..c049eb35 100644 --- a/library/PhpGedcom/Parser/Head/Sour/Corp.php +++ b/library/PhpGedcom/Parser/Head/Sour/Corp.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Head/Sour/Data.php b/library/PhpGedcom/Parser/Head/Sour/Data.php index 2884fc98..c18f4e07 100644 --- a/library/PhpGedcom/Parser/Head/Sour/Data.php +++ b/library/PhpGedcom/Parser/Head/Sour/Data.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi.php b/library/PhpGedcom/Parser/Indi.php index 0733ea87..fb280a28 100644 --- a/library/PhpGedcom/Parser/Indi.php +++ b/library/PhpGedcom/Parser/Indi.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Adop.php b/library/PhpGedcom/Parser/Indi/Adop.php index 020a89ce..ebe3125d 100644 --- a/library/PhpGedcom/Parser/Indi/Adop.php +++ b/library/PhpGedcom/Parser/Indi/Adop.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Asso.php b/library/PhpGedcom/Parser/Indi/Asso.php index 8313244b..9b2b96d0 100644 --- a/library/PhpGedcom/Parser/Indi/Asso.php +++ b/library/PhpGedcom/Parser/Indi/Asso.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Attr.php b/library/PhpGedcom/Parser/Indi/Attr.php index 99cad602..0f49dc36 100644 --- a/library/PhpGedcom/Parser/Indi/Attr.php +++ b/library/PhpGedcom/Parser/Indi/Attr.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Bapl.php b/library/PhpGedcom/Parser/Indi/Bapl.php index 9407880b..51f7b5ff 100644 --- a/library/PhpGedcom/Parser/Indi/Bapl.php +++ b/library/PhpGedcom/Parser/Indi/Bapl.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Bapm.php b/library/PhpGedcom/Parser/Indi/Bapm.php index 57a18c56..89473790 100644 --- a/library/PhpGedcom/Parser/Indi/Bapm.php +++ b/library/PhpGedcom/Parser/Indi/Bapm.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Barm.php b/library/PhpGedcom/Parser/Indi/Barm.php index 9ff70285..7528ebf5 100644 --- a/library/PhpGedcom/Parser/Indi/Barm.php +++ b/library/PhpGedcom/Parser/Indi/Barm.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Basm.php b/library/PhpGedcom/Parser/Indi/Basm.php index 6e055d72..c2b69827 100644 --- a/library/PhpGedcom/Parser/Indi/Basm.php +++ b/library/PhpGedcom/Parser/Indi/Basm.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Birt.php b/library/PhpGedcom/Parser/Indi/Birt.php index 2b31cf50..24a9c5cb 100644 --- a/library/PhpGedcom/Parser/Indi/Birt.php +++ b/library/PhpGedcom/Parser/Indi/Birt.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Bles.php b/library/PhpGedcom/Parser/Indi/Bles.php index bf913000..8e980649 100644 --- a/library/PhpGedcom/Parser/Indi/Bles.php +++ b/library/PhpGedcom/Parser/Indi/Bles.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Buri.php b/library/PhpGedcom/Parser/Indi/Buri.php index 0a430784..d7a7f44f 100644 --- a/library/PhpGedcom/Parser/Indi/Buri.php +++ b/library/PhpGedcom/Parser/Indi/Buri.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Cast.php b/library/PhpGedcom/Parser/Indi/Cast.php index a069d8d9..444537c5 100644 --- a/library/PhpGedcom/Parser/Indi/Cast.php +++ b/library/PhpGedcom/Parser/Indi/Cast.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Cens.php b/library/PhpGedcom/Parser/Indi/Cens.php index c4f7a7b8..f49bd006 100644 --- a/library/PhpGedcom/Parser/Indi/Cens.php +++ b/library/PhpGedcom/Parser/Indi/Cens.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Chr.php b/library/PhpGedcom/Parser/Indi/Chr.php index 26adfb09..0a15db78 100644 --- a/library/PhpGedcom/Parser/Indi/Chr.php +++ b/library/PhpGedcom/Parser/Indi/Chr.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Chra.php b/library/PhpGedcom/Parser/Indi/Chra.php index 3fc584a9..5d147a93 100644 --- a/library/PhpGedcom/Parser/Indi/Chra.php +++ b/library/PhpGedcom/Parser/Indi/Chra.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Conf.php b/library/PhpGedcom/Parser/Indi/Conf.php index 012604d3..e9e77c48 100644 --- a/library/PhpGedcom/Parser/Indi/Conf.php +++ b/library/PhpGedcom/Parser/Indi/Conf.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Conl.php b/library/PhpGedcom/Parser/Indi/Conl.php index 511262ef..abb234ab 100644 --- a/library/PhpGedcom/Parser/Indi/Conl.php +++ b/library/PhpGedcom/Parser/Indi/Conl.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Crem.php b/library/PhpGedcom/Parser/Indi/Crem.php index b6c65a9d..6ec8d82a 100644 --- a/library/PhpGedcom/Parser/Indi/Crem.php +++ b/library/PhpGedcom/Parser/Indi/Crem.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Deat.php b/library/PhpGedcom/Parser/Indi/Deat.php index 09a535ab..0c991a2c 100644 --- a/library/PhpGedcom/Parser/Indi/Deat.php +++ b/library/PhpGedcom/Parser/Indi/Deat.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Dscr.php b/library/PhpGedcom/Parser/Indi/Dscr.php index bfea1218..49eca70a 100644 --- a/library/PhpGedcom/Parser/Indi/Dscr.php +++ b/library/PhpGedcom/Parser/Indi/Dscr.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Educ.php b/library/PhpGedcom/Parser/Indi/Educ.php index cf11f840..98590e49 100644 --- a/library/PhpGedcom/Parser/Indi/Educ.php +++ b/library/PhpGedcom/Parser/Indi/Educ.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Emig.php b/library/PhpGedcom/Parser/Indi/Emig.php index 0e316ac7..81295d59 100644 --- a/library/PhpGedcom/Parser/Indi/Emig.php +++ b/library/PhpGedcom/Parser/Indi/Emig.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Endl.php b/library/PhpGedcom/Parser/Indi/Endl.php index b28e68d2..e44bb2a9 100644 --- a/library/PhpGedcom/Parser/Indi/Endl.php +++ b/library/PhpGedcom/Parser/Indi/Endl.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Even.php b/library/PhpGedcom/Parser/Indi/Even.php index 07abfddb..8b63057d 100644 --- a/library/PhpGedcom/Parser/Indi/Even.php +++ b/library/PhpGedcom/Parser/Indi/Even.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Even/Plac.php b/library/PhpGedcom/Parser/Indi/Even/Plac.php index cc31defb..ea4de0d3 100644 --- a/library/PhpGedcom/Parser/Indi/Even/Plac.php +++ b/library/PhpGedcom/Parser/Indi/Even/Plac.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Famc.php b/library/PhpGedcom/Parser/Indi/Famc.php index 78ed4763..44fba3ac 100644 --- a/library/PhpGedcom/Parser/Indi/Famc.php +++ b/library/PhpGedcom/Parser/Indi/Famc.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Fams.php b/library/PhpGedcom/Parser/Indi/Fams.php index 2cff0d4a..65cb6a5a 100644 --- a/library/PhpGedcom/Parser/Indi/Fams.php +++ b/library/PhpGedcom/Parser/Indi/Fams.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Fcom.php b/library/PhpGedcom/Parser/Indi/Fcom.php index 574632c9..bbeca618 100644 --- a/library/PhpGedcom/Parser/Indi/Fcom.php +++ b/library/PhpGedcom/Parser/Indi/Fcom.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Grad.php b/library/PhpGedcom/Parser/Indi/Grad.php index f2b903de..1630b874 100644 --- a/library/PhpGedcom/Parser/Indi/Grad.php +++ b/library/PhpGedcom/Parser/Indi/Grad.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Idno.php b/library/PhpGedcom/Parser/Indi/Idno.php index 70ea56e4..aebb93b8 100644 --- a/library/PhpGedcom/Parser/Indi/Idno.php +++ b/library/PhpGedcom/Parser/Indi/Idno.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Immi.php b/library/PhpGedcom/Parser/Indi/Immi.php index a775ffaa..5299215b 100644 --- a/library/PhpGedcom/Parser/Indi/Immi.php +++ b/library/PhpGedcom/Parser/Indi/Immi.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Lds.php b/library/PhpGedcom/Parser/Indi/Lds.php index d1f5e0d2..03de6614 100644 --- a/library/PhpGedcom/Parser/Indi/Lds.php +++ b/library/PhpGedcom/Parser/Indi/Lds.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Name.php b/library/PhpGedcom/Parser/Indi/Name.php index bedcd5db..971ff1ce 100644 --- a/library/PhpGedcom/Parser/Indi/Name.php +++ b/library/PhpGedcom/Parser/Indi/Name.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Name/Fone.php b/library/PhpGedcom/Parser/Indi/Name/Fone.php index dd8298f9..1e303fdf 100644 --- a/library/PhpGedcom/Parser/Indi/Name/Fone.php +++ b/library/PhpGedcom/Parser/Indi/Name/Fone.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Name/Romn.php b/library/PhpGedcom/Parser/Indi/Name/Romn.php index 07846b84..06563091 100644 --- a/library/PhpGedcom/Parser/Indi/Name/Romn.php +++ b/library/PhpGedcom/Parser/Indi/Name/Romn.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Nati.php b/library/PhpGedcom/Parser/Indi/Nati.php index 2fdcb17e..f440d060 100644 --- a/library/PhpGedcom/Parser/Indi/Nati.php +++ b/library/PhpGedcom/Parser/Indi/Nati.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Natu.php b/library/PhpGedcom/Parser/Indi/Natu.php index 9d7db0da..e319059e 100644 --- a/library/PhpGedcom/Parser/Indi/Natu.php +++ b/library/PhpGedcom/Parser/Indi/Natu.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Nchi.php b/library/PhpGedcom/Parser/Indi/Nchi.php index 7543fcaa..c59887d5 100644 --- a/library/PhpGedcom/Parser/Indi/Nchi.php +++ b/library/PhpGedcom/Parser/Indi/Nchi.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Nmr.php b/library/PhpGedcom/Parser/Indi/Nmr.php index d939f1b7..27ec3420 100644 --- a/library/PhpGedcom/Parser/Indi/Nmr.php +++ b/library/PhpGedcom/Parser/Indi/Nmr.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Occu.php b/library/PhpGedcom/Parser/Indi/Occu.php index 9ebed462..51b3a9d5 100644 --- a/library/PhpGedcom/Parser/Indi/Occu.php +++ b/library/PhpGedcom/Parser/Indi/Occu.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Ordn.php b/library/PhpGedcom/Parser/Indi/Ordn.php index cdfa72af..d67e748e 100644 --- a/library/PhpGedcom/Parser/Indi/Ordn.php +++ b/library/PhpGedcom/Parser/Indi/Ordn.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Prob.php b/library/PhpGedcom/Parser/Indi/Prob.php index e266ff87..1f650637 100644 --- a/library/PhpGedcom/Parser/Indi/Prob.php +++ b/library/PhpGedcom/Parser/Indi/Prob.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Prop.php b/library/PhpGedcom/Parser/Indi/Prop.php index 69d2cb96..31ac6205 100644 --- a/library/PhpGedcom/Parser/Indi/Prop.php +++ b/library/PhpGedcom/Parser/Indi/Prop.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Parser\Indi; diff --git a/library/PhpGedcom/Parser/Indi/Reli.php b/library/PhpGedcom/Parser/Indi/Reli.php index 766f6e57..03ef3b0b 100644 --- a/library/PhpGedcom/Parser/Indi/Reli.php +++ b/library/PhpGedcom/Parser/Indi/Reli.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Resi.php b/library/PhpGedcom/Parser/Indi/Resi.php index 991f3759..2a4c83f8 100644 --- a/library/PhpGedcom/Parser/Indi/Resi.php +++ b/library/PhpGedcom/Parser/Indi/Resi.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Reti.php b/library/PhpGedcom/Parser/Indi/Reti.php index b010fe5e..8f164be4 100644 --- a/library/PhpGedcom/Parser/Indi/Reti.php +++ b/library/PhpGedcom/Parser/Indi/Reti.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Slgc.php b/library/PhpGedcom/Parser/Indi/Slgc.php index d22d5c6a..437fb360 100644 --- a/library/PhpGedcom/Parser/Indi/Slgc.php +++ b/library/PhpGedcom/Parser/Indi/Slgc.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Ssn.php b/library/PhpGedcom/Parser/Indi/Ssn.php index 01e4caca..07bc27bc 100644 --- a/library/PhpGedcom/Parser/Indi/Ssn.php +++ b/library/PhpGedcom/Parser/Indi/Ssn.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Titl.php b/library/PhpGedcom/Parser/Indi/Titl.php index 8ba3c2e0..b44912ba 100644 --- a/library/PhpGedcom/Parser/Indi/Titl.php +++ b/library/PhpGedcom/Parser/Indi/Titl.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Indi/Will.php b/library/PhpGedcom/Parser/Indi/Will.php index 4173fdb7..c7812111 100644 --- a/library/PhpGedcom/Parser/Indi/Will.php +++ b/library/PhpGedcom/Parser/Indi/Will.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Note.php b/library/PhpGedcom/Parser/Note.php index ed7b35f7..23719493 100644 --- a/library/PhpGedcom/Parser/Note.php +++ b/library/PhpGedcom/Parser/Note.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/NoteRef.php b/library/PhpGedcom/Parser/NoteRef.php index 4008543e..8e0a13c0 100644 --- a/library/PhpGedcom/Parser/NoteRef.php +++ b/library/PhpGedcom/Parser/NoteRef.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Obje.php b/library/PhpGedcom/Parser/Obje.php index 8ea72fa3..1c052230 100644 --- a/library/PhpGedcom/Parser/Obje.php +++ b/library/PhpGedcom/Parser/Obje.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/ObjeRef.php b/library/PhpGedcom/Parser/ObjeRef.php index 806c1b88..07fe2421 100644 --- a/library/PhpGedcom/Parser/ObjeRef.php +++ b/library/PhpGedcom/Parser/ObjeRef.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/ObjeRef/File.php b/library/PhpGedcom/Parser/ObjeRef/File.php index 37c7d68e..28c67440 100644 --- a/library/PhpGedcom/Parser/ObjeRef/File.php +++ b/library/PhpGedcom/Parser/ObjeRef/File.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/ObjeRef/File/Form.php b/library/PhpGedcom/Parser/ObjeRef/File/Form.php index a41a3eaf..c3ce10a4 100644 --- a/library/PhpGedcom/Parser/ObjeRef/File/Form.php +++ b/library/PhpGedcom/Parser/ObjeRef/File/Form.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Phon.php b/library/PhpGedcom/Parser/Phon.php index fc1d5718..5b175781 100644 --- a/library/PhpGedcom/Parser/Phon.php +++ b/library/PhpGedcom/Parser/Phon.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Plac.php b/library/PhpGedcom/Parser/Plac.php index 11bee323..89051db4 100644 --- a/library/PhpGedcom/Parser/Plac.php +++ b/library/PhpGedcom/Parser/Plac.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Plac/Fone.php b/library/PhpGedcom/Parser/Plac/Fone.php index 18169067..3e037132 100644 --- a/library/PhpGedcom/Parser/Plac/Fone.php +++ b/library/PhpGedcom/Parser/Plac/Fone.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Plac/Map.php b/library/PhpGedcom/Parser/Plac/Map.php index b0b2e583..fcaada9f 100644 --- a/library/PhpGedcom/Parser/Plac/Map.php +++ b/library/PhpGedcom/Parser/Plac/Map.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Plac/Romn.php b/library/PhpGedcom/Parser/Plac/Romn.php index b9838529..22741182 100644 --- a/library/PhpGedcom/Parser/Plac/Romn.php +++ b/library/PhpGedcom/Parser/Plac/Romn.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Refn.php b/library/PhpGedcom/Parser/Refn.php index e391a9ed..43798cf0 100644 --- a/library/PhpGedcom/Parser/Refn.php +++ b/library/PhpGedcom/Parser/Refn.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Repo.php b/library/PhpGedcom/Parser/Repo.php index 9050dc94..5389f6a3 100644 --- a/library/PhpGedcom/Parser/Repo.php +++ b/library/PhpGedcom/Parser/Repo.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/RepoRef.php b/library/PhpGedcom/Parser/RepoRef.php index 8fe419cc..f560b0a5 100644 --- a/library/PhpGedcom/Parser/RepoRef.php +++ b/library/PhpGedcom/Parser/RepoRef.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Sour.php b/library/PhpGedcom/Parser/Sour.php index 0d9c928a..d5966012 100644 --- a/library/PhpGedcom/Parser/Sour.php +++ b/library/PhpGedcom/Parser/Sour.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Sour/Data.php b/library/PhpGedcom/Parser/Sour/Data.php index 40886feb..09620a2a 100644 --- a/library/PhpGedcom/Parser/Sour/Data.php +++ b/library/PhpGedcom/Parser/Sour/Data.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Sour/Data/Even.php b/library/PhpGedcom/Parser/Sour/Data/Even.php index dbdef80d..87bb5345 100644 --- a/library/PhpGedcom/Parser/Sour/Data/Even.php +++ b/library/PhpGedcom/Parser/Sour/Data/Even.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Sour/Repo.php b/library/PhpGedcom/Parser/Sour/Repo.php index d9c6ddd7..5e4ef705 100644 --- a/library/PhpGedcom/Parser/Sour/Repo.php +++ b/library/PhpGedcom/Parser/Sour/Repo.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Sour/Repo/Caln.php b/library/PhpGedcom/Parser/Sour/Repo/Caln.php index b0f773be..d5e4e43e 100644 --- a/library/PhpGedcom/Parser/Sour/Repo/Caln.php +++ b/library/PhpGedcom/Parser/Sour/Repo/Caln.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/SourRef.php b/library/PhpGedcom/Parser/SourRef.php index 7c56f141..30535e70 100644 --- a/library/PhpGedcom/Parser/SourRef.php +++ b/library/PhpGedcom/Parser/SourRef.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/SourRef/Data.php b/library/PhpGedcom/Parser/SourRef/Data.php index 62a7de61..eb773f55 100644 --- a/library/PhpGedcom/Parser/SourRef/Data.php +++ b/library/PhpGedcom/Parser/SourRef/Data.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/SourRef/Even.php b/library/PhpGedcom/Parser/SourRef/Even.php index b3ea1fc8..a4abf16c 100644 --- a/library/PhpGedcom/Parser/SourRef/Even.php +++ b/library/PhpGedcom/Parser/SourRef/Even.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Subm.php b/library/PhpGedcom/Parser/Subm.php index 8a333e67..c19eba04 100644 --- a/library/PhpGedcom/Parser/Subm.php +++ b/library/PhpGedcom/Parser/Subm.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Parser/Subn.php b/library/PhpGedcom/Parser/Subn.php index ed5c7d0c..2b90e9cd 100644 --- a/library/PhpGedcom/Parser/Subn.php +++ b/library/PhpGedcom/Parser/Subn.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record.php b/library/PhpGedcom/Record.php index 0e155569..139c2830 100644 --- a/library/PhpGedcom/Record.php +++ b/library/PhpGedcom/Record.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Addr.php b/library/PhpGedcom/Record/Addr.php index d6a45707..891168eb 100644 --- a/library/PhpGedcom/Record/Addr.php +++ b/library/PhpGedcom/Record/Addr.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Caln.php b/library/PhpGedcom/Record/Caln.php index 7e01e22a..d8669e99 100644 --- a/library/PhpGedcom/Record/Caln.php +++ b/library/PhpGedcom/Record/Caln.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Chan.php b/library/PhpGedcom/Record/Chan.php index 05026fdf..705d2bfc 100644 --- a/library/PhpGedcom/Record/Chan.php +++ b/library/PhpGedcom/Record/Chan.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Data.php b/library/PhpGedcom/Record/Data.php index 83425243..9959df1b 100644 --- a/library/PhpGedcom/Record/Data.php +++ b/library/PhpGedcom/Record/Data.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Date.php b/library/PhpGedcom/Record/Date.php index 890aaeea..f54c07c7 100644 --- a/library/PhpGedcom/Record/Date.php +++ b/library/PhpGedcom/Record/Date.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Fam.php b/library/PhpGedcom/Record/Fam.php index db968188..5676b723 100644 --- a/library/PhpGedcom/Record/Fam.php +++ b/library/PhpGedcom/Record/Fam.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Fam/Anul.php b/library/PhpGedcom/Record/Fam/Anul.php index 2a3c8ef6..63fc24ca 100644 --- a/library/PhpGedcom/Record/Fam/Anul.php +++ b/library/PhpGedcom/Record/Fam/Anul.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Fam/Cens.php b/library/PhpGedcom/Record/Fam/Cens.php index 1a8ee4a8..16968d84 100644 --- a/library/PhpGedcom/Record/Fam/Cens.php +++ b/library/PhpGedcom/Record/Fam/Cens.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Fam/Div.php b/library/PhpGedcom/Record/Fam/Div.php index 7ecafca2..33dfb41e 100644 --- a/library/PhpGedcom/Record/Fam/Div.php +++ b/library/PhpGedcom/Record/Fam/Div.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Fam/Enga.php b/library/PhpGedcom/Record/Fam/Enga.php index 8ef9efb1..a3e444cf 100644 --- a/library/PhpGedcom/Record/Fam/Enga.php +++ b/library/PhpGedcom/Record/Fam/Enga.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Fam/Even.php b/library/PhpGedcom/Record/Fam/Even.php index 6d47684b..233568ee 100644 --- a/library/PhpGedcom/Record/Fam/Even.php +++ b/library/PhpGedcom/Record/Fam/Even.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Fam/Even/Husb.php b/library/PhpGedcom/Record/Fam/Even/Husb.php index 1b0a63d6..52b55724 100644 --- a/library/PhpGedcom/Record/Fam/Even/Husb.php +++ b/library/PhpGedcom/Record/Fam/Even/Husb.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Fam/Even/Wife.php b/library/PhpGedcom/Record/Fam/Even/Wife.php index 53e4e566..cabbf872 100644 --- a/library/PhpGedcom/Record/Fam/Even/Wife.php +++ b/library/PhpGedcom/Record/Fam/Even/Wife.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Fam/Marb.php b/library/PhpGedcom/Record/Fam/Marb.php index d86bc453..55efca28 100644 --- a/library/PhpGedcom/Record/Fam/Marb.php +++ b/library/PhpGedcom/Record/Fam/Marb.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Fam/Marc.php b/library/PhpGedcom/Record/Fam/Marc.php index 39cbcf33..77019908 100644 --- a/library/PhpGedcom/Record/Fam/Marc.php +++ b/library/PhpGedcom/Record/Fam/Marc.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Fam/Marl.php b/library/PhpGedcom/Record/Fam/Marl.php index b84382e3..7fcd714e 100644 --- a/library/PhpGedcom/Record/Fam/Marl.php +++ b/library/PhpGedcom/Record/Fam/Marl.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Fam/Marr.php b/library/PhpGedcom/Record/Fam/Marr.php index 08669880..fd6e3584 100644 --- a/library/PhpGedcom/Record/Fam/Marr.php +++ b/library/PhpGedcom/Record/Fam/Marr.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Fam/Mars.php b/library/PhpGedcom/Record/Fam/Mars.php index 515e1597..7bc12f04 100644 --- a/library/PhpGedcom/Record/Fam/Mars.php +++ b/library/PhpGedcom/Record/Fam/Mars.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Fam/Slgs.php b/library/PhpGedcom/Record/Fam/Slgs.php index e508b27b..4584fdda 100644 --- a/library/PhpGedcom/Record/Fam/Slgs.php +++ b/library/PhpGedcom/Record/Fam/Slgs.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Fam/Slgs/Stat.php b/library/PhpGedcom/Record/Fam/Slgs/Stat.php index a6094aaa..ca2f59b6 100644 --- a/library/PhpGedcom/Record/Fam/Slgs/Stat.php +++ b/library/PhpGedcom/Record/Fam/Slgs/Stat.php @@ -8,7 +8,7 @@ * @author Xiang Ming wenqiangliu344@gmail.com * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Head.php b/library/PhpGedcom/Record/Head.php index a86fd457..deb2b224 100644 --- a/library/PhpGedcom/Record/Head.php +++ b/library/PhpGedcom/Record/Head.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Head/Char.php b/library/PhpGedcom/Record/Head/Char.php index 483f941e..ab28ce0e 100644 --- a/library/PhpGedcom/Record/Head/Char.php +++ b/library/PhpGedcom/Record/Head/Char.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Head; diff --git a/library/PhpGedcom/Record/Head/Date.php b/library/PhpGedcom/Record/Head/Date.php index ff43532c..7e364887 100644 --- a/library/PhpGedcom/Record/Head/Date.php +++ b/library/PhpGedcom/Record/Head/Date.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Head/Gedc.php b/library/PhpGedcom/Record/Head/Gedc.php index 0ebe7c77..4924437c 100644 --- a/library/PhpGedcom/Record/Head/Gedc.php +++ b/library/PhpGedcom/Record/Head/Gedc.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Head/Plac.php b/library/PhpGedcom/Record/Head/Plac.php index 8f79eae2..706fe24c 100644 --- a/library/PhpGedcom/Record/Head/Plac.php +++ b/library/PhpGedcom/Record/Head/Plac.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Head/Sour.php b/library/PhpGedcom/Record/Head/Sour.php index 739e6d8e..09949a46 100644 --- a/library/PhpGedcom/Record/Head/Sour.php +++ b/library/PhpGedcom/Record/Head/Sour.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Head/Sour/Corp.php b/library/PhpGedcom/Record/Head/Sour/Corp.php index 13a8b8cd..40ed2205 100644 --- a/library/PhpGedcom/Record/Head/Sour/Corp.php +++ b/library/PhpGedcom/Record/Head/Sour/Corp.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Head/Sour/Data.php b/library/PhpGedcom/Record/Head/Sour/Data.php index 3247160e..e31fb0dd 100644 --- a/library/PhpGedcom/Record/Head/Sour/Data.php +++ b/library/PhpGedcom/Record/Head/Sour/Data.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Head\Sour; diff --git a/library/PhpGedcom/Record/Indi.php b/library/PhpGedcom/Record/Indi.php index 22266225..fe7b9d15 100644 --- a/library/PhpGedcom/Record/Indi.php +++ b/library/PhpGedcom/Record/Indi.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Adop.php b/library/PhpGedcom/Record/Indi/Adop.php index ccc6ade1..2fa3f7f1 100644 --- a/library/PhpGedcom/Record/Indi/Adop.php +++ b/library/PhpGedcom/Record/Indi/Adop.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Asso.php b/library/PhpGedcom/Record/Indi/Asso.php index 5a7ea9b6..ea73c427 100644 --- a/library/PhpGedcom/Record/Indi/Asso.php +++ b/library/PhpGedcom/Record/Indi/Asso.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Attr.php b/library/PhpGedcom/Record/Indi/Attr.php index fac64c5b..fa6d2454 100644 --- a/library/PhpGedcom/Record/Indi/Attr.php +++ b/library/PhpGedcom/Record/Indi/Attr.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Bapl.php b/library/PhpGedcom/Record/Indi/Bapl.php index 32d17b71..73e8cb8e 100644 --- a/library/PhpGedcom/Record/Indi/Bapl.php +++ b/library/PhpGedcom/Record/Indi/Bapl.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Bapm.php b/library/PhpGedcom/Record/Indi/Bapm.php index 54db28e1..2c5c9b55 100644 --- a/library/PhpGedcom/Record/Indi/Bapm.php +++ b/library/PhpGedcom/Record/Indi/Bapm.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Barm.php b/library/PhpGedcom/Record/Indi/Barm.php index e1a5591b..8230308b 100644 --- a/library/PhpGedcom/Record/Indi/Barm.php +++ b/library/PhpGedcom/Record/Indi/Barm.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Basm.php b/library/PhpGedcom/Record/Indi/Basm.php index a108f07f..ae5013aa 100644 --- a/library/PhpGedcom/Record/Indi/Basm.php +++ b/library/PhpGedcom/Record/Indi/Basm.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Birt.php b/library/PhpGedcom/Record/Indi/Birt.php index dbbd04d3..f5d39066 100644 --- a/library/PhpGedcom/Record/Indi/Birt.php +++ b/library/PhpGedcom/Record/Indi/Birt.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Bles.php b/library/PhpGedcom/Record/Indi/Bles.php index 326b47e0..8c5f0d8d 100644 --- a/library/PhpGedcom/Record/Indi/Bles.php +++ b/library/PhpGedcom/Record/Indi/Bles.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Buri.php b/library/PhpGedcom/Record/Indi/Buri.php index bb4e2e4c..2e5cd27a 100644 --- a/library/PhpGedcom/Record/Indi/Buri.php +++ b/library/PhpGedcom/Record/Indi/Buri.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Cast.php b/library/PhpGedcom/Record/Indi/Cast.php index bd699f42..acba5e6d 100644 --- a/library/PhpGedcom/Record/Indi/Cast.php +++ b/library/PhpGedcom/Record/Indi/Cast.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Cens.php b/library/PhpGedcom/Record/Indi/Cens.php index 2645250d..a06cf277 100644 --- a/library/PhpGedcom/Record/Indi/Cens.php +++ b/library/PhpGedcom/Record/Indi/Cens.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Chr.php b/library/PhpGedcom/Record/Indi/Chr.php index 297965f1..e5479f16 100644 --- a/library/PhpGedcom/Record/Indi/Chr.php +++ b/library/PhpGedcom/Record/Indi/Chr.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Chra.php b/library/PhpGedcom/Record/Indi/Chra.php index 27c5801b..6a788358 100644 --- a/library/PhpGedcom/Record/Indi/Chra.php +++ b/library/PhpGedcom/Record/Indi/Chra.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Conf.php b/library/PhpGedcom/Record/Indi/Conf.php index 92e8de1e..c31f125c 100644 --- a/library/PhpGedcom/Record/Indi/Conf.php +++ b/library/PhpGedcom/Record/Indi/Conf.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Conl.php b/library/PhpGedcom/Record/Indi/Conl.php index 7489a13a..6810fac4 100644 --- a/library/PhpGedcom/Record/Indi/Conl.php +++ b/library/PhpGedcom/Record/Indi/Conl.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Crem.php b/library/PhpGedcom/Record/Indi/Crem.php index 82fe24bc..ab39dc11 100644 --- a/library/PhpGedcom/Record/Indi/Crem.php +++ b/library/PhpGedcom/Record/Indi/Crem.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Deat.php b/library/PhpGedcom/Record/Indi/Deat.php index 52cdf269..f7c5de4e 100644 --- a/library/PhpGedcom/Record/Indi/Deat.php +++ b/library/PhpGedcom/Record/Indi/Deat.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Dscr.php b/library/PhpGedcom/Record/Indi/Dscr.php index a0352b10..7d9bf2d7 100644 --- a/library/PhpGedcom/Record/Indi/Dscr.php +++ b/library/PhpGedcom/Record/Indi/Dscr.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Educ.php b/library/PhpGedcom/Record/Indi/Educ.php index e4de5efa..b28dc5be 100644 --- a/library/PhpGedcom/Record/Indi/Educ.php +++ b/library/PhpGedcom/Record/Indi/Educ.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Emig.php b/library/PhpGedcom/Record/Indi/Emig.php index 1405bfb2..c1ebca48 100644 --- a/library/PhpGedcom/Record/Indi/Emig.php +++ b/library/PhpGedcom/Record/Indi/Emig.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Indi; diff --git a/library/PhpGedcom/Record/Indi/Endl.php b/library/PhpGedcom/Record/Indi/Endl.php index 6d39e10b..5c3c27b5 100644 --- a/library/PhpGedcom/Record/Indi/Endl.php +++ b/library/PhpGedcom/Record/Indi/Endl.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Even.php b/library/PhpGedcom/Record/Indi/Even.php index 646b2aa8..8b0a4484 100644 --- a/library/PhpGedcom/Record/Indi/Even.php +++ b/library/PhpGedcom/Record/Indi/Even.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Even/Plac.php b/library/PhpGedcom/Record/Indi/Even/Plac.php index aedabaac..e83f037f 100644 --- a/library/PhpGedcom/Record/Indi/Even/Plac.php +++ b/library/PhpGedcom/Record/Indi/Even/Plac.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Famc.php b/library/PhpGedcom/Record/Indi/Famc.php index 14f221be..6e78c937 100644 --- a/library/PhpGedcom/Record/Indi/Famc.php +++ b/library/PhpGedcom/Record/Indi/Famc.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Fams.php b/library/PhpGedcom/Record/Indi/Fams.php index c2846e07..9a143778 100644 --- a/library/PhpGedcom/Record/Indi/Fams.php +++ b/library/PhpGedcom/Record/Indi/Fams.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Fcom.php b/library/PhpGedcom/Record/Indi/Fcom.php index bb7da01f..a6d9e1d2 100644 --- a/library/PhpGedcom/Record/Indi/Fcom.php +++ b/library/PhpGedcom/Record/Indi/Fcom.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Grad.php b/library/PhpGedcom/Record/Indi/Grad.php index ae5baad7..f7eaca93 100644 --- a/library/PhpGedcom/Record/Indi/Grad.php +++ b/library/PhpGedcom/Record/Indi/Grad.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Idno.php b/library/PhpGedcom/Record/Indi/Idno.php index b9395a36..ae464073 100644 --- a/library/PhpGedcom/Record/Indi/Idno.php +++ b/library/PhpGedcom/Record/Indi/Idno.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Immi.php b/library/PhpGedcom/Record/Indi/Immi.php index 7312fece..7739811c 100644 --- a/library/PhpGedcom/Record/Indi/Immi.php +++ b/library/PhpGedcom/Record/Indi/Immi.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Lds.php b/library/PhpGedcom/Record/Indi/Lds.php index eb87e6bc..a1d8c572 100644 --- a/library/PhpGedcom/Record/Indi/Lds.php +++ b/library/PhpGedcom/Record/Indi/Lds.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Name.php b/library/PhpGedcom/Record/Indi/Name.php index 79bf5cf1..2e6ad000 100644 --- a/library/PhpGedcom/Record/Indi/Name.php +++ b/library/PhpGedcom/Record/Indi/Name.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Name/Fone.php b/library/PhpGedcom/Record/Indi/Name/Fone.php index 61604cfc..11cba359 100644 --- a/library/PhpGedcom/Record/Indi/Name/Fone.php +++ b/library/PhpGedcom/Record/Indi/Name/Fone.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Name/Romn.php b/library/PhpGedcom/Record/Indi/Name/Romn.php index 224f15ec..dfa1f39c 100644 --- a/library/PhpGedcom/Record/Indi/Name/Romn.php +++ b/library/PhpGedcom/Record/Indi/Name/Romn.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Nati.php b/library/PhpGedcom/Record/Indi/Nati.php index d7dfd62b..6df07bb4 100644 --- a/library/PhpGedcom/Record/Indi/Nati.php +++ b/library/PhpGedcom/Record/Indi/Nati.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Natu.php b/library/PhpGedcom/Record/Indi/Natu.php index 06e85df4..60a9e436 100644 --- a/library/PhpGedcom/Record/Indi/Natu.php +++ b/library/PhpGedcom/Record/Indi/Natu.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Nchi.php b/library/PhpGedcom/Record/Indi/Nchi.php index 157fb6b3..8718d684 100644 --- a/library/PhpGedcom/Record/Indi/Nchi.php +++ b/library/PhpGedcom/Record/Indi/Nchi.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Nmr.php b/library/PhpGedcom/Record/Indi/Nmr.php index 50ac5022..38492b7b 100644 --- a/library/PhpGedcom/Record/Indi/Nmr.php +++ b/library/PhpGedcom/Record/Indi/Nmr.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Note.php b/library/PhpGedcom/Record/Indi/Note.php index 7d43efca..3811fb93 100644 --- a/library/PhpGedcom/Record/Indi/Note.php +++ b/library/PhpGedcom/Record/Indi/Note.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Indi; diff --git a/library/PhpGedcom/Record/Indi/Occu.php b/library/PhpGedcom/Record/Indi/Occu.php index 3a1e4ced..5e73980e 100644 --- a/library/PhpGedcom/Record/Indi/Occu.php +++ b/library/PhpGedcom/Record/Indi/Occu.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Ordn.php b/library/PhpGedcom/Record/Indi/Ordn.php index 1f452979..0f5c6abe 100644 --- a/library/PhpGedcom/Record/Indi/Ordn.php +++ b/library/PhpGedcom/Record/Indi/Ordn.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Prob.php b/library/PhpGedcom/Record/Indi/Prob.php index 4484c429..16c481d7 100644 --- a/library/PhpGedcom/Record/Indi/Prob.php +++ b/library/PhpGedcom/Record/Indi/Prob.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Prop.php b/library/PhpGedcom/Record/Indi/Prop.php index fa929767..a4bfb763 100644 --- a/library/PhpGedcom/Record/Indi/Prop.php +++ b/library/PhpGedcom/Record/Indi/Prop.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Reli.php b/library/PhpGedcom/Record/Indi/Reli.php index 0c2d27f2..8aaed6db 100644 --- a/library/PhpGedcom/Record/Indi/Reli.php +++ b/library/PhpGedcom/Record/Indi/Reli.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Resi.php b/library/PhpGedcom/Record/Indi/Resi.php index f2848473..9fdfbb3b 100644 --- a/library/PhpGedcom/Record/Indi/Resi.php +++ b/library/PhpGedcom/Record/Indi/Resi.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Reti.php b/library/PhpGedcom/Record/Indi/Reti.php index 321a4c8f..91a22147 100644 --- a/library/PhpGedcom/Record/Indi/Reti.php +++ b/library/PhpGedcom/Record/Indi/Reti.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Slgc.php b/library/PhpGedcom/Record/Indi/Slgc.php index 088bcb96..2e28107f 100644 --- a/library/PhpGedcom/Record/Indi/Slgc.php +++ b/library/PhpGedcom/Record/Indi/Slgc.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Ssn.php b/library/PhpGedcom/Record/Indi/Ssn.php index 52b35b8f..475f61b6 100644 --- a/library/PhpGedcom/Record/Indi/Ssn.php +++ b/library/PhpGedcom/Record/Indi/Ssn.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Indi/Titl.php b/library/PhpGedcom/Record/Indi/Titl.php index 901141db..e9f94f85 100644 --- a/library/PhpGedcom/Record/Indi/Titl.php +++ b/library/PhpGedcom/Record/Indi/Titl.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Indi; diff --git a/library/PhpGedcom/Record/Indi/Will.php b/library/PhpGedcom/Record/Indi/Will.php index 61a1f1a9..7c795bbc 100644 --- a/library/PhpGedcom/Record/Indi/Will.php +++ b/library/PhpGedcom/Record/Indi/Will.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Note.php b/library/PhpGedcom/Record/Note.php index 86e0ae6a..46b2de93 100644 --- a/library/PhpGedcom/Record/Note.php +++ b/library/PhpGedcom/Record/Note.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/NoteRef.php b/library/PhpGedcom/Record/NoteRef.php index 1d89ce2a..26f61bc6 100644 --- a/library/PhpGedcom/Record/NoteRef.php +++ b/library/PhpGedcom/Record/NoteRef.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Noteable.php b/library/PhpGedcom/Record/Noteable.php index 656f810f..1244e55e 100644 --- a/library/PhpGedcom/Record/Noteable.php +++ b/library/PhpGedcom/Record/Noteable.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Obje.php b/library/PhpGedcom/Record/Obje.php index fc351537..8417771d 100644 --- a/library/PhpGedcom/Record/Obje.php +++ b/library/PhpGedcom/Record/Obje.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/ObjeRef.php b/library/PhpGedcom/Record/ObjeRef.php index 7c0a3d42..3c19a3db 100644 --- a/library/PhpGedcom/Record/ObjeRef.php +++ b/library/PhpGedcom/Record/ObjeRef.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/ObjeRef/File.php b/library/PhpGedcom/Record/ObjeRef/File.php index d604d8e0..59d71405 100644 --- a/library/PhpGedcom/Record/ObjeRef/File.php +++ b/library/PhpGedcom/Record/ObjeRef/File.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/ObjeRef/File/Form.php b/library/PhpGedcom/Record/ObjeRef/File/Form.php index a08ee89d..1b2710d3 100644 --- a/library/PhpGedcom/Record/ObjeRef/File/Form.php +++ b/library/PhpGedcom/Record/ObjeRef/File/Form.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Objectable.php b/library/PhpGedcom/Record/Objectable.php index e930991c..894eb32c 100644 --- a/library/PhpGedcom/Record/Objectable.php +++ b/library/PhpGedcom/Record/Objectable.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Phon.php b/library/PhpGedcom/Record/Phon.php index f28540a7..4c29a528 100644 --- a/library/PhpGedcom/Record/Phon.php +++ b/library/PhpGedcom/Record/Phon.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Plac.php b/library/PhpGedcom/Record/Plac.php index 07725860..80da6c40 100644 --- a/library/PhpGedcom/Record/Plac.php +++ b/library/PhpGedcom/Record/Plac.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Plac/Fone.php b/library/PhpGedcom/Record/Plac/Fone.php index 9cb42b66..309e4d18 100644 --- a/library/PhpGedcom/Record/Plac/Fone.php +++ b/library/PhpGedcom/Record/Plac/Fone.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Plac/Map.php b/library/PhpGedcom/Record/Plac/Map.php index f5b7a100..b322f9f1 100644 --- a/library/PhpGedcom/Record/Plac/Map.php +++ b/library/PhpGedcom/Record/Plac/Map.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Plac/Romn.php b/library/PhpGedcom/Record/Plac/Romn.php index fc1e2a65..9f0e6b82 100644 --- a/library/PhpGedcom/Record/Plac/Romn.php +++ b/library/PhpGedcom/Record/Plac/Romn.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Refn.php b/library/PhpGedcom/Record/Refn.php index 6d0ec81e..0df6d4c6 100644 --- a/library/PhpGedcom/Record/Refn.php +++ b/library/PhpGedcom/Record/Refn.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Repo.php b/library/PhpGedcom/Record/Repo.php index c047dcff..9bd04fd5 100644 --- a/library/PhpGedcom/Record/Repo.php +++ b/library/PhpGedcom/Record/Repo.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/RepoRef.php b/library/PhpGedcom/Record/RepoRef.php index dcc1a412..53172aa9 100644 --- a/library/PhpGedcom/Record/RepoRef.php +++ b/library/PhpGedcom/Record/RepoRef.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Sour.php b/library/PhpGedcom/Record/Sour.php index 3a809bbd..f1dfa271 100644 --- a/library/PhpGedcom/Record/Sour.php +++ b/library/PhpGedcom/Record/Sour.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Sour/Data.php b/library/PhpGedcom/Record/Sour/Data.php index 6a697ed1..2d960be6 100644 --- a/library/PhpGedcom/Record/Sour/Data.php +++ b/library/PhpGedcom/Record/Sour/Data.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Sour/Data/Even.php b/library/PhpGedcom/Record/Sour/Data/Even.php index 060ea019..2601b552 100644 --- a/library/PhpGedcom/Record/Sour/Data/Even.php +++ b/library/PhpGedcom/Record/Sour/Data/Even.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Sour/Repo.php b/library/PhpGedcom/Record/Sour/Repo.php index ab29e452..fa15bb57 100644 --- a/library/PhpGedcom/Record/Sour/Repo.php +++ b/library/PhpGedcom/Record/Sour/Repo.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Sour/Repo/Caln.php b/library/PhpGedcom/Record/Sour/Repo/Caln.php index 5465dc89..0f0bf547 100644 --- a/library/PhpGedcom/Record/Sour/Repo/Caln.php +++ b/library/PhpGedcom/Record/Sour/Repo/Caln.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/SourRef.php b/library/PhpGedcom/Record/SourRef.php index 41ba1597..319155b9 100644 --- a/library/PhpGedcom/Record/SourRef.php +++ b/library/PhpGedcom/Record/SourRef.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/SourRef/Data.php b/library/PhpGedcom/Record/SourRef/Data.php index cffe895b..9757f079 100644 --- a/library/PhpGedcom/Record/SourRef/Data.php +++ b/library/PhpGedcom/Record/SourRef/Data.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/SourRef/Even.php b/library/PhpGedcom/Record/SourRef/Even.php index cc7dfbfe..5d2c1a58 100644 --- a/library/PhpGedcom/Record/SourRef/Even.php +++ b/library/PhpGedcom/Record/SourRef/Even.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Sourceable.php b/library/PhpGedcom/Record/Sourceable.php index 0ef1351d..3485cd6b 100644 --- a/library/PhpGedcom/Record/Sourceable.php +++ b/library/PhpGedcom/Record/Sourceable.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Subm.php b/library/PhpGedcom/Record/Subm.php index 74754db7..8721be7e 100644 --- a/library/PhpGedcom/Record/Subm.php +++ b/library/PhpGedcom/Record/Subm.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Record/Subn.php b/library/PhpGedcom/Record/Subn.php index 9ffba3a6..806a80ab 100644 --- a/library/PhpGedcom/Record/Subn.php +++ b/library/PhpGedcom/Record/Subn.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer.php b/library/PhpGedcom/Writer.php index ea0dff60..36a44faa 100644 --- a/library/PhpGedcom/Writer.php +++ b/library/PhpGedcom/Writer.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Addr.php b/library/PhpGedcom/Writer/Addr.php index 9191a43e..fec98109 100644 --- a/library/PhpGedcom/Writer/Addr.php +++ b/library/PhpGedcom/Writer/Addr.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Caln.php b/library/PhpGedcom/Writer/Caln.php index e5966a10..aee2cd12 100644 --- a/library/PhpGedcom/Writer/Caln.php +++ b/library/PhpGedcom/Writer/Caln.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Chan.php b/library/PhpGedcom/Writer/Chan.php index 29c7fd39..0d119b51 100644 --- a/library/PhpGedcom/Writer/Chan.php +++ b/library/PhpGedcom/Writer/Chan.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Fam.php b/library/PhpGedcom/Writer/Fam.php index 5e5fad3d..e97e5b9e 100644 --- a/library/PhpGedcom/Writer/Fam.php +++ b/library/PhpGedcom/Writer/Fam.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Fam/Even.php b/library/PhpGedcom/Writer/Fam/Even.php index c90098ef..05dcc955 100644 --- a/library/PhpGedcom/Writer/Fam/Even.php +++ b/library/PhpGedcom/Writer/Fam/Even.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Fam/Even/Husb.php b/library/PhpGedcom/Writer/Fam/Even/Husb.php index 2cd68c0f..5c3ce27c 100644 --- a/library/PhpGedcom/Writer/Fam/Even/Husb.php +++ b/library/PhpGedcom/Writer/Fam/Even/Husb.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Fam/Even/Wife.php b/library/PhpGedcom/Writer/Fam/Even/Wife.php index d6b2e202..02163d10 100644 --- a/library/PhpGedcom/Writer/Fam/Even/Wife.php +++ b/library/PhpGedcom/Writer/Fam/Even/Wife.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Fam/Slgs.php b/library/PhpGedcom/Writer/Fam/Slgs.php index 39aa17ee..4923b98a 100644 --- a/library/PhpGedcom/Writer/Fam/Slgs.php +++ b/library/PhpGedcom/Writer/Fam/Slgs.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Head.php b/library/PhpGedcom/Writer/Head.php index 78171e25..4f51f295 100644 --- a/library/PhpGedcom/Writer/Head.php +++ b/library/PhpGedcom/Writer/Head.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Head/Char.php b/library/PhpGedcom/Writer/Head/Char.php index fbc2b0a7..a606d0a1 100644 --- a/library/PhpGedcom/Writer/Head/Char.php +++ b/library/PhpGedcom/Writer/Head/Char.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Head/Date.php b/library/PhpGedcom/Writer/Head/Date.php index 37e0107a..b4c3d3e9 100644 --- a/library/PhpGedcom/Writer/Head/Date.php +++ b/library/PhpGedcom/Writer/Head/Date.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Head/Gedc.php b/library/PhpGedcom/Writer/Head/Gedc.php index e8cea23e..eb73235b 100644 --- a/library/PhpGedcom/Writer/Head/Gedc.php +++ b/library/PhpGedcom/Writer/Head/Gedc.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Head/Plac.php b/library/PhpGedcom/Writer/Head/Plac.php index 9a43f9c5..275f3cdd 100644 --- a/library/PhpGedcom/Writer/Head/Plac.php +++ b/library/PhpGedcom/Writer/Head/Plac.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Head/Sour.php b/library/PhpGedcom/Writer/Head/Sour.php index e5020df7..1b76325a 100644 --- a/library/PhpGedcom/Writer/Head/Sour.php +++ b/library/PhpGedcom/Writer/Head/Sour.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Head/Sour/Corp.php b/library/PhpGedcom/Writer/Head/Sour/Corp.php index 13aca6e1..83c9094c 100644 --- a/library/PhpGedcom/Writer/Head/Sour/Corp.php +++ b/library/PhpGedcom/Writer/Head/Sour/Corp.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Head/Sour/Data.php b/library/PhpGedcom/Writer/Head/Sour/Data.php index 0066c119..66186ae1 100644 --- a/library/PhpGedcom/Writer/Head/Sour/Data.php +++ b/library/PhpGedcom/Writer/Head/Sour/Data.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Indi.php b/library/PhpGedcom/Writer/Indi.php index 889ac066..fb44c1c5 100644 --- a/library/PhpGedcom/Writer/Indi.php +++ b/library/PhpGedcom/Writer/Indi.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Indi/Asso.php b/library/PhpGedcom/Writer/Indi/Asso.php index 837050ba..1f68c424 100644 --- a/library/PhpGedcom/Writer/Indi/Asso.php +++ b/library/PhpGedcom/Writer/Indi/Asso.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Indi/Attr.php b/library/PhpGedcom/Writer/Indi/Attr.php index e262344b..62071004 100644 --- a/library/PhpGedcom/Writer/Indi/Attr.php +++ b/library/PhpGedcom/Writer/Indi/Attr.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Indi/Even.php b/library/PhpGedcom/Writer/Indi/Even.php index 2b2cf81a..8f4d8772 100644 --- a/library/PhpGedcom/Writer/Indi/Even.php +++ b/library/PhpGedcom/Writer/Indi/Even.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Indi/Even/Plac.php b/library/PhpGedcom/Writer/Indi/Even/Plac.php index 83ec34b4..214de658 100644 --- a/library/PhpGedcom/Writer/Indi/Even/Plac.php +++ b/library/PhpGedcom/Writer/Indi/Even/Plac.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Indi/Famc.php b/library/PhpGedcom/Writer/Indi/Famc.php index 04a647a3..f4daec9e 100644 --- a/library/PhpGedcom/Writer/Indi/Famc.php +++ b/library/PhpGedcom/Writer/Indi/Famc.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Indi/Fams.php b/library/PhpGedcom/Writer/Indi/Fams.php index 25138419..5454c717 100644 --- a/library/PhpGedcom/Writer/Indi/Fams.php +++ b/library/PhpGedcom/Writer/Indi/Fams.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Indi/Name.php b/library/PhpGedcom/Writer/Indi/Name.php index 74889268..b5dae323 100644 --- a/library/PhpGedcom/Writer/Indi/Name.php +++ b/library/PhpGedcom/Writer/Indi/Name.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Note.php b/library/PhpGedcom/Writer/Note.php index a8119320..71298a49 100644 --- a/library/PhpGedcom/Writer/Note.php +++ b/library/PhpGedcom/Writer/Note.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/NoteRef.php b/library/PhpGedcom/Writer/NoteRef.php index ae4b52ee..508c64e5 100644 --- a/library/PhpGedcom/Writer/NoteRef.php +++ b/library/PhpGedcom/Writer/NoteRef.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Obje.php b/library/PhpGedcom/Writer/Obje.php index bec22b9d..940e700f 100644 --- a/library/PhpGedcom/Writer/Obje.php +++ b/library/PhpGedcom/Writer/Obje.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/ObjeRef.php b/library/PhpGedcom/Writer/ObjeRef.php index 54d0e193..e919dfe5 100644 --- a/library/PhpGedcom/Writer/ObjeRef.php +++ b/library/PhpGedcom/Writer/ObjeRef.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Phon.php b/library/PhpGedcom/Writer/Phon.php index 7deec6c0..f731234d 100644 --- a/library/PhpGedcom/Writer/Phon.php +++ b/library/PhpGedcom/Writer/Phon.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Refn.php b/library/PhpGedcom/Writer/Refn.php index bc39ab57..299f8099 100644 --- a/library/PhpGedcom/Writer/Refn.php +++ b/library/PhpGedcom/Writer/Refn.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Repo.php b/library/PhpGedcom/Writer/Repo.php index df8f4821..66d274d9 100644 --- a/library/PhpGedcom/Writer/Repo.php +++ b/library/PhpGedcom/Writer/Repo.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/RepoRef.php b/library/PhpGedcom/Writer/RepoRef.php index f9f7d72b..794a6962 100644 --- a/library/PhpGedcom/Writer/RepoRef.php +++ b/library/PhpGedcom/Writer/RepoRef.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Sour.php b/library/PhpGedcom/Writer/Sour.php index 6464757b..880468c7 100644 --- a/library/PhpGedcom/Writer/Sour.php +++ b/library/PhpGedcom/Writer/Sour.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Sour/Data.php b/library/PhpGedcom/Writer/Sour/Data.php index 327748c2..747a6528 100644 --- a/library/PhpGedcom/Writer/Sour/Data.php +++ b/library/PhpGedcom/Writer/Sour/Data.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Sour/Data/Even.php b/library/PhpGedcom/Writer/Sour/Data/Even.php index 9dd0a64e..c4afc8cf 100644 --- a/library/PhpGedcom/Writer/Sour/Data/Even.php +++ b/library/PhpGedcom/Writer/Sour/Data/Even.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/SourRef.php b/library/PhpGedcom/Writer/SourRef.php index a58f833d..f0cfdb56 100644 --- a/library/PhpGedcom/Writer/SourRef.php +++ b/library/PhpGedcom/Writer/SourRef.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/SourRef/Even.php b/library/PhpGedcom/Writer/SourRef/Even.php index 484cd1f1..af2e282e 100644 --- a/library/PhpGedcom/Writer/SourRef/Even.php +++ b/library/PhpGedcom/Writer/SourRef/Even.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Subm.php b/library/PhpGedcom/Writer/Subm.php index c1829274..fc25bb0b 100644 --- a/library/PhpGedcom/Writer/Subm.php +++ b/library/PhpGedcom/Writer/Subm.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/library/PhpGedcom/Writer/Subn.php b/library/PhpGedcom/Writer/Subn.php index 39abc8fe..0cd8de08 100644 --- a/library/PhpGedcom/Writer/Subn.php +++ b/library/PhpGedcom/Writer/Subn.php @@ -8,7 +8,7 @@ * @author Xiang Ming * @copyright Copyright (c) 2010-2013, Xiang Ming * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ diff --git a/tests/library/Gedcom/ParserTest.php b/tests/library/Gedcom/ParserTest.php index b5e08e42..2776d5f5 100644 --- a/tests/library/Gedcom/ParserTest.php +++ b/tests/library/Gedcom/ParserTest.php @@ -8,7 +8,7 @@ * @author Kristopher Wilson * @copyright Copyright (c) 2010-2013, Kristopher Wilson * @package php-gedcom - * @license GPL-3.0 + * @license MIT * @link http://github.com/mrkrstphr/php-gedcom */ From 5c8794c127ebacba4cf7ee3098ba34487e671a1d Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Mon, 7 Sep 2020 15:00:08 +0100 Subject: [PATCH 38/99] Update PHP version in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5e24791d..0540577b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Requirements -* php-gedcom 1.0+ requires PHP 5.3 (or later). +* php-gedcom 1.0+ requires PHP 7.3 (or later). ## Installation From 39d80f99ed855982f11a2cfc24dc9239f55749f6 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Mon, 7 Sep 2020 15:08:59 +0100 Subject: [PATCH 39/99] Add status badges --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 0540577b..fda2c6d9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,15 @@ # php-gedcom + ![Latest Stable Version](https://img.shields.io/github/release/modularsoftware/php-gedcom.svg) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/?branch=master) +[![Build Status](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/badges/build.png?b=master)](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/build-status/master) +[![Code Intelligence Status](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence) +[![StyleCI](https://github.styleci.io/repos/135390590/shield?branch=master)](https://github.styleci.io/repos/135390590) +[![CodeFactor](https://www.codefactor.io/repository/github/modularsoftware/php-gedcom/badge/master)](https://www.codefactor.io/repository/github/modularsoftware/php-gedcom/overview/master) +[![codebeat badge](https://codebeat.co/badges/911f9e33-212a-4dfa-a860-751cdbbacff7)](https://codebeat.co/projects/github-com-modularphp-gedcom-php-gedcom-master) +[![Build Status](https://travis-ci.org/modularsoftware/php-gedcom.svg?branch=master)](https://travis-ci.org/modularsoftware/php-gedcom) + + + ## Requirements From 8c3fed39af2d0c88a12866e3bd40d5e391b5e66e Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Mon, 7 Sep 2020 15:17:00 +0100 Subject: [PATCH 40/99] Status badge for StyleCI --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fda2c6d9..c1f57fc0 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/?branch=master) [![Build Status](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/badges/build.png?b=master)](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/build-status/master) [![Code Intelligence Status](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence) -[![StyleCI](https://github.styleci.io/repos/135390590/shield?branch=master)](https://github.styleci.io/repos/135390590) +[![StyleCI](https://github.styleci.io/repos/262784020/shield?branch=master)](https://github.styleci.io/repos/135390590) [![CodeFactor](https://www.codefactor.io/repository/github/modularsoftware/php-gedcom/badge/master)](https://www.codefactor.io/repository/github/modularsoftware/php-gedcom/overview/master) [![codebeat badge](https://codebeat.co/badges/911f9e33-212a-4dfa-a860-751cdbbacff7)](https://codebeat.co/projects/github-com-modularphp-gedcom-php-gedcom-master) [![Build Status](https://travis-ci.org/modularsoftware/php-gedcom.svg?branch=master)](https://travis-ci.org/modularsoftware/php-gedcom) From 6a7148ac2e21bf4385991890faa19265137f0bd0 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Mon, 7 Sep 2020 15:19:19 +0100 Subject: [PATCH 41/99] Status badge for StyleCI --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c1f57fc0..b293c2cd 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/?branch=master) [![Build Status](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/badges/build.png?b=master)](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/build-status/master) [![Code Intelligence Status](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence) -[![StyleCI](https://github.styleci.io/repos/262784020/shield?branch=master)](https://github.styleci.io/repos/135390590) +[![StyleCI](https://github.styleci.io/repos/262784020/shield?branch=master)](https://github.styleci.io/repos/262784020) [![CodeFactor](https://www.codefactor.io/repository/github/modularsoftware/php-gedcom/badge/master)](https://www.codefactor.io/repository/github/modularsoftware/php-gedcom/overview/master) [![codebeat badge](https://codebeat.co/badges/911f9e33-212a-4dfa-a860-751cdbbacff7)](https://codebeat.co/projects/github-com-modularphp-gedcom-php-gedcom-master) [![Build Status](https://travis-ci.org/modularsoftware/php-gedcom.svg?branch=master)](https://travis-ci.org/modularsoftware/php-gedcom) From 82d04f293a835031bd88bfa8c428e7f1b45c2b43 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Fri, 11 Sep 2020 21:36:36 +0000 Subject: [PATCH 42/99] Apply fixes from StyleCI --- library/PhpGedcom/Gedcom.php | 23 +- library/PhpGedcom/Parser.php | 565 ++++--- library/PhpGedcom/Parser/Addr.php | 25 +- library/PhpGedcom/Parser/Caln.php | 33 +- library/PhpGedcom/Parser/Chan.php | 19 +- library/PhpGedcom/Parser/Component.php | 12 +- library/PhpGedcom/Parser/Date.php | 46 +- library/PhpGedcom/Parser/Fam.php | 42 +- library/PhpGedcom/Parser/Fam/Anul.php | 8 +- library/PhpGedcom/Parser/Fam/Cens.php | 8 +- library/PhpGedcom/Parser/Fam/Div.php | 8 +- library/PhpGedcom/Parser/Fam/Divf.php | 8 +- library/PhpGedcom/Parser/Fam/Enga.php | 8 +- library/PhpGedcom/Parser/Fam/Even.php | 167 +-- library/PhpGedcom/Parser/Fam/Even/Husb.php | 33 +- library/PhpGedcom/Parser/Fam/Even/Wife.php | 33 +- library/PhpGedcom/Parser/Fam/Marb.php | 8 +- library/PhpGedcom/Parser/Fam/Marc.php | 8 +- library/PhpGedcom/Parser/Fam/Marl.php | 8 +- library/PhpGedcom/Parser/Fam/Marr.php | 8 +- library/PhpGedcom/Parser/Fam/Mars.php | 8 +- library/PhpGedcom/Parser/Fam/Slgs.php | 19 +- library/PhpGedcom/Parser/Fam/Slgs/Stat.php | 42 +- library/PhpGedcom/Parser/Head.php | 30 +- library/PhpGedcom/Parser/Head/Char.php | 34 +- library/PhpGedcom/Parser/Head/Date.php | 33 +- library/PhpGedcom/Parser/Head/Gedc.php | 19 +- library/PhpGedcom/Parser/Head/Plac.php | 19 +- library/PhpGedcom/Parser/Head/Sour.php | 33 +- library/PhpGedcom/Parser/Head/Sour/Corp.php | 34 +- library/PhpGedcom/Parser/Head/Sour/Data.php | 33 +- library/PhpGedcom/Parser/Indi.php | 329 ++-- library/PhpGedcom/Parser/Indi/Adop.php | 18 +- library/PhpGedcom/Parser/Indi/Asso.php | 34 +- library/PhpGedcom/Parser/Indi/Attr.php | 35 +- library/PhpGedcom/Parser/Indi/Bapl.php | 7 +- library/PhpGedcom/Parser/Indi/Bapm.php | 8 +- library/PhpGedcom/Parser/Indi/Barm.php | 8 +- library/PhpGedcom/Parser/Indi/Basm.php | 8 +- library/PhpGedcom/Parser/Indi/Birt.php | 13 +- library/PhpGedcom/Parser/Indi/Bles.php | 8 +- library/PhpGedcom/Parser/Indi/Buri.php | 8 +- library/PhpGedcom/Parser/Indi/Cast.php | 8 +- library/PhpGedcom/Parser/Indi/Cens.php | 8 +- library/PhpGedcom/Parser/Indi/Chr.php | 12 +- library/PhpGedcom/Parser/Indi/Chra.php | 8 +- library/PhpGedcom/Parser/Indi/Conf.php | 8 +- library/PhpGedcom/Parser/Indi/Conl.php | 8 +- library/PhpGedcom/Parser/Indi/Crem.php | 8 +- library/PhpGedcom/Parser/Indi/Deat.php | 8 +- library/PhpGedcom/Parser/Indi/Dscr.php | 8 +- library/PhpGedcom/Parser/Indi/Educ.php | 8 +- library/PhpGedcom/Parser/Indi/Emig.php | 8 +- library/PhpGedcom/Parser/Indi/Endl.php | 8 +- library/PhpGedcom/Parser/Indi/Even.php | 188 ++- library/PhpGedcom/Parser/Indi/Even/Plac.php | 19 +- library/PhpGedcom/Parser/Indi/Famc.php | 22 +- library/PhpGedcom/Parser/Indi/Fams.php | 22 +- library/PhpGedcom/Parser/Indi/Fcom.php | 8 +- library/PhpGedcom/Parser/Indi/Grad.php | 8 +- library/PhpGedcom/Parser/Indi/Idno.php | 8 +- library/PhpGedcom/Parser/Indi/Immi.php | 8 +- library/PhpGedcom/Parser/Indi/Lds.php | 36 +- library/PhpGedcom/Parser/Indi/Name.php | 34 +- library/PhpGedcom/Parser/Indi/Name/Fone.php | 33 +- library/PhpGedcom/Parser/Indi/Name/Romn.php | 34 +- library/PhpGedcom/Parser/Indi/Nati.php | 8 +- library/PhpGedcom/Parser/Indi/Natu.php | 8 +- library/PhpGedcom/Parser/Indi/Nchi.php | 8 +- library/PhpGedcom/Parser/Indi/Nmr.php | 8 +- library/PhpGedcom/Parser/Indi/Occu.php | 8 +- library/PhpGedcom/Parser/Indi/Ordn.php | 8 +- library/PhpGedcom/Parser/Indi/Prob.php | 8 +- library/PhpGedcom/Parser/Indi/Prop.php | 9 +- library/PhpGedcom/Parser/Indi/Reli.php | 8 +- library/PhpGedcom/Parser/Indi/Resi.php | 8 +- library/PhpGedcom/Parser/Indi/Reti.php | 8 +- library/PhpGedcom/Parser/Indi/Slgc.php | 11 +- library/PhpGedcom/Parser/Indi/Ssn.php | 8 +- library/PhpGedcom/Parser/Indi/Titl.php | 8 +- library/PhpGedcom/Parser/Indi/Will.php | 8 +- library/PhpGedcom/Parser/Note.php | 37 +- library/PhpGedcom/Parser/NoteRef.php | 19 +- library/PhpGedcom/Parser/Obje.php | 29 +- library/PhpGedcom/Parser/ObjeRef.php | 33 +- library/PhpGedcom/Parser/ObjeRef/File.php | 33 +- .../PhpGedcom/Parser/ObjeRef/File/Form.php | 32 +- library/PhpGedcom/Parser/Phon.php | 34 +- library/PhpGedcom/Parser/Plac.php | 31 +- library/PhpGedcom/Parser/Plac/Fone.php | 31 +- library/PhpGedcom/Parser/Plac/Map.php | 20 +- library/PhpGedcom/Parser/Plac/Romn.php | 31 +- library/PhpGedcom/Parser/Refn.php | 34 +- library/PhpGedcom/Parser/Repo.php | 31 +- library/PhpGedcom/Parser/RepoRef.php | 31 +- library/PhpGedcom/Parser/Sour.php | 33 +- library/PhpGedcom/Parser/Sour/Data.php | 19 +- library/PhpGedcom/Parser/Sour/Data/Even.php | 19 +- library/PhpGedcom/Parser/Sour/Repo.php | 21 +- library/PhpGedcom/Parser/Sour/Repo/Caln.php | 33 +- library/PhpGedcom/Parser/SourRef.php | 33 +- library/PhpGedcom/Parser/SourRef/Data.php | 29 +- library/PhpGedcom/Parser/SourRef/Even.php | 33 +- library/PhpGedcom/Parser/Subm.php | 39 +- library/PhpGedcom/Parser/Subn.php | 33 +- library/PhpGedcom/Record.php | 51 +- library/PhpGedcom/Record/Addr.php | 21 +- library/PhpGedcom/Record/Caln.php | 11 +- library/PhpGedcom/Record/Chan.php | 15 +- library/PhpGedcom/Record/Data.php | 11 +- library/PhpGedcom/Record/Date.php | 200 +-- library/PhpGedcom/Record/Fam.php | 218 +-- library/PhpGedcom/Record/Fam/Anul.php | 7 +- library/PhpGedcom/Record/Fam/Cens.php | 7 +- library/PhpGedcom/Record/Fam/Div.php | 7 +- library/PhpGedcom/Record/Fam/Enga.php | 7 +- library/PhpGedcom/Record/Fam/Even.php | 93 +- library/PhpGedcom/Record/Fam/Even/Husb.php | 7 +- library/PhpGedcom/Record/Fam/Even/Wife.php | 7 +- library/PhpGedcom/Record/Fam/Marb.php | 7 +- library/PhpGedcom/Record/Fam/Marc.php | 7 +- library/PhpGedcom/Record/Fam/Marl.php | 7 +- library/PhpGedcom/Record/Fam/Marr.php | 7 +- library/PhpGedcom/Record/Fam/Mars.php | 7 +- library/PhpGedcom/Record/Fam/Slgs.php | 27 +- library/PhpGedcom/Record/Fam/Slgs/Stat.php | 11 +- library/PhpGedcom/Record/Head.php | 28 +- library/PhpGedcom/Record/Head/Char.php | 8 +- library/PhpGedcom/Record/Head/Date.php | 7 +- library/PhpGedcom/Record/Head/Gedc.php | 76 +- library/PhpGedcom/Record/Head/Plac.php | 10 +- library/PhpGedcom/Record/Head/Sour.php | 148 +- library/PhpGedcom/Record/Head/Sour/Corp.php | 13 +- library/PhpGedcom/Record/Head/Sour/Data.php | 8 +- library/PhpGedcom/Record/Indi.php | 1329 +++++++++-------- library/PhpGedcom/Record/Indi/Adop.php | 7 +- library/PhpGedcom/Record/Indi/Asso.php | 27 +- library/PhpGedcom/Record/Indi/Attr.php | 37 +- library/PhpGedcom/Record/Indi/Bapl.php | 7 +- library/PhpGedcom/Record/Indi/Bapm.php | 7 +- library/PhpGedcom/Record/Indi/Barm.php | 7 +- library/PhpGedcom/Record/Indi/Basm.php | 7 +- library/PhpGedcom/Record/Indi/Birt.php | 11 +- library/PhpGedcom/Record/Indi/Bles.php | 7 +- library/PhpGedcom/Record/Indi/Buri.php | 7 +- library/PhpGedcom/Record/Indi/Cast.php | 7 +- library/PhpGedcom/Record/Indi/Cens.php | 7 +- library/PhpGedcom/Record/Indi/Chr.php | 7 +- library/PhpGedcom/Record/Indi/Chra.php | 7 +- library/PhpGedcom/Record/Indi/Conf.php | 7 +- library/PhpGedcom/Record/Indi/Conl.php | 7 +- library/PhpGedcom/Record/Indi/Crem.php | 7 +- library/PhpGedcom/Record/Indi/Deat.php | 7 +- library/PhpGedcom/Record/Indi/Dscr.php | 7 +- library/PhpGedcom/Record/Indi/Educ.php | 7 +- library/PhpGedcom/Record/Indi/Emig.php | 8 +- library/PhpGedcom/Record/Indi/Endl.php | 7 +- library/PhpGedcom/Record/Indi/Even.php | 45 +- library/PhpGedcom/Record/Indi/Even/Plac.php | 21 +- library/PhpGedcom/Record/Indi/Famc.php | 17 +- library/PhpGedcom/Record/Indi/Fams.php | 20 +- library/PhpGedcom/Record/Indi/Fcom.php | 7 +- library/PhpGedcom/Record/Indi/Grad.php | 7 +- library/PhpGedcom/Record/Indi/Idno.php | 7 +- library/PhpGedcom/Record/Indi/Immi.php | 7 +- library/PhpGedcom/Record/Indi/Lds.php | 27 +- library/PhpGedcom/Record/Indi/Name.php | 58 +- library/PhpGedcom/Record/Indi/Name/Fone.php | 89 +- library/PhpGedcom/Record/Indi/Name/Romn.php | 91 +- library/PhpGedcom/Record/Indi/Nati.php | 7 +- library/PhpGedcom/Record/Indi/Natu.php | 7 +- library/PhpGedcom/Record/Indi/Nchi.php | 7 +- library/PhpGedcom/Record/Indi/Nmr.php | 7 +- library/PhpGedcom/Record/Indi/Note.php | 5 +- library/PhpGedcom/Record/Indi/Occu.php | 7 +- library/PhpGedcom/Record/Indi/Ordn.php | 7 +- library/PhpGedcom/Record/Indi/Prob.php | 7 +- library/PhpGedcom/Record/Indi/Prop.php | 7 +- library/PhpGedcom/Record/Indi/Reli.php | 7 +- library/PhpGedcom/Record/Indi/Resi.php | 7 +- library/PhpGedcom/Record/Indi/Reti.php | 7 +- library/PhpGedcom/Record/Indi/Slgc.php | 10 +- library/PhpGedcom/Record/Indi/Ssn.php | 7 +- library/PhpGedcom/Record/Indi/Titl.php | 8 +- library/PhpGedcom/Record/Indi/Will.php | 7 +- library/PhpGedcom/Record/Note.php | 25 +- library/PhpGedcom/Record/NoteRef.php | 33 +- library/PhpGedcom/Record/Noteable.php | 10 +- library/PhpGedcom/Record/Obje.php | 37 +- library/PhpGedcom/Record/ObjeRef.php | 34 +- library/PhpGedcom/Record/ObjeRef/File.php | 8 +- .../PhpGedcom/Record/ObjeRef/File/Form.php | 11 +- library/PhpGedcom/Record/Objectable.php | 10 +- library/PhpGedcom/Record/Phon.php | 9 +- library/PhpGedcom/Record/Plac.php | 40 +- library/PhpGedcom/Record/Plac/Fone.php | 7 +- library/PhpGedcom/Record/Plac/Map.php | 7 +- library/PhpGedcom/Record/Plac/Romn.php | 7 +- library/PhpGedcom/Record/Refn.php | 11 +- library/PhpGedcom/Record/Repo.php | 525 ++++--- library/PhpGedcom/Record/RepoRef.php | 17 +- library/PhpGedcom/Record/Sour.php | 39 +- library/PhpGedcom/Record/Sour/Data.php | 19 +- library/PhpGedcom/Record/Sour/Data/Even.php | 7 +- library/PhpGedcom/Record/Sour/Repo.php | 28 +- library/PhpGedcom/Record/Sour/Repo/Caln.php | 11 +- library/PhpGedcom/Record/SourRef.php | 29 +- library/PhpGedcom/Record/SourRef/Data.php | 15 +- library/PhpGedcom/Record/SourRef/Even.php | 11 +- library/PhpGedcom/Record/Sourceable.php | 10 +- library/PhpGedcom/Record/Subm.php | 631 ++++---- library/PhpGedcom/Record/Subn.php | 39 +- library/PhpGedcom/Writer.php | 89 +- library/PhpGedcom/Writer/Addr.php | 36 +- library/PhpGedcom/Writer/Caln.php | 23 +- library/PhpGedcom/Writer/Chan.php | 25 +- library/PhpGedcom/Writer/Fam.php | 110 +- library/PhpGedcom/Writer/Fam/Even.php | 80 +- library/PhpGedcom/Writer/Fam/Even/Husb.php | 22 +- library/PhpGedcom/Writer/Fam/Even/Wife.php | 22 +- library/PhpGedcom/Writer/Fam/Slgs.php | 48 +- library/PhpGedcom/Writer/Head.php | 154 +- library/PhpGedcom/Writer/Head/Char.php | 25 +- library/PhpGedcom/Writer/Head/Date.php | 24 +- library/PhpGedcom/Writer/Head/Gedc.php | 23 +- library/PhpGedcom/Writer/Head/Plac.php | 18 +- library/PhpGedcom/Writer/Head/Sour.php | 37 +- library/PhpGedcom/Writer/Head/Sour/Corp.php | 32 +- library/PhpGedcom/Writer/Head/Sour/Data.php | 28 +- library/PhpGedcom/Writer/Indi.php | 138 +- library/PhpGedcom/Writer/Indi/Asso.php | 32 +- library/PhpGedcom/Writer/Indi/Attr.php | 13 +- library/PhpGedcom/Writer/Indi/Even.php | 77 +- library/PhpGedcom/Writer/Indi/Even/Plac.php | 33 +- library/PhpGedcom/Writer/Indi/Famc.php | 28 +- library/PhpGedcom/Writer/Indi/Fams.php | 22 +- library/PhpGedcom/Writer/Indi/Name.php | 52 +- library/PhpGedcom/Writer/Note.php | 48 +- library/PhpGedcom/Writer/NoteRef.php | 23 +- library/PhpGedcom/Writer/Obje.php | 62 +- library/PhpGedcom/Writer/ObjeRef.php | 39 +- library/PhpGedcom/Writer/Phon.php | 14 +- library/PhpGedcom/Writer/Refn.php | 25 +- library/PhpGedcom/Writer/Repo.php | 57 +- library/PhpGedcom/Writer/RepoRef.php | 35 +- library/PhpGedcom/Writer/Sour.php | 78 +- library/PhpGedcom/Writer/Sour/Data.php | 46 +- library/PhpGedcom/Writer/Sour/Data/Even.php | 24 +- library/PhpGedcom/Writer/SourRef.php | 46 +- library/PhpGedcom/Writer/SourRef/Even.php | 25 +- library/PhpGedcom/Writer/Subm.php | 70 +- library/PhpGedcom/Writer/Subn.php | 50 +- tests/bootstrap.php | 6 +- tests/issue/Issue00012Test.php | 4 +- tests/issue/Issue00017Test.php | 5 +- tests/issue/Issue00018Test.php | 5 +- tests/library/Gedcom/ParserTest.php | 75 +- 257 files changed, 4423 insertions(+), 5428 deletions(-) diff --git a/library/PhpGedcom/Gedcom.php b/library/PhpGedcom/Gedcom.php index cc13f74d..e57c35e4 100644 --- a/library/PhpGedcom/Gedcom.php +++ b/library/PhpGedcom/Gedcom.php @@ -1,22 +1,21 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom; /** - * Class Gedcom - * @package PhpGedcom + * Class Gedcom. */ class Gedcom { @@ -39,56 +38,56 @@ class Gedcom * * @var \PhpGedcom\Record\Sour[] */ - protected $sour = array(); + protected $sour = []; /** * Stores all the individuals contained within the GEDCOM file. * * @var \PhpGedcom\Record\Indi[] */ - protected $indi = array(); + protected $indi = []; /** * Stores all the individuals contained within the GEDCOM file. * * @var array */ - protected $uid2indi = array(); + protected $uid2indi = []; /** * Stores all the families contained within the GEDCOM file. * * @var \PhpGedcom\Record\Fam[] */ - protected $fam = array(); + protected $fam = []; /** * Stores all the notes contained within the GEDCOM file that are not inline. * * @var \PhpGedcom\Record\Note[] */ - protected $note = array(); + protected $note = []; /** * Stores all repositories that are contained within the GEDCOM file and referenced by sources. * * @var \PhpGedcom\Record\Repo[] */ - protected $repo = array(); + protected $repo = []; /** * Stores all the media objects that are contained within the GEDCOM file. * * @var \PhpGedcom\Record\Obje[] */ - protected $obje = array(); + protected $obje = []; /** * Stores information about all the submitters to the GEDCOM file. * * @var \PhpGedcom\Record\Subm[] */ - protected $subm = array(); + protected $subm = []; /** * Retrieves the header record of the GEDCOM file. diff --git a/library/PhpGedcom/Parser.php b/library/PhpGedcom/Parser.php index 56373239..e7b45759 100644 --- a/library/PhpGedcom/Parser.php +++ b/library/PhpGedcom/Parser.php @@ -1,318 +1,275 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 $_linePieces = 0; - - /** - * - */ - 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)) { - if ($this->_linePieces == $pieces) { - return $this->_lineRecord; - } - } - - if (empty($this->_line)) { - return false; - } - - $line = trim($this->_line); - - $this->_lineRecord = explode(' ', $line, $pieces); - $this->_linePieces = $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): - if (isset($record[1])) { - $identifier = $this->normalizeIdentifier($record[1]); - } - - if (isset($record[1]) && 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 (isset($record[1]) && trim($record[1]) == 'TRLR') { - // EOF - break; - } else { - $this->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - } else { - $this->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } - - $this->forward(); - } - - return $this->getGedcom(); - } -} \ No newline at end of file +class Parser +{ + protected $_file = null; + + protected $_gedcom = null; + + protected $_errorLog = []; + + protected $_linesParsed = 0; + + protected $_line = ''; + + protected $_lineRecord = null; + + protected $_linePieces = 0; + + 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)) { + if ($this->_linePieces == $pieces) { + return $this->_lineRecord; + } + } + + if (empty($this->_line)) { + return false; + } + + $line = trim($this->_line); + + $this->_lineRecord = explode(' ', $line, $pieces); + $this->_linePieces = $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): + if (isset($record[1])) { + $identifier = $this->normalizeIdentifier($record[1]); + } + + if (isset($record[1]) && trim($record[1]) == 'HEAD') { + Parser\Head::parse($this); + } elseif (isset($record[2]) && trim($record[2]) == 'SUBN') { + Parser\Subn::parse($this); + } elseif (isset($record[2]) && trim($record[2]) == 'SUBM') { + Parser\Subm::parse($this); + } elseif (isset($record[2]) && $record[2] == 'SOUR') { + Parser\Sour::parse($this); + } elseif (isset($record[2]) && $record[2] == 'INDI') { + Parser\Indi::parse($this); + } elseif (isset($record[2]) && $record[2] == 'FAM') { + Parser\Fam::parse($this); + } elseif (isset($record[2]) && substr(trim($record[2]), 0, 4) == 'NOTE') { + Parser\Note::parse($this); + } elseif (isset($record[2]) && $record[2] == 'REPO') { + Parser\Repo::parse($this); + } elseif (isset($record[2]) && $record[2] == 'OBJE') { + Parser\Obje::parse($this); + } elseif (isset($record[1]) && 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 index 6cc8555e..7ace5ab1 100644 --- a/library/PhpGedcom/Parser/Addr.php +++ b/library/PhpGedcom/Parser/Addr.php @@ -1,34 +1,25 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; + $depth = (int) $record[0]; $line = isset($record[2]) ? trim($record[2]) : ''; $addr = new \PhpGedcom\Record\Addr(); @@ -38,7 +29,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtolower(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -46,16 +37,16 @@ public static function parse(\PhpGedcom\Parser $parser) } if ($addr->hasAttribute($recordType)) { - $addr->{'set' . $recordType}(trim($record[2])); + $addr->{'set'.$recordType}(trim($record[2])); } else { if ($recordType == 'cont') { // FIXME: Can have CONT on multiple attributes - $addr->setAddr($addr->getAddr() . "\n"); + $addr->setAddr($addr->getAddr()."\n"); if (isset($record[2])) { - $addr->setAddr($addr->getAddr() . trim($record[2])); + $addr->setAddr($addr->getAddr().trim($record[2])); } } else { - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } } diff --git a/library/PhpGedcom/Parser/Caln.php b/library/PhpGedcom/Parser/Caln.php index 4ffc2f2c..ea91e3f4 100644 --- a/library/PhpGedcom/Parser/Caln.php +++ b/library/PhpGedcom/Parser/Caln.php @@ -1,40 +1,31 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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(); - $depth = (int)$record[0]; - if(isset($record[2])){ - $identifier = $parser->normalizeIdentifier($record[2]); - } - else{ - $parser->skipToNextLevel($depth); - return null; + $depth = (int) $record[0]; + if (isset($record[2])) { + $identifier = $parser->normalizeIdentifier($record[2]); + } else { + $parser->skipToNextLevel($depth); + + return null; } $caln = new \PhpGedcom\Record\Caln(); @@ -45,7 +36,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtolower(trim($record[1])); - $lineDepth = (int)$record[0]; + $lineDepth = (int) $record[0]; if ($lineDepth <= $depth) { $parser->back(); @@ -53,9 +44,9 @@ public static function parse(\PhpGedcom\Parser $parser) } if ($caln->hasAttribute($recordType)) { - $caln->{'set' . $recordType}(trim($record[2])); + $caln->{'set'.$recordType}(trim($record[2])); } else { - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Chan.php b/library/PhpGedcom/Parser/Chan.php index 5df7b589..5dc5dfc0 100644 --- a/library/PhpGedcom/Parser/Chan.php +++ b/library/PhpGedcom/Parser/Chan.php @@ -1,34 +1,25 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; + $depth = (int) $record[0]; $parser->forward(); @@ -37,7 +28,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = trim($record[1]); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -58,7 +49,7 @@ public static function parse(\PhpGedcom\Parser $parser) } break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Component.php b/library/PhpGedcom/Parser/Component.php index 50aaf487..16484e4e 100644 --- a/library/PhpGedcom/Parser/Component.php +++ b/library/PhpGedcom/Parser/Component.php @@ -1,30 +1,22 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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/Date.php b/library/PhpGedcom/Parser/Date.php index dc19a9c6..2ed23b40 100644 --- a/library/PhpGedcom/Parser/Date.php +++ b/library/PhpGedcom/Parser/Date.php @@ -1,42 +1,36 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Parser; -/** - * - * - */ -class Date extends \PhpGedcom\Parser\Component { +class Date extends \PhpGedcom\Parser\Component +{ + public static function parse(\PhpGedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[1])) { + $dat = new \PhpGedcom\Record\Date(); + if (!empty($record[2])) { + $dat->setDate($record[2]); + } + } else { + $parser->skipToNextLevel($depth); - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) { - $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; - if (isset($record[1])) { - $dat = new \PhpGedcom\Record\Date(); - if (!empty($record[2])) { - $dat->setDate($record[2]); - } - } else { - $parser->skipToNextLevel($depth); - return null; - } + return null; + } - return $dat; - } -} \ No newline at end of file + return $dat; + } +} diff --git a/library/PhpGedcom/Parser/Fam.php b/library/PhpGedcom/Parser/Fam.php index 6dc273c3..8a1a0d3c 100644 --- a/library/PhpGedcom/Parser/Fam.php +++ b/library/PhpGedcom/Parser/Fam.php @@ -1,26 +1,22 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Parser; -/** - * - * - */ class Fam extends \PhpGedcom\Parser\Component { - protected static $_eventTypes = array( + protected static $_eventTypes = [ 'ANUL', 'CENS', 'DIV', @@ -30,23 +26,19 @@ class Fam extends \PhpGedcom\Parser\Component 'MARB', 'MARC', 'MARL', - 'MARS' - ); + 'MARS', + ]; - /** - * - * - */ public static function parse(\PhpGedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - if(isset($record[1])){ - $identifier = $parser->normalizeIdentifier($record[1]); - } - else{ - $parser->skipToNextLevel($depth); - return null; + $depth = (int) $record[0]; + if (isset($record[1])) { + $identifier = $parser->normalizeIdentifier($record[1]); + } else { + $parser->skipToNextLevel($depth); + + return null; } $fam = new \PhpGedcom\Record\Fam(); @@ -58,7 +50,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; $recordType = strtoupper(trim($record[1])); if ($currentDepth <= $depth) { @@ -82,11 +74,11 @@ public static function parse(\PhpGedcom\Parser $parser) case 'MARL': case 'MARS': $className = ucfirst(strtolower($recordType)); - $class = '\\PhpGedcom\\Parser\\Fam\\' . $className; + $class = '\\PhpGedcom\\Parser\\Fam\\'.$className; $even = $class::parse($parser); $fam->addEven($even); - break; + break; case 'HUSB': $fam->setHusb($parser->normalizeIdentifier($record[2])); break; @@ -109,7 +101,7 @@ public static function parse(\PhpGedcom\Parser $parser) case 'REFN': $ref = \PhpGedcom\Parser\Refn::parse($parser); $fam->addRefn($ref); - break; + break; case 'RIN': $fam->setRin(trim($record[2])); break; @@ -133,7 +125,7 @@ public static function parse(\PhpGedcom\Parser $parser) break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Fam/Anul.php b/library/PhpGedcom/Parser/Fam/Anul.php index 3b82f82a..cbfc8270 100644 --- a/library/PhpGedcom/Parser/Fam/Anul.php +++ b/library/PhpGedcom/Parser/Fam/Anul.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 959e9fec..72fc9238 100644 --- a/library/PhpGedcom/Parser/Fam/Cens.php +++ b/library/PhpGedcom/Parser/Fam/Cens.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 3c7941bd..1a17af9a 100644 --- a/library/PhpGedcom/Parser/Fam/Div.php +++ b/library/PhpGedcom/Parser/Fam/Div.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 165a5d61..448105e6 100644 --- a/library/PhpGedcom/Parser/Fam/Divf.php +++ b/library/PhpGedcom/Parser/Fam/Divf.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index a66eb00f..117f1a38 100644 --- a/library/PhpGedcom/Parser/Fam/Enga.php +++ b/library/PhpGedcom/Parser/Fam/Enga.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index c006bf8a..9001c06f 100644 --- a/library/PhpGedcom/Parser/Fam/Even.php +++ b/library/PhpGedcom/Parser/Fam/Even.php @@ -1,110 +1,103 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; +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(); + $even = new \PhpGedcom\Record\Fam\Even(); - if (isset($record[1]) && strtoupper(trim($record[1])) != 'EVEN') { - $even->setType(trim($record[1])); - } + if (isset($record[1]) && strtoupper(trim($record[1])) != 'EVEN') { + $even->setType(trim($record[1])); + } - $parser->forward(); + $parser->forward(); - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int) $record[0]; + while (!$parser->eof()) { + $record = $parser->getCurrentLineRecord(); + $recordType = strtoupper(trim($record[1])); + $currentDepth = (int) $record[0]; - if ($currentDepth <= $depth) { - $parser->back(); - break; - } + if ($currentDepth <= $depth) { + $parser->back(); + break; + } - switch ($recordType) { - case 'TYPE': - $even->setType(trim($record[2])); - break; - case 'DATE': - $dat = \PhpGedcom\Parser\Date::parse($parser); - $even->setDate($dat); - //$even->setDate(trim($record[2])); - break; - case 'PLAC': - $plac = \PhpGedcom\Parser\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__); - } + switch ($recordType) { + case 'TYPE': + $even->setType(trim($record[2])); + break; + case 'DATE': + $dat = \PhpGedcom\Parser\Date::parse($parser); + $even->setDate($dat); + //$even->setDate(trim($record[2])); + break; + case 'PLAC': + $plac = \PhpGedcom\Parser\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(); - } + $parser->forward(); + } - return $even; - } + return $even; + } } diff --git a/library/PhpGedcom/Parser/Fam/Even/Husb.php b/library/PhpGedcom/Parser/Fam/Even/Husb.php index 5cfa0034..b0f8515e 100644 --- a/library/PhpGedcom/Parser/Fam/Even/Husb.php +++ b/library/PhpGedcom/Parser/Fam/Even/Husb.php @@ -1,60 +1,51 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; - + $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]; - + $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->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 index 99565167..c6845fd6 100644 --- a/library/PhpGedcom/Parser/Fam/Even/Wife.php +++ b/library/PhpGedcom/Parser/Fam/Even/Wife.php @@ -1,60 +1,51 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; - + $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]; - + $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->logUnhandledRecord(get_class().' @ '.__LINE__); } - + $parser->forward(); } - + return $wife; } } diff --git a/library/PhpGedcom/Parser/Fam/Marb.php b/library/PhpGedcom/Parser/Fam/Marb.php index 871b7195..78a70c75 100644 --- a/library/PhpGedcom/Parser/Fam/Marb.php +++ b/library/PhpGedcom/Parser/Fam/Marb.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 2d094385..34c93205 100644 --- a/library/PhpGedcom/Parser/Fam/Marc.php +++ b/library/PhpGedcom/Parser/Fam/Marc.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 29d27133..1031f5f3 100644 --- a/library/PhpGedcom/Parser/Fam/Marl.php +++ b/library/PhpGedcom/Parser/Fam/Marl.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 9ae0d67c..f52c576c 100644 --- a/library/PhpGedcom/Parser/Fam/Marr.php +++ b/library/PhpGedcom/Parser/Fam/Marr.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index aa98d639..2ef26680 100644 --- a/library/PhpGedcom/Parser/Fam/Mars.php +++ b/library/PhpGedcom/Parser/Fam/Mars.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 38605c91..4cccaf25 100644 --- a/library/PhpGedcom/Parser/Fam/Slgs.php +++ b/library/PhpGedcom/Parser/Fam/Slgs.php @@ -1,34 +1,25 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; + $depth = (int) $record[0]; $slgs = new \PhpGedcom\Record\Fam\Slgs(); @@ -37,7 +28,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -69,7 +60,7 @@ public static function parse(\PhpGedcom\Parser $parser) } break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Fam/Slgs/Stat.php b/library/PhpGedcom/Parser/Fam/Slgs/Stat.php index ca9e0acc..523102c3 100644 --- a/library/PhpGedcom/Parser/Fam/Slgs/Stat.php +++ b/library/PhpGedcom/Parser/Fam/Slgs/Stat.php @@ -1,67 +1,59 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Parser\Fam\Slgs; -/** - * - * - */ class Stat extends \PhpGedcom\Parser\Component { - - /** - * - * - */ public static function parse(\PhpGedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; - if (isset($record[2])) { - $_stat = $record[2]; - } else { - $parser->skipToNextLevel($depth); - return null; - } + $depth = (int) $record[0]; + if (isset($record[2])) { + $_stat = $record[2]; + } else { + $parser->skipToNextLevel($depth); + + return null; + } $stat = new \PhpGedcom\Record\Fam\Slgs\Stat(); $stat->setStat($_stat); $parser->forward(); - + while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - + $currentDepth = (int) $record[0]; + if ($currentDepth <= $depth) { $parser->back(); break; } - + switch ($recordType) { case 'DATE': $stat->setDate(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } - + $parser->forward(); } - + return $stat; } } diff --git a/library/PhpGedcom/Parser/Head.php b/library/PhpGedcom/Parser/Head.php index 542e0a29..ba860070 100644 --- a/library/PhpGedcom/Parser/Head.php +++ b/library/PhpGedcom/Parser/Head.php @@ -1,42 +1,36 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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(); - $depth = (int)$record[0]; - if(isset($record[1])){ - $identifier = $parser->normalizeIdentifier($record[1]); - } - else{ - $parser->skipToNextLevel($depth); - return null; + $depth = (int) $record[0]; + if (isset($record[1])) { + $identifier = $parser->normalizeIdentifier($record[1]); + } else { + $parser->skipToNextLevel($depth); + + return null; } $head = new \PhpGedcom\Record\Head(); @@ -47,7 +41,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; $recordType = strtoupper(trim($record[1])); if ($currentDepth <= $depth) { @@ -101,7 +95,7 @@ public static function parse(\PhpGedcom\Parser $parser) $head->setNote($parser->parseMultiLineRecord()); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Head/Char.php b/library/PhpGedcom/Parser/Head/Char.php index 2bb8fc52..3dda7621 100644 --- a/library/PhpGedcom/Parser/Head/Char.php +++ b/library/PhpGedcom/Parser/Head/Char.php @@ -1,50 +1,40 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; - if(isset($record[2])){ - $char = new \PhpGedcom\Record\Head\Char(); - $char->setChar(trim($record[2])); + $depth = (int) $record[0]; + if (isset($record[2])) { + $char = new \PhpGedcom\Record\Head\Char(); + $char->setChar(trim($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; } - else{ - $parser->skipToNextLevel($depth); - return null; - } - $parser->forward(); while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -56,7 +46,7 @@ public static function parse(\PhpGedcom\Parser $parser) $char->setVers(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Head/Date.php b/library/PhpGedcom/Parser/Head/Date.php index 1bf2fd7c..7be159a0 100644 --- a/library/PhpGedcom/Parser/Head/Date.php +++ b/library/PhpGedcom/Parser/Head/Date.php @@ -1,41 +1,32 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; - if(isset($record[2])){ - $date = new \PhpGedcom\Record\Head\Date(); - $date->setDate(trim($record[2])); - } - else{ - $parser->skipToNextLevel($depth); - return null; + $depth = (int) $record[0]; + if (isset($record[2])) { + $date = new \PhpGedcom\Record\Head\Date(); + $date->setDate(trim($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; } $parser->forward(); @@ -43,7 +34,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -55,7 +46,7 @@ public static function parse(\PhpGedcom\Parser $parser) $date->setTime(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Head/Gedc.php b/library/PhpGedcom/Parser/Head/Gedc.php index 7e2ed7fb..c5754c96 100644 --- a/library/PhpGedcom/Parser/Head/Gedc.php +++ b/library/PhpGedcom/Parser/Head/Gedc.php @@ -1,34 +1,25 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; + $depth = (int) $record[0]; $gedc = new \PhpGedcom\Record\Head\Gedc(); @@ -37,7 +28,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -52,7 +43,7 @@ public static function parse(\PhpGedcom\Parser $parser) $gedc->setForm(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Head/Plac.php b/library/PhpGedcom/Parser/Head/Plac.php index 14f5cf5c..2c7bb05d 100644 --- a/library/PhpGedcom/Parser/Head/Plac.php +++ b/library/PhpGedcom/Parser/Head/Plac.php @@ -1,34 +1,25 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; + $depth = (int) $record[0]; $plac = new \PhpGedcom\Record\Head\Plac(); @@ -37,7 +28,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -49,7 +40,7 @@ public static function parse(\PhpGedcom\Parser $parser) $plac->setForm(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Head/Sour.php b/library/PhpGedcom/Parser/Head/Sour.php index 09c28601..d1669fd7 100644 --- a/library/PhpGedcom/Parser/Head/Sour.php +++ b/library/PhpGedcom/Parser/Head/Sour.php @@ -1,41 +1,32 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; - if(isset($record[2])){ - $source = new \PhpGedcom\Record\Head\Sour(); - $source->setSour(trim($record[2])); - } - else{ - $parser->skipToNextLevel($depth); - return null; + $depth = (int) $record[0]; + if (isset($record[2])) { + $source = new \PhpGedcom\Record\Head\Sour(); + $source->setSour(trim($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; } $parser->forward(); @@ -43,7 +34,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -66,7 +57,7 @@ public static function parse(\PhpGedcom\Parser $parser) $source->setData($data); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Head/Sour/Corp.php b/library/PhpGedcom/Parser/Head/Sour/Corp.php index c049eb35..8199c233 100644 --- a/library/PhpGedcom/Parser/Head/Sour/Corp.php +++ b/library/PhpGedcom/Parser/Head/Sour/Corp.php @@ -1,50 +1,40 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; - if(isset($record[2])){ - $corp = new \PhpGedcom\Record\Head\Sour\Corp(); - $corp->setCorp(trim($record[2])); + $depth = (int) $record[0]; + if (isset($record[2])) { + $corp = new \PhpGedcom\Record\Head\Sour\Corp(); + $corp->setCorp(trim($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; } - else{ - $parser->skipToNextLevel($depth); - return null; - } - $parser->forward(); while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -59,7 +49,7 @@ public static function parse(\PhpGedcom\Parser $parser) $corp->addPhon(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Head/Sour/Data.php b/library/PhpGedcom/Parser/Head/Sour/Data.php index c18f4e07..9b4930d0 100644 --- a/library/PhpGedcom/Parser/Head/Sour/Data.php +++ b/library/PhpGedcom/Parser/Head/Sour/Data.php @@ -1,41 +1,32 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; - if(isset($record[2])){ - $data = new \PhpGedcom\Record\Head\Sour\Data(); - $data->setData(trim($record[2])); - } - else{ - $parser->skipToNextLevel($depth); - return null; + $depth = (int) $record[0]; + if (isset($record[2])) { + $data = new \PhpGedcom\Record\Head\Sour\Data(); + $data->setData(trim($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; } $parser->forward(); @@ -43,7 +34,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -58,7 +49,7 @@ public static function parse(\PhpGedcom\Parser $parser) $data->setCopr(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Indi.php b/library/PhpGedcom/Parser/Indi.php index fb280a28..377c44a5 100644 --- a/library/PhpGedcom/Parser/Indi.php +++ b/library/PhpGedcom/Parser/Indi.php @@ -1,193 +1,188 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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(); - $depth = (int) $record[0]; - if (isset($record[1])) { - $identifier = $parser->normalizeIdentifier($record[1]); - } else { - $parser->skipToNextLevel($depth); - return null; - } +class Indi extends \PhpGedcom\Parser\Component +{ + public static function parse(\PhpGedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[1])) { + $identifier = $parser->normalizeIdentifier($record[1]); + } else { + $parser->skipToNextLevel($depth); + + return null; + } - $indi = new \PhpGedcom\Record\Indi(); - $indi->setId($identifier); + $indi = new \PhpGedcom\Record\Indi(); + $indi->setId($identifier); - $parser->getGedcom()->addIndi($indi); + $parser->getGedcom()->addIndi($indi); - $parser->forward(); + $parser->forward(); - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int) $record[0]; + while (!$parser->eof()) { + $record = $parser->getCurrentLineRecord(); + $recordType = strtoupper(trim($record[1])); + $currentDepth = (int) $record[0]; - if ($currentDepth <= $depth) { - $parser->back(); - break; - } + if ($currentDepth <= $depth) { + $parser->back(); + break; + } - switch ($recordType) { - case '_UID': - $indi->setUid(trim($record[2])); - break; - case 'RESN': - $indi->setResn(trim($record[2])); - break; - case 'NAME': - $name = \PhpGedcom\Parser\Indi\Name::parse($parser); - $indi->addName($name); - break; - case 'SEX': - $indi->setSex(isset($record[2]) ? trim($record[2]) : ''); - 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; + switch ($recordType) { + case '_UID': + $indi->setUid(trim($record[2])); + break; + case 'RESN': + $indi->setResn(trim($record[2])); + break; + case 'NAME': + $name = \PhpGedcom\Parser\Indi\Name::parse($parser); + $indi->addName($name); + break; + case 'SEX': + $indi->setSex(isset($record[2]) ? trim($record[2]) : ''); + 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; + $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; - case 'BAPL': - case 'CONL': - case 'ENDL': - case 'SLGC': - $className = ucfirst(strtolower($recordType)); - $class = '\\PhpGedcom\\Parser\\Indi\\' . $className; + $att = $class::parse($parser); + $indi->addAttr($att); + break; + case 'BAPL': + case 'CONL': + case 'ENDL': + case 'SLGC': + $className = ucfirst(strtolower($recordType)); + $class = '\\PhpGedcom\\Parser\\Indi\\'.$className; - $lds = $class::parse($parser); - $indi->{'add' . $recordType}[] = $lds; - break; - case 'FAMC': - $famc = \PhpGedcom\Parser\Indi\Famc::parse($parser); - if ($famc) { - $indi->addFamc($famc); - } - break; - case 'FAMS': - $fams = \PhpGedcom\Parser\Indi\Fams::parse($parser); - if ($fams) { - $indi->addFams($fams); - } - break; - case 'SUBM': - $indi->addSubm($parser->normalizeIdentifier($record[2])); - break; - case 'ASSO': - $asso = \PhpGedcom\Parser\Indi\Asso::parse($parser); - $indi->addAsso($asso); - break; - case 'ALIA': - $indi->addAlia($parser->normalizeIdentifier($record[2])); - break; - case 'ANCI': - $indi->addAnci($parser->normalizeIdentifier($record[2])); - break; - case 'DESI': - $indi->addDesi($parser->normalizeIdentifier($record[2])); - break; - case 'RFN': - $indi->setRfn(trim($record[2])); - break; - case 'AFN': - $indi->setAfn(trim($record[2])); - break; - case 'REFN': - $ref = \PhpGedcom\Parser\Refn::parse($parser); - $indi->addRefn($ref); - break; - case 'RIN': - $indi->setRin(trim($record[2])); - break; - case 'CHAN': - $chan = \PhpGedcom\Parser\Chan::parse($parser); - $indi->setChan($chan); - 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 'OBJE': - $obje = \PhpGedcom\Parser\ObjeRef::parse($parser); - $indi->addObje($obje); - break; - default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); - } + $lds = $class::parse($parser); + $indi->{'add'.$recordType}[] = $lds; + break; + case 'FAMC': + $famc = \PhpGedcom\Parser\Indi\Famc::parse($parser); + if ($famc) { + $indi->addFamc($famc); + } + break; + case 'FAMS': + $fams = \PhpGedcom\Parser\Indi\Fams::parse($parser); + if ($fams) { + $indi->addFams($fams); + } + break; + case 'SUBM': + $indi->addSubm($parser->normalizeIdentifier($record[2])); + break; + case 'ASSO': + $asso = \PhpGedcom\Parser\Indi\Asso::parse($parser); + $indi->addAsso($asso); + break; + case 'ALIA': + $indi->addAlia($parser->normalizeIdentifier($record[2])); + break; + case 'ANCI': + $indi->addAnci($parser->normalizeIdentifier($record[2])); + break; + case 'DESI': + $indi->addDesi($parser->normalizeIdentifier($record[2])); + break; + case 'RFN': + $indi->setRfn(trim($record[2])); + break; + case 'AFN': + $indi->setAfn(trim($record[2])); + break; + case 'REFN': + $ref = \PhpGedcom\Parser\Refn::parse($parser); + $indi->addRefn($ref); + break; + case 'RIN': + $indi->setRin(trim($record[2])); + break; + case 'CHAN': + $chan = \PhpGedcom\Parser\Chan::parse($parser); + $indi->setChan($chan); + 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 'OBJE': + $obje = \PhpGedcom\Parser\ObjeRef::parse($parser); + $indi->addObje($obje); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } - $parser->forward(); - } + $parser->forward(); + } - return $indi; - } + return $indi; + } } diff --git a/library/PhpGedcom/Parser/Indi/Adop.php b/library/PhpGedcom/Parser/Indi/Adop.php index ebe3125d..4fbaca06 100644 --- a/library/PhpGedcom/Parser/Indi/Adop.php +++ b/library/PhpGedcom/Parser/Indi/Adop.php @@ -1,36 +1,34 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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(); - if(isset($record[1])) - $even->setAdop(trim($record[2])); + if (isset($record[1])) { + $even->setAdop(trim($record[2])); + } } public static function parseFamc($parser, $even) { $record = $parser->getCurrentLineRecord(); - if(isset($record[1])) - $even->setFamc(trim($record[2])); + if (isset($record[1])) { + $even->setFamc(trim($record[2])); + } } } diff --git a/library/PhpGedcom/Parser/Indi/Asso.php b/library/PhpGedcom/Parser/Indi/Asso.php index 9b2b96d0..ca4b4edc 100644 --- a/library/PhpGedcom/Parser/Indi/Asso.php +++ b/library/PhpGedcom/Parser/Indi/Asso.php @@ -1,50 +1,40 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; - if(isset($record[2])){ - $asso = new \PhpGedcom\Record\Indi\Asso(); - $asso->setIndi($parser->normalizeIdentifier($record[2])); - } - else{ - $parser->skipToNextLevel($depth); - return null; - } + $depth = (int) $record[0]; + if (isset($record[2])) { + $asso = new \PhpGedcom\Record\Indi\Asso(); + $asso->setIndi($parser->normalizeIdentifier($record[2])); + } else { + $parser->skipToNextLevel($depth); + return null; + } $parser->forward(); while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -66,7 +56,7 @@ public static function parse(\PhpGedcom\Parser $parser) } break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Indi/Attr.php b/library/PhpGedcom/Parser/Indi/Attr.php index 0f49dc36..17f18e5d 100644 --- a/library/PhpGedcom/Parser/Indi/Attr.php +++ b/library/PhpGedcom/Parser/Indi/Attr.php @@ -1,43 +1,34 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; - if(isset($record[1])){ - $className = '\\PhpGedcom\\Record\\Indi\\' . ucfirst(strtolower(trim($record[1]))); - $attr = new $className(); + $depth = (int) $record[0]; + if (isset($record[1])) { + $className = '\\PhpGedcom\\Record\\Indi\\'.ucfirst(strtolower(trim($record[1]))); + $attr = new $className(); - $attr->setType(trim($record[1])); - } - else{ - $parser->skipToNextLevel($depth); - return null; + $attr->setType(trim($record[1])); + } else { + $parser->skipToNextLevel($depth); + + return null; } if (isset($record[2])) { @@ -49,7 +40,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -98,7 +89,7 @@ public static function parse(\PhpGedcom\Parser $parser) } break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Indi/Bapl.php b/library/PhpGedcom/Parser/Indi/Bapl.php index 51f7b5ff..7ddc8c96 100644 --- a/library/PhpGedcom/Parser/Indi/Bapl.php +++ b/library/PhpGedcom/Parser/Indi/Bapl.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 89473790..6cb91df2 100644 --- a/library/PhpGedcom/Parser/Indi/Bapm.php +++ b/library/PhpGedcom/Parser/Indi/Bapm.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 7528ebf5..5e759ed5 100644 --- a/library/PhpGedcom/Parser/Indi/Barm.php +++ b/library/PhpGedcom/Parser/Indi/Barm.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index c2b69827..7c2425a6 100644 --- a/library/PhpGedcom/Parser/Indi/Basm.php +++ b/library/PhpGedcom/Parser/Indi/Basm.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 24a9c5cb..1097fede 100644 --- a/library/PhpGedcom/Parser/Indi/Birt.php +++ b/library/PhpGedcom/Parser/Indi/Birt.php @@ -1,29 +1,26 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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(); - if(isset($record[2])) - $even->setFamc(trim($record[2])); + if (isset($record[2])) { + $even->setFamc(trim($record[2])); + } } } diff --git a/library/PhpGedcom/Parser/Indi/Bles.php b/library/PhpGedcom/Parser/Indi/Bles.php index 8e980649..e0c1cd00 100644 --- a/library/PhpGedcom/Parser/Indi/Bles.php +++ b/library/PhpGedcom/Parser/Indi/Bles.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index d7a7f44f..ad06eec7 100644 --- a/library/PhpGedcom/Parser/Indi/Buri.php +++ b/library/PhpGedcom/Parser/Indi/Buri.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 444537c5..99789056 100644 --- a/library/PhpGedcom/Parser/Indi/Cast.php +++ b/library/PhpGedcom/Parser/Indi/Cast.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index f49bd006..86899215 100644 --- a/library/PhpGedcom/Parser/Indi/Cens.php +++ b/library/PhpGedcom/Parser/Indi/Cens.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 0a15db78..5654c707 100644 --- a/library/PhpGedcom/Parser/Indi/Chr.php +++ b/library/PhpGedcom/Parser/Indi/Chr.php @@ -1,30 +1,26 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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(); - if(isset($record[2])){ - $even->setFamc(trim($record[2])); + if (isset($record[2])) { + $even->setFamc(trim($record[2])); } } } diff --git a/library/PhpGedcom/Parser/Indi/Chra.php b/library/PhpGedcom/Parser/Indi/Chra.php index 5d147a93..0540e945 100644 --- a/library/PhpGedcom/Parser/Indi/Chra.php +++ b/library/PhpGedcom/Parser/Indi/Chra.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index e9e77c48..7b4e5872 100644 --- a/library/PhpGedcom/Parser/Indi/Conf.php +++ b/library/PhpGedcom/Parser/Indi/Conf.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index abb234ab..fffd5ed7 100644 --- a/library/PhpGedcom/Parser/Indi/Conl.php +++ b/library/PhpGedcom/Parser/Indi/Conl.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 6ec8d82a..e2efa06b 100644 --- a/library/PhpGedcom/Parser/Indi/Crem.php +++ b/library/PhpGedcom/Parser/Indi/Crem.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 0c991a2c..8bfb3523 100644 --- a/library/PhpGedcom/Parser/Indi/Deat.php +++ b/library/PhpGedcom/Parser/Indi/Deat.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 49eca70a..3e0240e5 100644 --- a/library/PhpGedcom/Parser/Indi/Dscr.php +++ b/library/PhpGedcom/Parser/Indi/Dscr.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 98590e49..30e9b6f0 100644 --- a/library/PhpGedcom/Parser/Indi/Educ.php +++ b/library/PhpGedcom/Parser/Indi/Educ.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 81295d59..18e7e536 100644 --- a/library/PhpGedcom/Parser/Indi/Emig.php +++ b/library/PhpGedcom/Parser/Indi/Emig.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index e44bb2a9..6021c2d9 100644 --- a/library/PhpGedcom/Parser/Indi/Endl.php +++ b/library/PhpGedcom/Parser/Indi/Endl.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 8b63057d..9da06ccd 100644 --- a/library/PhpGedcom/Parser/Indi/Even.php +++ b/library/PhpGedcom/Parser/Indi/Even.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -16,36 +16,30 @@ use PhpGedcom\Parser\Chan; -/** - * - * - */ -class Even extends \PhpGedcom\Parser\Component { +class Even extends \PhpGedcom\Parser\Component +{ + public static function parse(\PhpGedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (empty($record[1])) { + $parser->skipToNextLevel($depth); - /** - * - * - */ - public static function parse(\PhpGedcom\Parser $parser) { - $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; - if (empty($record[1])) { - $parser->skipToNextLevel($depth); - return null; - } + return null; + } - $even = null; + $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 (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])); - } + if (isset($record[1]) && strtoupper(trim($record[1])) != 'EVEN') { + $even->setType(trim($record[1])); + } // ensures we capture any data following the EVEN type if (isset($record[2]) && !empty($record[2])) { @@ -54,78 +48,78 @@ public static function parse(\PhpGedcom\Parser $parser) { $parser->forward(); - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int) $record[0]; + while (!$parser->eof()) { + $record = $parser->getCurrentLineRecord(); + $recordType = strtoupper(trim($record[1])); + $currentDepth = (int) $record[0]; - if ($currentDepth <= $depth) { - $parser->back(); - break; - } + if ($currentDepth <= $depth) { + $parser->back(); + break; + } - switch ($recordType) { - case 'TYPE': - $even->setType(trim($record[2])); - break; - case 'DATE': - $dat = \PhpGedcom\Parser\Date::parse($parser); - $even->setDate($dat); - //$even->setDate(trim($record[2])) - break; - case 'PLAC': - $plac = \PhpGedcom\Parser\Plac::parse($parser); - $even->setPlac($plac); - break; - case 'ADDR': - $even->setAddr(\PhpGedcom\Parser\Addr::parse($parser)); - 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 '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; + switch ($recordType) { + case 'TYPE': + $even->setType(trim($record[2])); + break; + case 'DATE': + $dat = \PhpGedcom\Parser\Date::parse($parser); + $even->setDate($dat); + //$even->setDate(trim($record[2])) + break; + case 'PLAC': + $plac = \PhpGedcom\Parser\Plac::parse($parser); + $even->setPlac($plac); + break; + case 'ADDR': + $even->setAddr(\PhpGedcom\Parser\Addr::parse($parser)); + 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 '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); - } - } + if (method_exists($self, $method)) { + $self::$method($parser, $even); + } else { + $parser->logUnhandledRecord($self.' @ '.__LINE__); + $parser->skipToNextLevel($currentDepth); + } + } - $parser->forward(); - } + $parser->forward(); + } - return $even; - } + return $even; + } } diff --git a/library/PhpGedcom/Parser/Indi/Even/Plac.php b/library/PhpGedcom/Parser/Indi/Even/Plac.php index ea4de0d3..20db6830 100644 --- a/library/PhpGedcom/Parser/Indi/Even/Plac.php +++ b/library/PhpGedcom/Parser/Indi/Even/Plac.php @@ -1,34 +1,25 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; + $depth = (int) $record[0]; $plac = new \PhpGedcom\Record\Indi\Even\Plac(); @@ -41,7 +32,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -63,7 +54,7 @@ public static function parse(\PhpGedcom\Parser $parser) $plac->addSour($sour); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Indi/Famc.php b/library/PhpGedcom/Parser/Indi/Famc.php index 44fba3ac..d930589b 100644 --- a/library/PhpGedcom/Parser/Indi/Famc.php +++ b/library/PhpGedcom/Parser/Indi/Famc.php @@ -1,38 +1,30 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; + $depth = (int) $record[0]; if (count($record) < 3) { - $parser->logSkippedRecord('Missing family information; ' . get_class(), ' @ ' . __LINE__); + $parser->logSkippedRecord('Missing family information; '.get_class(), ' @ '.__LINE__); $parser->skipToNextLevel($depth); + return null; } @@ -46,7 +38,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -64,7 +56,7 @@ public static function parse(\PhpGedcom\Parser $parser) } break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Indi/Fams.php b/library/PhpGedcom/Parser/Indi/Fams.php index 65cb6a5a..a4e8b5ee 100644 --- a/library/PhpGedcom/Parser/Indi/Fams.php +++ b/library/PhpGedcom/Parser/Indi/Fams.php @@ -1,38 +1,30 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; + $depth = (int) $record[0]; if (count($record) < 3) { - $parser->logSkippedRecord('Missing family information; ' . get_class(), ' @ ' . __LINE__); + $parser->logSkippedRecord('Missing family information; '.get_class(), ' @ '.__LINE__); $parser->skipToNextLevel($depth); + return null; } @@ -46,7 +38,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -61,7 +53,7 @@ public static function parse(\PhpGedcom\Parser $parser) } break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Indi/Fcom.php b/library/PhpGedcom/Parser/Indi/Fcom.php index bbeca618..6cf0f0c7 100644 --- a/library/PhpGedcom/Parser/Indi/Fcom.php +++ b/library/PhpGedcom/Parser/Indi/Fcom.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 1630b874..e23024f2 100644 --- a/library/PhpGedcom/Parser/Indi/Grad.php +++ b/library/PhpGedcom/Parser/Indi/Grad.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index aebb93b8..772b1a21 100644 --- a/library/PhpGedcom/Parser/Indi/Idno.php +++ b/library/PhpGedcom/Parser/Indi/Idno.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 5299215b..191eac06 100644 --- a/library/PhpGedcom/Parser/Indi/Immi.php +++ b/library/PhpGedcom/Parser/Indi/Immi.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 03de6614..c2c68342 100644 --- a/library/PhpGedcom/Parser/Indi/Lds.php +++ b/library/PhpGedcom/Parser/Indi/Lds.php @@ -1,50 +1,40 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; - if(isset($record[1])){ - $className = '\\PhpGedcom\\Record\\Indi\\' . ucfirst(strtolower(trim($record[1]))); - $lds = new $className(); - } - else{ - $parser->skipToNextLevel($depth); - return null; - } + $depth = (int) $record[0]; + if (isset($record[1])) { + $className = '\\PhpGedcom\\Record\\Indi\\'.ucfirst(strtolower(trim($record[1]))); + $lds = new $className(); + } else { + $parser->skipToNextLevel($depth); + return null; + } $parser->forward(); while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -76,12 +66,12 @@ public static function parse(\PhpGedcom\Parser $parser) break; default: $self = get_called_class(); - $method = 'parse' . $recordType; + $method = 'parse'.$recordType; if (method_exists($self, $method)) { $self::$method($parser, $lds); } else { - $parser->logUnhandledRecord($self . ' @ ' . __LINE__); + $parser->logUnhandledRecord($self.' @ '.__LINE__); } } diff --git a/library/PhpGedcom/Parser/Indi/Name.php b/library/PhpGedcom/Parser/Indi/Name.php index 971ff1ce..af5e0a55 100644 --- a/library/PhpGedcom/Parser/Indi/Name.php +++ b/library/PhpGedcom/Parser/Indi/Name.php @@ -1,50 +1,40 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; - if(isset($record[2])){ - $name = new \PhpGedcom\Record\Indi\Name(); - $name->setName(trim($record[2])); - } - else{ - $parser->skipToNextLevel($depth); - return null; - } + $depth = (int) $record[0]; + if (isset($record[2])) { + $name = new \PhpGedcom\Record\Indi\Name(); + $name->setName(trim($record[2])); + } else { + $parser->skipToNextLevel($depth); + return null; + } $parser->forward(); while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -94,7 +84,7 @@ public static function parse(\PhpGedcom\Parser $parser) $name->setRomn(\PhpGedcom\Parser\Indi\Name\Romn::parse($parser)); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Indi/Name/Fone.php b/library/PhpGedcom/Parser/Indi/Name/Fone.php index 1e303fdf..60b0ca2e 100644 --- a/library/PhpGedcom/Parser/Indi/Name/Fone.php +++ b/library/PhpGedcom/Parser/Indi/Name/Fone.php @@ -1,49 +1,38 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Parser\Indi\Name; -/** - * - * - */ class Fone extends \PhpGedcom\Parser\Component { - - /** - * - * - */ public static function parse(\PhpGedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - if(isset($record[2])){ - $fone = new \PhpGedcom\Record\Indi\Name\Fone(); - $fone->setFone(trim($record[2])); - } - else{ - return null; + $depth = (int) $record[0]; + if (isset($record[2])) { + $fone = new \PhpGedcom\Record\Indi\Name\Fone(); + $fone->setFone(trim($record[2])); + } else { + return null; } - $parser->forward(); while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -57,7 +46,7 @@ public static function parse(\PhpGedcom\Parser $parser) switch ($recordType) { case 'TYPE': $fone->setType(trim($record[2])); - break; + break; case 'NPFX': $fone->setNpfx(trim($record[2])); break; @@ -77,7 +66,7 @@ public static function parse(\PhpGedcom\Parser $parser) $fone->setNsfx(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Indi/Name/Romn.php b/library/PhpGedcom/Parser/Indi/Name/Romn.php index 06563091..52208c59 100644 --- a/library/PhpGedcom/Parser/Indi/Name/Romn.php +++ b/library/PhpGedcom/Parser/Indi/Name/Romn.php @@ -1,50 +1,40 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Parser\Indi\Name; -/** - * - * - */ class Romn extends \PhpGedcom\Parser\Component { - - /** - * - * - */ public static function parse(\PhpGedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - if(isset($record[2])){ - $romn = new \PhpGedcom\Record\Indi\Name\Romn(); - $romn->setRomn(trim($record[2])); - } - else{ - $parser->skipToNextLevel($depth); - return null; - } + $depth = (int) $record[0]; + if (isset($record[2])) { + $romn = new \PhpGedcom\Record\Indi\Name\Romn(); + $romn->setRomn(trim($record[2])); + } else { + $parser->skipToNextLevel($depth); + return null; + } $parser->forward(); while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -78,7 +68,7 @@ public static function parse(\PhpGedcom\Parser $parser) $romn->setNsfx(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Indi/Nati.php b/library/PhpGedcom/Parser/Indi/Nati.php index f440d060..fb7d980a 100644 --- a/library/PhpGedcom/Parser/Indi/Nati.php +++ b/library/PhpGedcom/Parser/Indi/Nati.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index e319059e..0cc9b6dd 100644 --- a/library/PhpGedcom/Parser/Indi/Natu.php +++ b/library/PhpGedcom/Parser/Indi/Natu.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index c59887d5..9b072ac9 100644 --- a/library/PhpGedcom/Parser/Indi/Nchi.php +++ b/library/PhpGedcom/Parser/Indi/Nchi.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 27ec3420..370f6010 100644 --- a/library/PhpGedcom/Parser/Indi/Nmr.php +++ b/library/PhpGedcom/Parser/Indi/Nmr.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 51b3a9d5..dfe0b538 100644 --- a/library/PhpGedcom/Parser/Indi/Occu.php +++ b/library/PhpGedcom/Parser/Indi/Occu.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index d67e748e..3e941250 100644 --- a/library/PhpGedcom/Parser/Indi/Ordn.php +++ b/library/PhpGedcom/Parser/Indi/Ordn.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 1f650637..961f19e2 100644 --- a/library/PhpGedcom/Parser/Indi/Prob.php +++ b/library/PhpGedcom/Parser/Indi/Prob.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 31ac6205..cd5edbaa 100644 --- a/library/PhpGedcom/Parser/Indi/Prop.php +++ b/library/PhpGedcom/Parser/Indi/Prop.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 03ef3b0b..0d1cbffb 100644 --- a/library/PhpGedcom/Parser/Indi/Reli.php +++ b/library/PhpGedcom/Parser/Indi/Reli.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 2a4c83f8..6e20ef11 100644 --- a/library/PhpGedcom/Parser/Indi/Resi.php +++ b/library/PhpGedcom/Parser/Indi/Resi.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 8f164be4..737aa802 100644 --- a/library/PhpGedcom/Parser/Indi/Reti.php +++ b/library/PhpGedcom/Parser/Indi/Reti.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 437fb360..030fc5be 100644 --- a/library/PhpGedcom/Parser/Indi/Slgc.php +++ b/library/PhpGedcom/Parser/Indi/Slgc.php @@ -1,28 +1,21 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Parser\Indi; -/** - * - * - */ class Slgc extends Lds { - /** - * - */ public static function parseFamc($parser, $slgc) { $record = $parser->getCurrentLineRecord(); diff --git a/library/PhpGedcom/Parser/Indi/Ssn.php b/library/PhpGedcom/Parser/Indi/Ssn.php index 07bc27bc..1c5e38e4 100644 --- a/library/PhpGedcom/Parser/Indi/Ssn.php +++ b/library/PhpGedcom/Parser/Indi/Ssn.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index b44912ba..8830ef25 100644 --- a/library/PhpGedcom/Parser/Indi/Titl.php +++ b/library/PhpGedcom/Parser/Indi/Titl.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index c7812111..6c3b5ba5 100644 --- a/library/PhpGedcom/Parser/Indi/Will.php +++ b/library/PhpGedcom/Parser/Indi/Will.php @@ -1,23 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 23719493..c081a70f 100644 --- a/library/PhpGedcom/Parser/Note.php +++ b/library/PhpGedcom/Parser/Note.php @@ -1,40 +1,31 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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); - $depth = (int)$record[0]; - if(isset($record[1])){ - $identifier = $parser->normalizeIdentifier($record[1]); - } - else{ - $parser->skipToNextLevel($depth); - return null; + $depth = (int) $record[0]; + if (isset($record[1])) { + $identifier = $parser->normalizeIdentifier($record[1]); + } else { + $parser->skipToNextLevel($depth); + + return null; } $note = new \PhpGedcom\Record\Note(); @@ -48,7 +39,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; $recordType = strtoupper(trim($record[1])); if ($currentDepth <= $depth) { @@ -58,14 +49,14 @@ public static function parse(\PhpGedcom\Parser $parser) switch ($recordType) { case 'CONT': - $note->setNote($note->getNote() . "\n"); + $note->setNote($note->getNote()."\n"); if (isset($record[2])) { - $note->setNote($note->getNote() . $record[2]); + $note->setNote($note->getNote().$record[2]); } break; case 'CONC': if (isset($record[2])) { - $note->setNote($note->getNote() . $record[2]); + $note->setNote($note->getNote().$record[2]); } break; case 'REFN': @@ -84,7 +75,7 @@ public static function parse(\PhpGedcom\Parser $parser) $note->setChan($chan); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/NoteRef.php b/library/PhpGedcom/Parser/NoteRef.php index 8e0a13c0..f0e481ad 100644 --- a/library/PhpGedcom/Parser/NoteRef.php +++ b/library/PhpGedcom/Parser/NoteRef.php @@ -1,37 +1,32 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; + $depth = (int) $record[0]; $note = new \PhpGedcom\Record\NoteRef(); if (count($record) < 3) { - $parser->logSkippedRecord('Missing note information; ' . get_class(), ' @ ' . __LINE__); + $parser->logSkippedRecord('Missing note information; '.get_class(), ' @ '.__LINE__); $parser->skipToNextLevel($depth); + return null; } @@ -49,7 +44,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -62,7 +57,7 @@ public static function parse(\PhpGedcom\Parser $parser) $note->addSour($sour); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Obje.php b/library/PhpGedcom/Parser/Obje.php index 1c052230..ff1f1267 100644 --- a/library/PhpGedcom/Parser/Obje.php +++ b/library/PhpGedcom/Parser/Obje.php @@ -1,40 +1,31 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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(); $depth = (int) $record[0]; - if(isset($record[1])){ - $identifier = $parser->normalizeIdentifier($record[1]); - } - else{ - $parser->skipToNextLevel($depth); - return null; + if (isset($record[1])) { + $identifier = $parser->normalizeIdentifier($record[1]); + } else { + $parser->skipToNextLevel($depth); + + return null; } $obje = new \PhpGedcom\Record\Obje(); @@ -76,14 +67,14 @@ public static function parse(\PhpGedcom\Parser $parser) $chan = \PhpGedcom\Parser\Chan::parse($parser); $obje->setChan($chan); break; - + case 'CHAN': $chan = \PhpGedcom\Parser\Chan::parse($parser); $obje->setChan($chan); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/ObjeRef.php b/library/PhpGedcom/Parser/ObjeRef.php index 07fe2421..0bd94f9b 100644 --- a/library/PhpGedcom/Parser/ObjeRef.php +++ b/library/PhpGedcom/Parser/ObjeRef.php @@ -1,54 +1,47 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; - + $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]; - + $currentDepth = (int) $record[0]; + if ($currentDepth <= $depth) { $parser->back(); break; } - + switch ($recordType) { case 'TITL': $obje->setTitl(trim($record[2])); @@ -57,12 +50,12 @@ public static function parse(\PhpGedcom\Parser $parser) $obje->setFile(\PhpGedcom\Parser\ObjeRef\File::parse($parser)); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } - + $parser->forward(); } - + return $obje; } } diff --git a/library/PhpGedcom/Parser/ObjeRef/File.php b/library/PhpGedcom/Parser/ObjeRef/File.php index 28c67440..e1bc4f18 100644 --- a/library/PhpGedcom/Parser/ObjeRef/File.php +++ b/library/PhpGedcom/Parser/ObjeRef/File.php @@ -1,52 +1,43 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Parser\ObjeRef; -/** - * - * - */ class File extends \PhpGedcom\Parser\Component { - - /** - * - * - */ public static function parse(\PhpGedcom\Parser $parser) { $file = new \PhpGedcom\Record\ObjeRef\File(); $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; - if(isset($record[2])) { + $depth = (int) $record[0]; + if (isset($record[2])) { $file->setFile($record[2]); - }else { + } else { return null; } $parser->forward(); - + while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - + $currentDepth = (int) $record[0]; + if ($currentDepth <= $depth) { $parser->back(); break; } - + switch ($recordType) { case 'FORM': $file->setDate(\PhpGedcom\Parser\ObjeRef\File\Form::parse($parser)); @@ -54,12 +45,12 @@ public static function parse(\PhpGedcom\Parser $parser) case 'TITL': $file->setTitl(trim($record[2])); default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } - + $parser->forward(); } - + return $file; } } diff --git a/library/PhpGedcom/Parser/ObjeRef/File/Form.php b/library/PhpGedcom/Parser/ObjeRef/File/Form.php index c3ce10a4..f7787aa6 100644 --- a/library/PhpGedcom/Parser/ObjeRef/File/Form.php +++ b/library/PhpGedcom/Parser/ObjeRef/File/Form.php @@ -1,53 +1,45 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Parser\ObjeRef\File; -/** - * - * - */ class Form extends \PhpGedcom\Parser\Component { - - /** - * - * - */ public static function parse(\PhpGedcom\Parser $parser) { $form = new \PhpGedcom\Record\ObjeRef\File\Form(); $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; - if(isset($record[2])) { + $depth = (int) $record[0]; + if (isset($record[2])) { $form->setForm($record[2]); } else { $parser->skipToNextLevel($depth); + return null; } $parser->forward(); - + while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - + $currentDepth = (int) $record[0]; + if ($currentDepth <= $depth) { $parser->back(); break; } - + switch ($recordType) { case 'MEDI': $form->setMedi(trim($record[2])); @@ -56,12 +48,12 @@ public static function parse(\PhpGedcom\Parser $parser) $form->setType(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } - + $parser->forward(); } - + return $form; } } diff --git a/library/PhpGedcom/Parser/Phon.php b/library/PhpGedcom/Parser/Phon.php index 5b175781..7b6717a6 100644 --- a/library/PhpGedcom/Parser/Phon.php +++ b/library/PhpGedcom/Parser/Phon.php @@ -1,50 +1,40 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; - if(isset($record[2])){ - $phone = new \PhpGedcom\Record\Phon(); - $phone->setPhon(trim($record[2])); + $depth = (int) $record[0]; + if (isset($record[2])) { + $phone = new \PhpGedcom\Record\Phon(); + $phone->setPhon(trim($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; } - else{ - $parser->skipToNextLevel($depth); - return null; - } - $parser->forward(); while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -53,7 +43,7 @@ public static function parse(\PhpGedcom\Parser $parser) switch ($recordType) { default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Plac.php b/library/PhpGedcom/Parser/Plac.php index 89051db4..5e5319ee 100644 --- a/library/PhpGedcom/Parser/Plac.php +++ b/library/PhpGedcom/Parser/Plac.php @@ -1,40 +1,31 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Parser; -/** - * - * - */ class Plac extends \PhpGedcom\Parser\Component { - - /** - * - * - */ public static function parse(\PhpGedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - if(isset($record[2])){ - $_plac = trim($record[2]); - } - else{ - $parser->skipToNextLevel($depth); - return null; + $depth = (int) $record[0]; + if (isset($record[2])) { + $_plac = trim($record[2]); + } else { + $parser->skipToNextLevel($depth); + + return null; } $plac = new \PhpGedcom\Record\Plac(); @@ -44,7 +35,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; $recordType = strtoupper(trim($record[1])); if ($currentDepth <= $depth) { @@ -74,7 +65,7 @@ public static function parse(\PhpGedcom\Parser $parser) $plac->setMap($map); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Plac/Fone.php b/library/PhpGedcom/Parser/Plac/Fone.php index 3e037132..9152b75d 100644 --- a/library/PhpGedcom/Parser/Plac/Fone.php +++ b/library/PhpGedcom/Parser/Plac/Fone.php @@ -1,40 +1,31 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Parser\Plac; -/** - * - * - */ class Fone extends \PhpGedcom\Parser\Component { - - /** - * - * - */ public static function parse(\PhpGedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - if(isset($record[2])){ - $_fone = trim($record[2]); - } - else{ - $parser->skipToNextLevel($depth); - return null; + $depth = (int) $record[0]; + if (isset($record[2])) { + $_fone = trim($record[2]); + } else { + $parser->skipToNextLevel($depth); + + return null; } $fone = new \PhpGedcom\Record\Plac\Fone(); @@ -44,7 +35,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; $recordType = strtoupper(trim($record[1])); if ($currentDepth <= $depth) { @@ -57,7 +48,7 @@ public static function parse(\PhpGedcom\Parser $parser) $fone->setType(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Plac/Map.php b/library/PhpGedcom/Parser/Plac/Map.php index fcaada9f..ce1d0fc1 100644 --- a/library/PhpGedcom/Parser/Plac/Map.php +++ b/library/PhpGedcom/Parser/Plac/Map.php @@ -1,35 +1,25 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Parser\Plac; -/** - * - * - */ class Map extends \PhpGedcom\Parser\Component { - - /** - * - * - */ public static function parse(\PhpGedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - + $depth = (int) $record[0]; $map = new \PhpGedcom\Record\Plac\Map(); @@ -37,7 +27,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; $recordType = strtoupper(trim($record[1])); if ($currentDepth <= $depth) { @@ -53,7 +43,7 @@ public static function parse(\PhpGedcom\Parser $parser) $map->setLong(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Plac/Romn.php b/library/PhpGedcom/Parser/Plac/Romn.php index 22741182..ba42cf23 100644 --- a/library/PhpGedcom/Parser/Plac/Romn.php +++ b/library/PhpGedcom/Parser/Plac/Romn.php @@ -1,40 +1,31 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Parser\Plac; -/** - * - * - */ class Romn extends \PhpGedcom\Parser\Component { - - /** - * - * - */ public static function parse(\PhpGedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; - if(isset($record[2])){ - $_romn = trim($record[2]); - } - else{ - $parser->skipToNextLevel($depth); - return null; + $depth = (int) $record[0]; + if (isset($record[2])) { + $_romn = trim($record[2]); + } else { + $parser->skipToNextLevel($depth); + + return null; } $romn = new \PhpGedcom\Record\Plac\Romn(); @@ -44,7 +35,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; $recordType = strtoupper(trim($record[1])); if ($currentDepth <= $depth) { @@ -57,7 +48,7 @@ public static function parse(\PhpGedcom\Parser $parser) $romn->setType(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Refn.php b/library/PhpGedcom/Parser/Refn.php index 43798cf0..978f06fe 100644 --- a/library/PhpGedcom/Parser/Refn.php +++ b/library/PhpGedcom/Parser/Refn.php @@ -1,50 +1,40 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; - if(isset($record[2])){ - $refn = new \PhpGedcom\Record\Refn(); - $refn->setRefn(trim($record[2])); + $depth = (int) $record[0]; + if (isset($record[2])) { + $refn = new \PhpGedcom\Record\Refn(); + $refn->setRefn(trim($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; } - else{ - $parser->skipToNextLevel($depth); - return null; - } - $parser->forward(); while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -56,7 +46,7 @@ public static function parse(\PhpGedcom\Parser $parser) $refn->setType(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Repo.php b/library/PhpGedcom/Parser/Repo.php index 5389f6a3..076e9371 100644 --- a/library/PhpGedcom/Parser/Repo.php +++ b/library/PhpGedcom/Parser/Repo.php @@ -1,40 +1,31 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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(); - $depth = (int)$record[0]; - if(isset($record[1])){ - $identifier = $parser->normalizeIdentifier($record[1]); - } - else{ - $parser->skipToNextLevel($depth); - return null; + $depth = (int) $record[0]; + if (isset($record[1])) { + $identifier = $parser->normalizeIdentifier($record[1]); + } else { + $parser->skipToNextLevel($depth); + + return null; } $repo = new \PhpGedcom\Record\Repo(); @@ -46,7 +37,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; $recordType = strtoupper(trim($record[1])); if ($currentDepth <= $depth) { @@ -91,7 +82,7 @@ public static function parse(\PhpGedcom\Parser $parser) $repo->setChan($chan); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/RepoRef.php b/library/PhpGedcom/Parser/RepoRef.php index f560b0a5..964b0053 100644 --- a/library/PhpGedcom/Parser/RepoRef.php +++ b/library/PhpGedcom/Parser/RepoRef.php @@ -1,40 +1,31 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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(); - $depth = (int)$record[0]; - if(isset($record[2])){ - $identifier = $parser->normalizeIdentifier($record[2]); - } - else{ - $parser->skipToNextLevel($depth); - return null; + $depth = (int) $record[0]; + if (isset($record[2])) { + $identifier = $parser->normalizeIdentifier($record[2]); + } else { + $parser->skipToNextLevel($depth); + + return null; } $repo = new \PhpGedcom\Record\RepoRef(); @@ -44,7 +35,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; $recordType = strtoupper(trim($record[1])); if ($currentDepth <= $depth) { @@ -63,7 +54,7 @@ public static function parse(\PhpGedcom\Parser $parser) } break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Sour.php b/library/PhpGedcom/Parser/Sour.php index d5966012..1d42aac4 100644 --- a/library/PhpGedcom/Parser/Sour.php +++ b/library/PhpGedcom/Parser/Sour.php @@ -1,40 +1,31 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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(); - $depth = (int)$record[0]; - if(isset($record[1])){ - $identifier = $parser->normalizeIdentifier($record[1]); - } - else{ - $parser->skipToNextLevel($depth); - return null; + $depth = (int) $record[0]; + if (isset($record[1])) { + $identifier = $parser->normalizeIdentifier($record[1]); + } else { + $parser->skipToNextLevel($depth); + + return null; } $sour = new \PhpGedcom\Record\Sour(); @@ -46,7 +37,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; $recordType = strtoupper(trim($record[1])); if ($currentDepth <= $depth) { @@ -57,7 +48,7 @@ public static function parse(\PhpGedcom\Parser $parser) switch ($recordType) { case 'DATA': $sour->setData(\PhpGedcom\Parser\Sour\Data::parse($parser)); - break; + break; case 'AUTH': $sour->setAuth($parser->parseMultilineRecord()); break; @@ -98,7 +89,7 @@ public static function parse(\PhpGedcom\Parser $parser) $sour->addObje($obje); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Sour/Data.php b/library/PhpGedcom/Parser/Sour/Data.php index 09620a2a..e30794b8 100644 --- a/library/PhpGedcom/Parser/Sour/Data.php +++ b/library/PhpGedcom/Parser/Sour/Data.php @@ -1,34 +1,25 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; + $depth = (int) $record[0]; $data = new \PhpGedcom\Record\Sour\Data(); @@ -37,7 +28,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -64,7 +55,7 @@ public static function parse(\PhpGedcom\Parser $parser) $data->setText($parser->parseMultiLineRecord()); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Sour/Data/Even.php b/library/PhpGedcom/Parser/Sour/Data/Even.php index 87bb5345..bbac5753 100644 --- a/library/PhpGedcom/Parser/Sour/Data/Even.php +++ b/library/PhpGedcom/Parser/Sour/Data/Even.php @@ -1,34 +1,25 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; + $depth = (int) $record[0]; $even = new \PhpGedcom\Record\Sour\Data\Even(); @@ -37,7 +28,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -52,7 +43,7 @@ public static function parse(\PhpGedcom\Parser $parser) $even->setPlac(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Sour/Repo.php b/library/PhpGedcom/Parser/Sour/Repo.php index 5e4ef705..ff5d808e 100644 --- a/library/PhpGedcom/Parser/Sour/Repo.php +++ b/library/PhpGedcom/Parser/Sour/Repo.php @@ -1,46 +1,37 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Parser\Sour; -/** - * - * - */ class Repo extends \PhpGedcom\Parser\Component { - - /** - * - * - */ public static function parse(\PhpGedcom\Parser $parser) { $repo = new \PhpGedcom\Record\Sour\Repo(); $record = $parser->getCurrentLineRecord(); - $depth = (int)$record[0]; + $depth = (int) $record[0]; if (isset($record[2])) { $_repo = $parser->normalizeIdentifier($record[2]); $repo->setRepo($_repo); - } + } $parser->forward(); while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -55,7 +46,7 @@ public static function parse(\PhpGedcom\Parser $parser) $repo->addCaln(\PhpGedcom\Parser\Sour\Repo\Caln::parse($parser)); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Sour/Repo/Caln.php b/library/PhpGedcom/Parser/Sour/Repo/Caln.php index d5e4e43e..6bf0e6e4 100644 --- a/library/PhpGedcom/Parser/Sour/Repo/Caln.php +++ b/library/PhpGedcom/Parser/Sour/Repo/Caln.php @@ -1,65 +1,56 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Parser\Sour\Repo; -/** - * - * - */ class Caln extends \PhpGedcom\Parser\Component { - - /** - * - * - */ public static function parse(\PhpGedcom\Parser $parser) { $caln = new \PhpGedcom\Record\Sour\Repo\Caln(); $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; - if (isset($record[2])) { + $depth = (int) $record[0]; + if (isset($record[2])) { $_caln = $record[2]; $caln->setCaln($_caln); - }else{ + } else { return null; } $parser->forward(); - + while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - + $currentDepth = (int) $record[0]; + if ($currentDepth <= $depth) { $parser->back(); break; } - + switch ($recordType) { case 'MEDI': $caln->setMedi(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } - + $parser->forward(); } - + return $caln; } } diff --git a/library/PhpGedcom/Parser/SourRef.php b/library/PhpGedcom/Parser/SourRef.php index 30535e70..49d34842 100644 --- a/library/PhpGedcom/Parser/SourRef.php +++ b/library/PhpGedcom/Parser/SourRef.php @@ -1,49 +1,40 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; - if(isset($record[2])){ - $sour = new \PhpGedcom\Record\SourRef(); - $sour->setSour($parser->normalizeIdentifier($record[2])); + $depth = (int) $record[0]; + if (isset($record[2])) { + $sour = new \PhpGedcom\Record\SourRef(); + $sour->setSour($parser->normalizeIdentifier($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; } - else{ - $parser->skipToNextLevel($depth); - return null; - } $parser->forward(); while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -80,7 +71,7 @@ public static function parse(\PhpGedcom\Parser $parser) $sour->setQuay(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/SourRef/Data.php b/library/PhpGedcom/Parser/SourRef/Data.php index eb773f55..a77f4b45 100644 --- a/library/PhpGedcom/Parser/SourRef/Data.php +++ b/library/PhpGedcom/Parser/SourRef/Data.php @@ -1,48 +1,39 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Parser\SourRef; -/** - * - * - */ class Data extends \PhpGedcom\Parser\Component { - - /** - * - * - */ public static function parse(\PhpGedcom\Parser $parser) { $data = new \PhpGedcom\Record\SourRef\Data(); $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; + $depth = (int) $record[0]; $parser->forward(); - + while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; - + $currentDepth = (int) $record[0]; + if ($currentDepth <= $depth) { $parser->back(); break; } - + switch ($recordType) { case 'DATE': $data->setDate(trim($record[2])); @@ -51,12 +42,12 @@ public static function parse(\PhpGedcom\Parser $parser) $data->setText($parser->parseMultiLineRecord()); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } - + $parser->forward(); } - + return $data; } } diff --git a/library/PhpGedcom/Parser/SourRef/Even.php b/library/PhpGedcom/Parser/SourRef/Even.php index a4abf16c..6b0bd183 100644 --- a/library/PhpGedcom/Parser/SourRef/Even.php +++ b/library/PhpGedcom/Parser/SourRef/Even.php @@ -1,41 +1,32 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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]; - if(isset($record[2])){ - $even = new \PhpGedcom\Record\SourRef\Even(); - $even->setEven(trim($record[2])); - } - else{ - $parser->skipToNextLevel($depth); - return null; + $depth = (int) $record[0]; + if (isset($record[2])) { + $even = new \PhpGedcom\Record\SourRef\Even(); + $even->setEven(trim($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; } $parser->forward(); @@ -43,7 +34,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); $recordType = strtoupper(trim($record[1])); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; if ($currentDepth <= $depth) { $parser->back(); @@ -55,7 +46,7 @@ public static function parse(\PhpGedcom\Parser $parser) $even->setRole(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Subm.php b/library/PhpGedcom/Parser/Subm.php index c19eba04..f9fed35d 100644 --- a/library/PhpGedcom/Parser/Subm.php +++ b/library/PhpGedcom/Parser/Subm.php @@ -1,40 +1,31 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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(); - $depth = (int)$record[0]; - if(isset($record[1])){ - $identifier = $parser->normalizeIdentifier($record[1]); - } - else{ - $parser->skipToNextLevel($depth); - return null; + $depth = (int) $record[0]; + if (isset($record[1])) { + $identifier = $parser->normalizeIdentifier($record[1]); + } else { + $parser->skipToNextLevel($depth); + + return null; } $subm = new \PhpGedcom\Record\Subm(); @@ -46,7 +37,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; $recordType = strtoupper(trim($record[1])); if ($currentDepth <= $depth) { @@ -63,19 +54,19 @@ public static function parse(\PhpGedcom\Parser $parser) $subm->setAddr($addr); break; case 'PHON': - $phone = isset($record[2]) ? trim($record[2]): ''; + $phone = isset($record[2]) ? trim($record[2]) : ''; $subm->addPhon($phone); break; case 'EMAIL': - $email = isset($record[2]) ? trim($record[2]): ''; + $email = isset($record[2]) ? trim($record[2]) : ''; $subm->addEmail($email); break; case 'FAX': - $fax = isset($record[2]) ? trim($record[2]): ''; + $fax = isset($record[2]) ? trim($record[2]) : ''; $subm->addFax($fax); break; case 'WWW': - $www = isset($record[2]) ? trim($record[2]): ''; + $www = isset($record[2]) ? trim($record[2]) : ''; $subm->addWww($www); break; case 'NOTE': @@ -102,7 +93,7 @@ public static function parse(\PhpGedcom\Parser $parser) $subm->addLang(isset($record[2]) ? trim($record[2]) : ''); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Parser/Subn.php b/library/PhpGedcom/Parser/Subn.php index 2b90e9cd..b1234827 100644 --- a/library/PhpGedcom/Parser/Subn.php +++ b/library/PhpGedcom/Parser/Subn.php @@ -1,40 +1,31 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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(); - $depth = (int)$record[0]; - if(isset($record[1])){ - $identifier = $parser->normalizeIdentifier($record[1]); - } - else{ - $parser->skipToNextLevel($depth); - return null; + $depth = (int) $record[0]; + if (isset($record[1])) { + $identifier = $parser->normalizeIdentifier($record[1]); + } else { + $parser->skipToNextLevel($depth); + + return null; } $subn = new \PhpGedcom\Record\Subn(); @@ -46,7 +37,7 @@ public static function parse(\PhpGedcom\Parser $parser) while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); - $currentDepth = (int)$record[0]; + $currentDepth = (int) $record[0]; $recordType = strtoupper(trim($record[1])); if ($currentDepth <= $depth) { @@ -76,7 +67,7 @@ public static function parse(\PhpGedcom\Parser $parser) case 'RIN': $subn->setRin(trim($record[2])); break; - case 'NOTE': + case 'NOTE': $note = \PhpGedcom\Parser\NoteRef::parse($parser); if ($note) { $subn->addNote($note); @@ -87,7 +78,7 @@ public static function parse(\PhpGedcom\Parser $parser) $subn->setChan($chan); break; default: - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); } $parser->forward(); diff --git a/library/PhpGedcom/Record.php b/library/PhpGedcom/Record.php index 139c2830..1a28d803 100644 --- a/library/PhpGedcom/Record.php +++ b/library/PhpGedcom/Record.php @@ -1,38 +1,32 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 (!property_exists($this, '_'.$arr) || !is_array($this->{'_'.$arr})) { + throw new \Exception('Unknown '.get_class($this).'::'.$arr); } if (!is_array($args)) { - throw new \Exception('Incorrect arguments to ' . $method); + throw new \Exception('Incorrect arguments to '.$method); } if (!isset($args[0])) { @@ -44,18 +38,18 @@ public function __call($method, $args) // Type safety? } - $this->{'_' . $arr}[] = $args[0]; + $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 (!property_exists($this, '_'.$arr)) { + throw new \Exception('Unknown '.get_class($this).'::'.$arr); } if (!is_array($args)) { - throw new \Exception('Incorrect arguments to ' . $method); + throw new \Exception('Incorrect arguments to '.$method); } if (!isset($args[0])) { @@ -67,7 +61,7 @@ public function __call($method, $args) // Type safety? } - $this->{'_' . $arr} = $args[0]; + $this->{'_'.$arr} = $args[0]; return $this; } elseif (substr($method, 0, 3) == 'get') { @@ -76,39 +70,38 @@ public function __call($method, $args) // hotfix getData if ('data' == $arr) { if (!property_exists($this, '_text')) { - throw new \Exception('Unknown ' . get_class($this) . '::' . $arr); + throw new \Exception('Unknown '.get_class($this).'::'.$arr); } + return $this->{'_text'}; } - - if (!property_exists($this, '_' . $arr)) { - throw new \Exception('Unknown ' . get_class($this) . '::' . $arr); + + if (!property_exists($this, '_'.$arr)) { + throw new \Exception('Unknown '.get_class($this).'::'.$arr); } - return $this->{'_' . $arr}; + return $this->{'_'.$arr}; } else { - throw new \Exception('Unknown method called: ' . $method); + 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); + 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 + * @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); + return property_exists($this, '_'.$var) || property_exists($this, $var); } } diff --git a/library/PhpGedcom/Record/Addr.php b/library/PhpGedcom/Record/Addr.php index 891168eb..c4ffab3e 100644 --- a/library/PhpGedcom/Record/Addr.php +++ b/library/PhpGedcom/Record/Addr.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,8 +17,7 @@ use PhpGedcom\Record; /** - * Class Addr - * @package PhpGedcom\Record + * Class Addr. */ class Addr extends Record { @@ -59,11 +58,13 @@ class Addr extends Record /** * @param string $addr + * * @return Addr */ public function setAddr($addr = '') { $this->addr = $addr; + return $this; } @@ -77,11 +78,13 @@ public function getAddr() /** * @param string $adr1 + * * @return Addr */ public function setAdr1($adr1 = '') { $this->adr1 = $adr1; + return $this; } @@ -95,11 +98,13 @@ public function getAdr1() /** * @param string $adr2 + * * @return Addr */ public function setAdr2($adr2 = '') { $this->adr2 = $adr2; + return $this; } @@ -113,11 +118,13 @@ public function getAdr2() /** * @param string $city + * * @return Addr */ public function setCity($city = '') { $this->city = $city; + return $this; } @@ -131,11 +138,13 @@ public function getCity() /** * @param string $stae + * * @return Addr */ public function setStae($stae = '') { $this->stae = $stae; + return $this; } @@ -149,11 +158,13 @@ public function getStae() /** * @param string $post + * * @return Addr */ public function setPost($post = '') { $this->post = $post; + return $this; } @@ -167,11 +178,13 @@ public function getPost() /** * @param string $ctry + * * @return Addr */ public function setCtry($ctry = '') { $this->ctry = $ctry; + return $this; } diff --git a/library/PhpGedcom/Record/Caln.php b/library/PhpGedcom/Record/Caln.php index d8669e99..5f60f008 100644 --- a/library/PhpGedcom/Record/Caln.php +++ b/library/PhpGedcom/Record/Caln.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,8 +17,7 @@ use PhpGedcom\Record; /** - * Class Caln - * @package PhpGedcom\Record + * Class Caln. */ class Caln extends Record { @@ -34,11 +33,13 @@ class Caln extends Record /** * @param string $caln + * * @return Caln */ public function setCaln($caln = '') { $this->caln = $caln; + return $this; } @@ -52,11 +53,13 @@ public function getCaln() /** * @param string $medi + * * @return Caln */ public function setMedi($medi = '') { $this->medi = $medi; + return $this; } diff --git a/library/PhpGedcom/Record/Chan.php b/library/PhpGedcom/Record/Chan.php index 705d2bfc..88f0be0d 100644 --- a/library/PhpGedcom/Record/Chan.php +++ b/library/PhpGedcom/Record/Chan.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,8 +17,7 @@ use PhpGedcom\Record; /** - * Class Chan - * @package PhpGedcom\Record + * Class Chan. */ class Chan extends Record { @@ -35,15 +34,17 @@ class Chan extends Record /** * @var array */ - protected $note = array(); + protected $note = []; /** * @param string $date + * * @return Chan */ public function setDate($date = '') { $this->date = $date; + return $this; } @@ -57,11 +58,13 @@ public function getDate() /** * @param Record\NoteRef $note + * * @return Chan */ public function addNote($note = []) { $this->note[] = $note; + return $this; } @@ -75,11 +78,13 @@ public function getNote() /** * @param string $time + * * @return Chan */ public function setTime($time = '') { $this->time = $time; + return $this; } diff --git a/library/PhpGedcom/Record/Data.php b/library/PhpGedcom/Record/Data.php index 9959df1b..92f67b36 100644 --- a/library/PhpGedcom/Record/Data.php +++ b/library/PhpGedcom/Record/Data.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,8 +17,7 @@ use PhpGedcom\Record; /** - * Class Data - * @package PhpGedcom\Record + * Class Data. */ class Data extends Record { @@ -34,11 +33,13 @@ class Data extends Record /** * @param string $text + * * @return Data */ public function setText($text = '') { $this->text = $text; + return $this; } @@ -52,11 +53,13 @@ public function getText() /** * @param string $date + * * @return Data */ public function setDate($date = '') { $this->date = $date; + return $this; } diff --git a/library/PhpGedcom/Record/Date.php b/library/PhpGedcom/Record/Date.php index f54c07c7..7ee5da98 100644 --- a/library/PhpGedcom/Record/Date.php +++ b/library/PhpGedcom/Record/Date.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,109 +17,117 @@ use PhpGedcom\Record; /** - * Class Date - * @package PhpGedcom\Record + * Class Date. */ -class Date extends Record { - /** - * @var string - */ - protected $date = null; +class Date extends Record +{ + /** + * @var string + */ + protected $date = null; - /** - * @var array - */ - private $months = [ - 'JAN' => 1, 'FEB' => 2, 'MAR' => 3, 'APR' => 4, 'MAY' => 5, 'JUN' => 6, - 'JUL' => 7, 'AUG' => 8, 'SEP' => 9, 'OCT' => 10, 'NOV' => 11, 'DEC' => 12, - ]; + /** + * @var array + */ + private $months = [ + 'JAN' => 1, 'FEB' => 2, 'MAR' => 3, 'APR' => 4, 'MAY' => 5, 'JUN' => 6, + 'JUL' => 7, 'AUG' => 8, 'SEP' => 9, 'OCT' => 10, 'NOV' => 11, 'DEC' => 12, + ]; - /** - * @param string $date Date array - * @return Date - */ - public function setDate($date) { - $this->date = $date; + /** + * @param string $date Date array + * + * @return Date + */ + public function setDate($date) + { + $this->date = $date; - return $this; - } + return $this; + } - /** - * @return null|string - */ - public function getDate() { - return $this->date; - } + /** + * @return null|string + */ + public function getDate() + { + return $this->date; + } - /** - * Return month part of date - * - * @return int|null - */ - public function getMonth() { - $record = explode(' ', $this->date); - if (count($record) > 0) { - if ($this->isPrefix($record[0])) { - unset($record[0]); - } - foreach ($record as $part) { - if (isset($this->months[trim($part)])) { - return $this->months[trim($part)]; - } - } - } + /** + * Return month part of date. + * + * @return int|null + */ + public function getMonth() + { + $record = explode(' ', $this->date); + if (count($record) > 0) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + foreach ($record as $part) { + if (isset($this->months[trim($part)])) { + return $this->months[trim($part)]; + } + } + } - return null; - } + return null; + } - /** - * Return year part of date - * - * @return int|null - */ - public function getYear() { - $record = explode(' ', $this->date); - if (count($record) > 0) { - if ($this->isPrefix($record[0])) { - unset($record[0]); - } - if (count($record) > 0) { - return (int) end($record); - } - } + /** + * Return year part of date. + * + * @return int|null + */ + public function getYear() + { + $record = explode(' ', $this->date); + if (count($record) > 0) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + if (count($record) > 0) { + return (int) end($record); + } + } - return null; - } + return null; + } - /** - * Return day part of date - * - * @return int|null - */ - public function getDay() { - $record = explode(' ', $this->date); - if (!empty($record[0])) { - if ($this->isPrefix($record[0])) { - unset($record[0]); - } - if (count($record) > 0) { - $day = (int) reset($record); - if ($day >= 1 && $day <= 31) { - return $day; - } - } - } + /** + * Return day part of date. + * + * @return int|null + */ + public function getDay() + { + $record = explode(' ', $this->date); + if (!empty($record[0])) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + if (count($record) > 0) { + $day = (int) reset($record); + if ($day >= 1 && $day <= 31) { + return $day; + } + } + } - return null; - } + return null; + } - /** - * Check if the first part is a prefix (eg 'BEF', 'ABT',). - * - * @param string $datePart Date part to be checked - * @return bool - */ - private function isPrefix($datePart) { - return in_array($datePart, ['FROM', 'TO', 'BEF', 'AFT', 'BET', 'AND', 'ABT', 'EST', 'CAL', 'INT']); - } -} \ No newline at end of file + /** + * Check if the first part is a prefix (eg 'BEF', 'ABT',). + * + * @param string $datePart Date part to be checked + * + * @return bool + */ + private function isPrefix($datePart) + { + return in_array($datePart, ['FROM', 'TO', 'BEF', 'AFT', 'BET', 'AND', 'ABT', 'EST', 'CAL', 'INT']); + } +} diff --git a/library/PhpGedcom/Record/Fam.php b/library/PhpGedcom/Record/Fam.php index 5676b723..df6d07cd 100644 --- a/library/PhpGedcom/Record/Fam.php +++ b/library/PhpGedcom/Record/Fam.php @@ -1,152 +1,96 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record; -/** - * - * - */ -class Fam extends \PhpGedcom\Record implements Noteable, Sourceable, Objectable { - /** - * - */ - protected $_id = null; - - /** - * - */ - protected $_resn = null; - - /** - * - */ - protected $_even = array(); - - - /** - * - */ - protected $_husb = null; - - /** - * - */ - protected $_wife = null; - - /** - * - */ - protected $_chil = array(); - /** - * - */ - protected $_nchi = null; - /** - * - */ - protected $_subm = array(); - - /** - * - */ - protected $_slgs = array(); - - /** - * - */ - protected $_refn = array(); - - /** - * - */ - protected $_rin = null; - /** - * - */ - protected $_chan = null; - - /** - * - */ - protected $_note = array(); - - /** - * - */ - protected $_sour = array(); - - /** - * - */ - protected $_obje = array(); - - /** - * - */ - public function addEven($even) { - $this->_even[$even->getType()] = $even; - } - - /** - * @return array - */ - public function getAllEven() { - return $this->_even; - } - /** - * @return void|\PhpGedcom\Record\Fam\Even - */ - public function getEven($key = '') { - if (isset($this->_even[strtoupper($key)])) { - return $this->_even[strtoupper($key)]; - } - - } - /** - * - */ - public function addSlgs($slgs = []) { - $this->_slgs[] = $slgs; - } - - /** - * - * - */ - public function addRefn($refn = []) { - $this->_refn[] = $refn; - } - - /** - * - */ - public function addNote($note = []) { - $this->_note[] = $note; - } - - /** - * - */ - public function addSour($sour = []) { - $this->_sour[] = $sour; - } - - /** - * - */ - public function addObje($obje = []) { - $this->_obje[] = $obje; - } +class Fam extends \PhpGedcom\Record implements Noteable, Sourceable, Objectable +{ + protected $_id = null; + + protected $_resn = null; + + protected $_even = []; + + protected $_husb = null; + + protected $_wife = null; + + protected $_chil = []; + + protected $_nchi = null; + + protected $_subm = []; + + protected $_slgs = []; + + protected $_refn = []; + + protected $_rin = null; + + protected $_chan = null; + + protected $_note = []; + + protected $_sour = []; + + protected $_obje = []; + + public function addEven($even) + { + $this->_even[$even->getType()] = $even; + } + + /** + * @return array + */ + public function getAllEven() + { + return $this->_even; + } + + /** + * @return void|\PhpGedcom\Record\Fam\Even + */ + public function getEven($key = '') + { + if (isset($this->_even[strtoupper($key)])) { + return $this->_even[strtoupper($key)]; + } + } + + public function addSlgs($slgs = []) + { + $this->_slgs[] = $slgs; + } + + public function addRefn($refn = []) + { + $this->_refn[] = $refn; + } + + public function addNote($note = []) + { + $this->_note[] = $note; + } + + public function addSour($sour = []) + { + $this->_sour[] = $sour; + } + + public function addObje($obje = []) + { + $this->_obje[] = $obje; + } } diff --git a/library/PhpGedcom/Record/Fam/Anul.php b/library/PhpGedcom/Record/Fam/Anul.php index 63fc24ca..323930d0 100644 --- a/library/PhpGedcom/Record/Fam/Anul.php +++ b/library/PhpGedcom/Record/Fam/Anul.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 16968d84..b1a2be54 100644 --- a/library/PhpGedcom/Record/Fam/Cens.php +++ b/library/PhpGedcom/Record/Fam/Cens.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 33dfb41e..1b9050d1 100644 --- a/library/PhpGedcom/Record/Fam/Div.php +++ b/library/PhpGedcom/Record/Fam/Div.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index a3e444cf..e8659e8e 100644 --- a/library/PhpGedcom/Record/Fam/Enga.php +++ b/library/PhpGedcom/Record/Fam/Enga.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 233568ee..9e9d3c5f 100644 --- a/library/PhpGedcom/Record/Fam/Even.php +++ b/library/PhpGedcom/Record/Fam/Even.php @@ -1,87 +1,70 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Fam; -use \PhpGedcom\Record\Noteable; -use \PhpGedcom\Record\Objectable; -use \PhpGedcom\Record\Sourceable; +use PhpGedcom\Record\Noteable; +use PhpGedcom\Record\Objectable; +use PhpGedcom\Record\Sourceable; /** - * * Event record. * - * @method mixed getType() + * @method mixed getType() * @method \PhpGedcom\Record\Date getDate() - * @method string getPlac() + * @method string getPlac() */ -class Even extends \PhpGedcom\Record implements Objectable, Sourceable, Noteable { - protected $_type = null; - protected $_date = null; - protected $_plac = null; - protected $_caus = null; - protected $_age = null; +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 $_addr = null; - protected $_phon = array(); + protected $_phon = []; - protected $_agnc = null; + protected $_agnc = null; - protected $_husb = null; - protected $_wife = null; + protected $_husb = null; + protected $_wife = null; - /** - * - */ - protected $_obje = array(); + protected $_obje = []; - /** - * - */ - protected $_sour = array(); + protected $_sour = []; - /** - * - */ - protected $_note = array(); + protected $_note = []; - /** - * - */ - public function addPhon($phon = []) { - $this->_phon[] = $phon; - } + public function addPhon($phon = []) + { + $this->_phon[] = $phon; + } - /** - * - */ - public function addObje($obje = []) { - $this->_obje[] = $obje; - } + public function addObje($obje = []) + { + $this->_obje[] = $obje; + } - /** - * - */ - public function addSour($sour = []) { - $this->_sour[] = $sour; - } + public function addSour($sour = []) + { + $this->_sour[] = $sour; + } - /** - * - */ - public function addNote($note = []) { - $this->_note[] = $note; - } + public function addNote($note = []) + { + $this->_note[] = $note; + } } diff --git a/library/PhpGedcom/Record/Fam/Even/Husb.php b/library/PhpGedcom/Record/Fam/Even/Husb.php index 52b55724..53ed7afa 100644 --- a/library/PhpGedcom/Record/Fam/Even/Husb.php +++ b/library/PhpGedcom/Record/Fam/Even/Husb.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index cabbf872..d0c97d3d 100644 --- a/library/PhpGedcom/Record/Fam/Even/Wife.php +++ b/library/PhpGedcom/Record/Fam/Even/Wife.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 55efca28..cf31a8ca 100644 --- a/library/PhpGedcom/Record/Fam/Marb.php +++ b/library/PhpGedcom/Record/Fam/Marb.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 77019908..ba6f178a 100644 --- a/library/PhpGedcom/Record/Fam/Marc.php +++ b/library/PhpGedcom/Record/Fam/Marc.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 7fcd714e..6e2bc342 100644 --- a/library/PhpGedcom/Record/Fam/Marl.php +++ b/library/PhpGedcom/Record/Fam/Marl.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index fd6e3584..0bfaa559 100644 --- a/library/PhpGedcom/Record/Fam/Marr.php +++ b/library/PhpGedcom/Record/Fam/Marr.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 7bc12f04..7a8359d9 100644 --- a/library/PhpGedcom/Record/Fam/Mars.php +++ b/library/PhpGedcom/Record/Fam/Mars.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 4584fdda..89da9353 100644 --- a/library/PhpGedcom/Record/Fam/Slgs.php +++ b/library/PhpGedcom/Record/Fam/Slgs.php @@ -1,25 +1,22 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Fam; -use \PhpGedcom\Record\Sourceable; -use \PhpGedcom\Record\Noteable; +use PhpGedcom\Record\Noteable; +use PhpGedcom\Record\Sourceable; -/** - * - */ class Slgs extends \PhpGedcom\Record implements Sourceable, Noteable { protected $_stat; @@ -27,27 +24,15 @@ class Slgs extends \PhpGedcom\Record implements Sourceable, Noteable protected $_plac; protected $_temp; - /** - * - */ - protected $_sour = array(); + protected $_sour = []; - /** - * - */ - protected $_note = array(); + protected $_note = []; - /** - * - */ public function addSour($sour = []) { $this->_sour[] = $sour; } - /** - * - */ public function addNote($note = []) { $this->_note[] = $note; diff --git a/library/PhpGedcom/Record/Fam/Slgs/Stat.php b/library/PhpGedcom/Record/Fam/Slgs/Stat.php index ca2f59b6..0db8baa4 100644 --- a/library/PhpGedcom/Record/Fam/Slgs/Stat.php +++ b/library/PhpGedcom/Record/Fam/Slgs/Stat.php @@ -1,32 +1,29 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -83,11 +83,13 @@ class Head extends Record /** * @param \PhpGedcom\Record\Head\Sour $sour + * * @return Head */ public function setSour($sour = []) { $this->sour = $sour; + return $this; } @@ -101,11 +103,13 @@ public function getSour() /** * @param \PhpGedcom\Record\Head\Date $date + * * @return Head */ public function setDate($date = []) { $this->date = $date; + return $this; } @@ -119,11 +123,13 @@ public function getDate() /** * @param \PhpGedcom\Record\Head\Gedc $gedc + * * @return Head */ public function setGedc($gedc = []) { $this->gedc = $gedc; + return $this; } @@ -137,11 +143,13 @@ public function getGedc() /** * @param \PhpGedcom\Record\Head\Char $char + * * @return Head */ public function setChar($char = []) { $this->char = $char; + return $this; } @@ -155,11 +163,13 @@ public function getChar() /** * @param \PhpGedcom\Record\Head\Plac $plac + * * @return Head */ public function setPlac($plac = []) { $this->plac = $plac; + return $this; } @@ -173,11 +183,13 @@ public function getPlac() /** * @param string $subm + * * @return Head */ public function setSubm($subm = '') { $this->subm = $subm; + return $this; } @@ -191,11 +203,13 @@ public function getSubm() /** * @param string $subn + * * @return Head */ public function setSubn($subn = '') { $this->subn = $subn; + return $this; } @@ -209,11 +223,13 @@ public function getSubn() /** * @param string $lang + * * @return Head */ public function setLang($lang = '') { $this->lang = $lang; + return $this; } @@ -227,11 +243,13 @@ public function getLang() /** * @param string $file + * * @return Head */ public function setFile($file = '') { $this->file = $file; + return $this; } @@ -245,11 +263,13 @@ public function getFile() /** * @param string $dest + * * @return Head */ public function setDest($dest = '') { $this->dest = $dest; + return $this; } @@ -263,11 +283,13 @@ public function getDest() /** * @param string $copr + * * @return Head */ public function setCopr($copr = '') { $this->copr = $copr; + return $this; } @@ -281,11 +303,13 @@ public function getCopr() /** * @param string $note + * * @return Head */ public function setNote($note = '') { $this->note = $note; + return $this; } diff --git a/library/PhpGedcom/Record/Head/Char.php b/library/PhpGedcom/Record/Head/Char.php index ab28ce0e..4e7e44cc 100644 --- a/library/PhpGedcom/Record/Head/Char.php +++ b/library/PhpGedcom/Record/Head/Char.php @@ -1,21 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ + namespace PhpGedcom\Record\Head; -/** - * - */ class Char extends \PhpGedcom\Record { protected $_char = null; diff --git a/library/PhpGedcom/Record/Head/Date.php b/library/PhpGedcom/Record/Head/Date.php index 7e364887..ca4570e4 100644 --- a/library/PhpGedcom/Record/Head/Date.php +++ b/library/PhpGedcom/Record/Head/Date.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Head; -/** - * - */ class Date extends \PhpGedcom\Record { protected $_date = null; diff --git a/library/PhpGedcom/Record/Head/Gedc.php b/library/PhpGedcom/Record/Head/Gedc.php index 4924437c..a696326c 100644 --- a/library/PhpGedcom/Record/Head/Gedc.php +++ b/library/PhpGedcom/Record/Head/Gedc.php @@ -1,62 +1,54 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Head; -/** - * - */ -class Gedc extends \PhpGedcom\Record { - /** - * - */ - protected $_vers = null; +class Gedc extends \PhpGedcom\Record +{ + protected $_vers = null; - /** - * - */ - protected $_form = null; + protected $_form = null; - /** - * - * @return Gedc/version - */ - public function getVersion() { - return $this->_vers; - } + /** + * @return Gedc/version + */ + public function getVersion() + { + return $this->_vers; + } - /** - * - * @param Gedc/version - */ - public function setVersion($vers = []) { - $this->_vers = $vers; - } + /** + * @param Gedc/version + */ + public function setVersion($vers = []) + { + $this->_vers = $vers; + } - /** - * - * @return Gedc/form - */ - public function getForm() { - return $this->_form; - } + /** + * @return Gedc/form + */ + public function getForm() + { + return $this->_form; + } - /** - * - * @param Gedc/version - */ - public function setForm($form = []) { - $this->_form = $form; - } + /** + * @param Gedc/version + */ + public function setForm($form = []) + { + $this->_form = $form; + } } diff --git a/library/PhpGedcom/Record/Head/Plac.php b/library/PhpGedcom/Record/Head/Plac.php index 706fe24c..e2b28f92 100644 --- a/library/PhpGedcom/Record/Head/Plac.php +++ b/library/PhpGedcom/Record/Head/Plac.php @@ -1,26 +1,20 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 09949a46..8c0dc638 100644 --- a/library/PhpGedcom/Record/Head/Sour.php +++ b/library/PhpGedcom/Record/Head/Sour.php @@ -1,110 +1,92 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Head; -/** - * - */ -class Sour extends \PhpGedcom\Record { - /** - * - */ - protected $_sour = null; - - /** - * - */ - protected $_vers = null; +class Sour extends \PhpGedcom\Record +{ + protected $_sour = null; - /** - * - */ - protected $_name = null; + protected $_vers = null; - /** - * - */ - protected $_corp = null; + protected $_name = null; - /** - * - */ - protected $_data = null; + protected $_corp = null; - /** - * - * @param Sour\Corp $corp - */ - public function setCorp($corp = []) { - $this->_corp = $corp; - } + protected $_data = null; - /** - * - * @return Sour\Corp - */ - public function getCorp() { - return $this->_corp; - } + /** + * @param Sour\Corp $corp + */ + public function setCorp($corp = []) + { + $this->_corp = $corp; + } - /** - * - * @param \PhpGedcom\Record\Head\Sour\Data $data - */ - public function setData($data = []) { - $this->_data = $data; - } + /** + * @return Sour\Corp + */ + public function getCorp() + { + return $this->_corp; + } - /** - * - * @return \PhpGedcom\Record\Head\Sour\Data - */ - public function getData() { - return $this->_data; - } + /** + * @param \PhpGedcom\Record\Head\Sour\Data $data + */ + public function setData($data = []) + { + $this->_data = $data; + } - /** - * - * @return Sour\Name - */ - public function getName() { - return $this->_name; - } + /** + * @return \PhpGedcom\Record\Head\Sour\Data + */ + public function getData() + { + return $this->_data; + } - /** - * - * @param Sour\Name - */ - public function setName($name = []) { - $this->_name = $name; - } + /** + * @return Sour\Name + */ + public function getName() + { + return $this->_name; + } - /** - * - * @return Sour\Version - */ - public function getVersion() { - return $this->_vers; - } + /** + * @param Sour\Name + */ + public function setName($name = []) + { + $this->_name = $name; + } - /** - * - * @param Sour\Version - */ - public function setVersion($version = []) { - $this->_vers = $version; - } + /** + * @return Sour\Version + */ + public function getVersion() + { + return $this->_vers; + } + /** + * @param Sour\Version + */ + public function setVersion($version = []) + { + $this->_vers = $version; + } } diff --git a/library/PhpGedcom/Record/Head/Sour/Corp.php b/library/PhpGedcom/Record/Head/Sour/Corp.php index 40ed2205..3011112b 100644 --- a/library/PhpGedcom/Record/Head/Sour/Corp.php +++ b/library/PhpGedcom/Record/Head/Sour/Corp.php @@ -1,33 +1,26 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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(); + protected $_phon = []; - /** - * - * - */ 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 index e31fb0dd..7ab7e0ea 100644 --- a/library/PhpGedcom/Record/Head/Sour/Data.php +++ b/library/PhpGedcom/Record/Head/Sour/Data.php @@ -1,21 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ + namespace PhpGedcom\Record\Head\Sour; -/** - * - */ class Data extends \PhpGedcom\Record { protected $_data = null; diff --git a/library/PhpGedcom/Record/Indi.php b/library/PhpGedcom/Record/Indi.php index fe7b9d15..23d6e41b 100644 --- a/library/PhpGedcom/Record/Indi.php +++ b/library/PhpGedcom/Record/Indi.php @@ -1,626 +1,741 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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. */ -class Indi extends Record implements Noteable, Objectable, Sourceable { - /** - * @var string - */ - protected $id; - - /** - * @var string - */ - protected $uid; - - /** - * @var string - */ - protected $resn; - /** - * @var Indi\Name[] - */ - protected $name = array(); - /** - * @var string - */ - protected $sex; - - /** - * @var Indi\Even[] - */ - protected $even = array(); - /** - * @var Indi\Attr[] - */ - protected $attr = array(); - /** - * @var Indi\Bapl - */ - protected $bapl = array(); - - /** - * @var Indi\Conl - */ - protected $conl = array(); - - /** - * @var Indi\Endl - */ - protected $endl = array(); - - /** - * @var Indi\Slgc - */ - protected $slgc = array(); - - /** - * @var Indi\Famc[] - */ - protected $famc = array(); - /** - * @var Indi\Fams[] - */ - protected $fams = array(); - /** - * @var string[] - */ - protected $subm = array(); - /** - * @var string[] - */ - protected $alia = array(); - /** - * @var string[] - */ - protected $anci = array(); - /** - * @var string[] - */ - protected $desi = array(); - /** - * @var string - */ - protected $rfn; - /** - * @var string - */ - protected $afn; - /** - * @var Refn[] - */ - protected $refn = array(); - /** - * @var string - */ - protected $rin; - - /** - * @var string - */ - protected $chan; - - - /** - * @var Indi\Note[] - */ - protected $note = array(); - - /** - * @var Obje[] - */ - protected $obje = array(); - - /** - * @var Sour[] - */ - protected $sour = array(); - - - /** - * @var Indi\Asso[] - */ - protected $asso = array(); - - - - /** - * @param string $id - * @return Indi - */ - public function setId($id = '') { - $this->id = $id; - return $this; - } - - /** - * @return string - */ - public function getId() { - return $this->id; - } - - /** - * @param string $uid - * @return Indi - */ - public function setUid($uid = '') { - $this->uid = $uid; - return $this; - } - - /** - * @return string - */ - public function getUid() { - return $this->uid; - } - - /** - * @param Indi\Name $name - * @return Indi - */ - public function addName($name = []) { - $this->name[] = $name; - return $this; - } - - /** - * @return Indi\Name[] - */ - public function getName() { - return $this->name; - } - - /** - * @param Indi\Attr $attr - * @return Indi - */ - public function addAttr($attr = []) { - $attrName = $attr->getType(); - - if (!array_key_exists($attrName, $this->attr)) { - $this->attr[$attrName] = []; - } - - $this->attr[$attrName][] = $attr; - return $this; - } - - /** - * @return Indi\Attr[] - */ - public function getAllAttr() { - return $this->attr; - } - /** - * @return Indi\Attr[] - */ - public function getAttr($key = '') { - if (isset($this->attr[strtoupper($key)])) { - return $this->attr[strtoupper($key)]; - } - - } - /** - * @param Indi\Even $even - * @return Indi - */ - public function addEven($even = []) { - $evenName = $even->getType(); - - if (!array_key_exists($evenName, $this->even)) { - $this->even[$evenName] = []; - } - - $this->even[$evenName][] = $even; - return $this; - } - - /** - * @return array - */ - public function getAllEven() { - return $this->even; - } - - /** - * @return array - */ - public function getEven($key = '') { - if (isset($this->even[strtoupper($key)])) { - return $this->even[strtoupper($key)]; - } - - } - - /** - * @param Indi\Asso $asso - * @return Indi - */ - public function addAsso($asso = []) { - $this->asso[] = $asso; - return $this; - } - - /** - * @return array - */ - public function getAsso() { - return $this->asso; - } - - /** - * @param Refn $ref - * @return Indi - */ - public function addRefn($ref = []) { - $this->refn[] = $ref; - return $this; - } - - /** - * @return Refn[] - */ - public function getRefn() { - return $this->refn; - } - - /** - * @param \PhpGedcom\Record\NoteRef $note - * @return Indi - */ - public function addNote($note = []) { - $this->note[] = $note; - return $this; - } - - /** - * @return array - */ - public function getNote() { - return $this->note; - } - - /** - * @param ObjeRef $obje - * @return Indi - */ - public function addObje($obje = []) { - $this->obje[] = $obje; - return $this; - } - - /** - * @return array - */ - public function getObje() { - return $this->obje; - } - - /** - * @param SourRef $sour - * @return Indi - */ - public function addSour($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($famc = []) { - $this->famc[] = $famc; - return $this; - } - - /** - * @return array - */ - public function getFamc() { - return $this->famc; - } - - /** - * @param Indi\Fams $fams - * @return Indi - */ - public function addFams($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 string[] - */ - public function getAnci() { - return $this->anci; - } - - /** - * @param string $subm - * @return Indi - */ - public function addDesi($subm = '') { - $this->desi[] = $subm; - return $this; - } - - /** - * @return string[] - */ - public function getDesi() { - return $this->desi; - } - - /** - * @param string $subm - * @return Indi - */ - public function addSubm($subm = '') { - $this->subm[] = $subm; - return $this; - } - - /** - * @return string[] - */ - 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 = null) { - $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($bapl = []) { - $this->bapl = $bapl; - return $this; - } - /** - * @param Indi\Bapl $bapl - * @return Indi - */ - public function addBapl($bapl = null) { - $this->bapl[] = $bapl; - return $this; - } - /** - * @return Indi\Bapl - */ - public function getBapl() { - return $this->bapl; - } - - /** - * @param Indi\Conl $conl - * @return Indi - */ - public function setConl($conl = []) { - $this->conl = $conl; - return $this; - } - /** - * @param Indi\Conl $conl - * @return Indi - */ - public function addConl($conl) { - $this->conl[] = $conl; - return $this; - } - - /** - * @return Indi\Conl - */ - public function getConl() { - return $this->conl; - } - - /** - * @param Indi\Endl $endl - * @return Indi - */ - public function setEndl($endl = []) { - $this->endl = $endl; - return $this; - } - /** - * @param Indi\Endl $endl - * @return Indi - */ - public function addEndl($endl) { - $this->endl[] = $endl; - return $this; - } - - /** - * @return Indi\Endl - */ - public function getEndl() { - return $this->endl; - } - - /** - * @param Indi\Slgc $slgc - * @return Indi - */ - public function setSlgc($slgc = []) { - $this->slgc = $slgc; - return $this; - } - - /** - * @param Indi\Slgc $slgc - * @return Indi - */ - public function addSlgc($slgc) { - $this->slgc[] = $slgc; - return $this; - } - - /** - * @return Indi\Slgc - */ - public function getSlgc() { - return $this->slgc; - } +class Indi extends Record implements Noteable, Objectable, Sourceable +{ + /** + * @var string + */ + protected $id; + + /** + * @var string + */ + protected $uid; + + /** + * @var string + */ + protected $resn; + /** + * @var Indi\Name[] + */ + protected $name = []; + /** + * @var string + */ + protected $sex; + + /** + * @var Indi\Even[] + */ + protected $even = []; + /** + * @var Indi\Attr[] + */ + protected $attr = []; + /** + * @var Indi\Bapl + */ + protected $bapl = []; + + /** + * @var Indi\Conl + */ + protected $conl = []; + + /** + * @var Indi\Endl + */ + protected $endl = []; + + /** + * @var Indi\Slgc + */ + protected $slgc = []; + + /** + * @var Indi\Famc[] + */ + protected $famc = []; + /** + * @var Indi\Fams[] + */ + protected $fams = []; + /** + * @var string[] + */ + protected $subm = []; + /** + * @var string[] + */ + protected $alia = []; + /** + * @var string[] + */ + protected $anci = []; + /** + * @var string[] + */ + protected $desi = []; + /** + * @var string + */ + protected $rfn; + /** + * @var string + */ + protected $afn; + /** + * @var Refn[] + */ + protected $refn = []; + /** + * @var string + */ + protected $rin; + + /** + * @var string + */ + protected $chan; + + /** + * @var Indi\Note[] + */ + protected $note = []; + + /** + * @var Obje[] + */ + protected $obje = []; + + /** + * @var Sour[] + */ + protected $sour = []; + + /** + * @var Indi\Asso[] + */ + protected $asso = []; + + /** + * @param string $id + * + * @return Indi + */ + public function setId($id = '') + { + $this->id = $id; + + return $this; + } + + /** + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * @param string $uid + * + * @return Indi + */ + public function setUid($uid = '') + { + $this->uid = $uid; + + return $this; + } + + /** + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * @param Indi\Name $name + * + * @return Indi + */ + public function addName($name = []) + { + $this->name[] = $name; + + return $this; + } + + /** + * @return Indi\Name[] + */ + public function getName() + { + return $this->name; + } + + /** + * @param Indi\Attr $attr + * + * @return Indi + */ + public function addAttr($attr = []) + { + $attrName = $attr->getType(); + + if (!array_key_exists($attrName, $this->attr)) { + $this->attr[$attrName] = []; + } + + $this->attr[$attrName][] = $attr; + + return $this; + } + + /** + * @return Indi\Attr[] + */ + public function getAllAttr() + { + return $this->attr; + } + + /** + * @return Indi\Attr[] + */ + public function getAttr($key = '') + { + if (isset($this->attr[strtoupper($key)])) { + return $this->attr[strtoupper($key)]; + } + } + + /** + * @param Indi\Even $even + * + * @return Indi + */ + public function addEven($even = []) + { + $evenName = $even->getType(); + + if (!array_key_exists($evenName, $this->even)) { + $this->even[$evenName] = []; + } + + $this->even[$evenName][] = $even; + + return $this; + } + + /** + * @return array + */ + public function getAllEven() + { + return $this->even; + } + + /** + * @return array + */ + public function getEven($key = '') + { + if (isset($this->even[strtoupper($key)])) { + return $this->even[strtoupper($key)]; + } + } + + /** + * @param Indi\Asso $asso + * + * @return Indi + */ + public function addAsso($asso = []) + { + $this->asso[] = $asso; + + return $this; + } + + /** + * @return array + */ + public function getAsso() + { + return $this->asso; + } + + /** + * @param Refn $ref + * + * @return Indi + */ + public function addRefn($ref = []) + { + $this->refn[] = $ref; + + return $this; + } + + /** + * @return Refn[] + */ + public function getRefn() + { + return $this->refn; + } + + /** + * @param \PhpGedcom\Record\NoteRef $note + * + * @return Indi + */ + public function addNote($note = []) + { + $this->note[] = $note; + + return $this; + } + + /** + * @return array + */ + public function getNote() + { + return $this->note; + } + + /** + * @param ObjeRef $obje + * + * @return Indi + */ + public function addObje($obje = []) + { + $this->obje[] = $obje; + + return $this; + } + + /** + * @return array + */ + public function getObje() + { + return $this->obje; + } + + /** + * @param SourRef $sour + * + * @return Indi + */ + public function addSour($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($famc = []) + { + $this->famc[] = $famc; + + return $this; + } + + /** + * @return array + */ + public function getFamc() + { + return $this->famc; + } + + /** + * @param Indi\Fams $fams + * + * @return Indi + */ + public function addFams($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 string[] + */ + public function getAnci() + { + return $this->anci; + } + + /** + * @param string $subm + * + * @return Indi + */ + public function addDesi($subm = '') + { + $this->desi[] = $subm; + + return $this; + } + + /** + * @return string[] + */ + public function getDesi() + { + return $this->desi; + } + + /** + * @param string $subm + * + * @return Indi + */ + public function addSubm($subm = '') + { + $this->subm[] = $subm; + + return $this; + } + + /** + * @return string[] + */ + 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 = null) + { + $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($bapl = []) + { + $this->bapl = $bapl; + + return $this; + } + + /** + * @param Indi\Bapl $bapl + * + * @return Indi + */ + public function addBapl($bapl = null) + { + $this->bapl[] = $bapl; + + return $this; + } + + /** + * @return Indi\Bapl + */ + public function getBapl() + { + return $this->bapl; + } + + /** + * @param Indi\Conl $conl + * + * @return Indi + */ + public function setConl($conl = []) + { + $this->conl = $conl; + + return $this; + } + + /** + * @param Indi\Conl $conl + * + * @return Indi + */ + public function addConl($conl) + { + $this->conl[] = $conl; + + return $this; + } + + /** + * @return Indi\Conl + */ + public function getConl() + { + return $this->conl; + } + + /** + * @param Indi\Endl $endl + * + * @return Indi + */ + public function setEndl($endl = []) + { + $this->endl = $endl; + + return $this; + } + + /** + * @param Indi\Endl $endl + * + * @return Indi + */ + public function addEndl($endl) + { + $this->endl[] = $endl; + + return $this; + } + + /** + * @return Indi\Endl + */ + public function getEndl() + { + return $this->endl; + } + + /** + * @param Indi\Slgc $slgc + * + * @return Indi + */ + public function setSlgc($slgc = []) + { + $this->slgc = $slgc; + + return $this; + } + + /** + * @param Indi\Slgc $slgc + * + * @return Indi + */ + public function addSlgc($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 index 2fa3f7f1..7fa2d5d6 100644 --- a/library/PhpGedcom/Record/Indi/Adop.php +++ b/library/PhpGedcom/Record/Indi/Adop.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Indi; -/** - * - */ class Adop extends \PhpGedcom\Record\Indi\Even { protected $_adop = null; diff --git a/library/PhpGedcom/Record/Indi/Asso.php b/library/PhpGedcom/Record/Indi/Asso.php index ea73c427..4e341ee8 100644 --- a/library/PhpGedcom/Record/Indi/Asso.php +++ b/library/PhpGedcom/Record/Indi/Asso.php @@ -1,51 +1,36 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Indi; -use \PhpGedcom\Record\Sourceable; -use \PhpGedcom\Record\Noteable; +use PhpGedcom\Record\Noteable; +use PhpGedcom\Record\Sourceable; -/** - * - */ class Asso extends \PhpGedcom\Record implements Sourceable, Noteable { protected $_indi = null; protected $_rela = null; - /** - * - */ - protected $_note = array(); + protected $_note = []; - /** - * - */ - protected $_sour = array(); + protected $_sour = []; - /** - * - */ public function addNote($note = []) { $this->_note[] = $note; } - /** - * - */ public function addSour($sour = []) { $this->_sour[] = $sour; diff --git a/library/PhpGedcom/Record/Indi/Attr.php b/library/PhpGedcom/Record/Indi/Attr.php index fa6d2454..f7d18c7c 100644 --- a/library/PhpGedcom/Record/Indi/Attr.php +++ b/library/PhpGedcom/Record/Indi/Attr.php @@ -1,65 +1,44 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Indi; -use \PhpGedcom\Record\Sourceable; -use \PhpGedcom\Record\Noteable; -use \PhpGedcom\Record\Objectable; +use PhpGedcom\Record\Noteable; +use PhpGedcom\Record\Objectable; +use PhpGedcom\Record\Sourceable; -/** - * - */ class Attr extends \PhpGedcom\Record\Indi\Even implements Sourceable, Noteable, Objectable { protected $type = null; protected $_attr = null; - /** - * - */ - protected $sour = array(); + protected $sour = []; - /** - * - */ - protected $note = array(); + protected $note = []; - /** - * - */ - protected $obje = array(); + protected $obje = []; - /** - * - */ public function addSour($sour = []) { $this->sour[] = $sour; } - /** - * - */ public function addNote($note = []) { $this->note[] = $note; } - /** - * - */ public function addObje($obje = []) { $this->obje[] = $obje; diff --git a/library/PhpGedcom/Record/Indi/Bapl.php b/library/PhpGedcom/Record/Indi/Bapl.php index 73e8cb8e..cb0421de 100644 --- a/library/PhpGedcom/Record/Indi/Bapl.php +++ b/library/PhpGedcom/Record/Indi/Bapl.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 2c5c9b55..3c9bc0e9 100644 --- a/library/PhpGedcom/Record/Indi/Bapm.php +++ b/library/PhpGedcom/Record/Indi/Bapm.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 8230308b..ba0ff3d7 100644 --- a/library/PhpGedcom/Record/Indi/Barm.php +++ b/library/PhpGedcom/Record/Indi/Barm.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index ae5013aa..0d89e7ac 100644 --- a/library/PhpGedcom/Record/Indi/Basm.php +++ b/library/PhpGedcom/Record/Indi/Basm.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index f5d39066..287f7f50 100644 --- a/library/PhpGedcom/Record/Indi/Birt.php +++ b/library/PhpGedcom/Record/Indi/Birt.php @@ -1,24 +1,21 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Indi; -use PhpGedcom\Record\Indi\Even; - /** - * Class Birt - * @package PhpGedcom\Record\Indi + * Class Birt. */ class Birt extends Even { @@ -29,11 +26,13 @@ class Birt extends Even /** * @param string $famc + * * @return Birt */ public function setFamc($famc = '') { $this->famc = $famc; + return $this; } diff --git a/library/PhpGedcom/Record/Indi/Bles.php b/library/PhpGedcom/Record/Indi/Bles.php index 8c5f0d8d..8ff5c10c 100644 --- a/library/PhpGedcom/Record/Indi/Bles.php +++ b/library/PhpGedcom/Record/Indi/Bles.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 2e5cd27a..ace72a8e 100644 --- a/library/PhpGedcom/Record/Indi/Buri.php +++ b/library/PhpGedcom/Record/Indi/Buri.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index acba5e6d..6231be9b 100644 --- a/library/PhpGedcom/Record/Indi/Cast.php +++ b/library/PhpGedcom/Record/Indi/Cast.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index a06cf277..de8c8d27 100644 --- a/library/PhpGedcom/Record/Indi/Cens.php +++ b/library/PhpGedcom/Record/Indi/Cens.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index e5479f16..f272eb0d 100644 --- a/library/PhpGedcom/Record/Indi/Chr.php +++ b/library/PhpGedcom/Record/Indi/Chr.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 6a788358..1e0f0258 100644 --- a/library/PhpGedcom/Record/Indi/Chra.php +++ b/library/PhpGedcom/Record/Indi/Chra.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index c31f125c..e351e043 100644 --- a/library/PhpGedcom/Record/Indi/Conf.php +++ b/library/PhpGedcom/Record/Indi/Conf.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 6810fac4..82b28119 100644 --- a/library/PhpGedcom/Record/Indi/Conl.php +++ b/library/PhpGedcom/Record/Indi/Conl.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index ab39dc11..34260e01 100644 --- a/library/PhpGedcom/Record/Indi/Crem.php +++ b/library/PhpGedcom/Record/Indi/Crem.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index f7c5de4e..64e5b713 100644 --- a/library/PhpGedcom/Record/Indi/Deat.php +++ b/library/PhpGedcom/Record/Indi/Deat.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 7d9bf2d7..5cdad437 100644 --- a/library/PhpGedcom/Record/Indi/Dscr.php +++ b/library/PhpGedcom/Record/Indi/Dscr.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index b28dc5be..15a943d9 100644 --- a/library/PhpGedcom/Record/Indi/Educ.php +++ b/library/PhpGedcom/Record/Indi/Educ.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index c1ebca48..0472bfc0 100644 --- a/library/PhpGedcom/Record/Indi/Emig.php +++ b/library/PhpGedcom/Record/Indi/Emig.php @@ -1,21 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 5c3c27b5..6a329f9a 100644 --- a/library/PhpGedcom/Record/Indi/Endl.php +++ b/library/PhpGedcom/Record/Indi/Endl.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 8b0a4484..f22bd10f 100644 --- a/library/PhpGedcom/Record/Indi/Even.php +++ b/library/PhpGedcom/Record/Indi/Even.php @@ -1,24 +1,23 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Indi; -use \PhpGedcom\Record; +use PhpGedcom\Record; /** - * Class Even - * @package PhpGedcom\Record\Indi + * Class Even. */ class Even extends Record implements Record\Objectable, Record\Sourceable, Record\Noteable { @@ -60,7 +59,7 @@ class Even extends Record implements Record\Objectable, Record\Sourceable, Recor /** * @var array */ - protected $phon = array(); + protected $phon = []; /** * @var string @@ -70,22 +69,22 @@ class Even extends Record implements Record\Objectable, Record\Sourceable, Recor /** * @var array */ - public $ref = array(); + public $ref = []; /** * @var array */ - protected $obje = array(); + protected $obje = []; /** * @var array */ - protected $sour = array(); + protected $sour = []; /** * @var array */ - protected $note = array(); + protected $note = []; /** * @var Record\Chan @@ -102,11 +101,13 @@ public function getPhon() /** * @param Record\Phon $phon + * * @return Even */ public function addPhon($phon = []) { $this->phon[] = $phon; + return $this; } @@ -120,11 +121,13 @@ public function getObje() /** * @param Record\ObjeRef $obje + * * @return Even */ public function addObje($obje = []) { $this->obje[] = $obje; + return $this; } @@ -138,11 +141,13 @@ public function getSour() /** * @param Record\SourRef $sour + * * @return Even */ public function addSour($sour = []) { $this->sour[] = $sour; + return $this; } @@ -156,21 +161,25 @@ public function getNote() /** * @param Record\NoteRef $note + * * @return Even */ public function addNote($note = []) { $this->note[] = $note; + return $this; } /** * @param \PhpGedcom\Record\Addr $addr + * * @return Even */ public function setAddr($addr = []) { $this->addr = $addr; + return $this; } @@ -184,11 +193,13 @@ public function getAddr() /** * @param string $age + * * @return Even */ public function setAge($age = '') { $this->age = $age; + return $this; } @@ -202,11 +213,13 @@ public function getAge() /** * @param string $agnc + * * @return Even */ public function setAgnc($agnc = '') { $this->agnc = $agnc; + return $this; } @@ -220,11 +233,13 @@ public function getAgnc() /** * @param string $caus + * * @return Even */ public function setCaus($caus = '') { $this->caus = $caus; + return $this; } @@ -238,11 +253,13 @@ public function getCaus() /** * @param string $date + * * @return Even */ public function setDate($date = '') { $this->date = $date; + return $this; } @@ -256,11 +273,13 @@ public function getDate() /** * @param \PhpGedcom\Record\Indi\Even\Plac $plac + * * @return Even */ public function setPlac($plac = []) { $this->plac = $plac; + return $this; } @@ -274,11 +293,13 @@ public function getPlac() /** * @param string $type + * * @return Even */ public function setType($type = '') { $this->type = $type; + return $this; } @@ -292,11 +313,13 @@ public function getType() /** * @param array $ref + * * @return Even */ public function setRef($ref = '') { $this->ref = $ref; + return $this; } @@ -318,11 +341,13 @@ public function getChan() /** * @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 index e83f037f..df54c4b7 100644 --- a/library/PhpGedcom/Record/Indi/Even/Plac.php +++ b/library/PhpGedcom/Record/Indi/Even/Plac.php @@ -1,24 +1,23 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Indi\Even; -use \PhpGedcom\Record; +use PhpGedcom\Record; /** - * Class Plac - * @package PhpGedcom\Record\Indi\Even + * Class Plac. */ class Plac extends Record implements Record\Noteable, Record\Sourceable { @@ -35,20 +34,22 @@ class Plac extends Record implements Record\Noteable, Record\Sourceable /** * @var array */ - protected $note = array(); + protected $note = []; /** * @var array */ - protected $sour = array(); + protected $sour = []; /** * @param string $form + * * @return Plac */ public function setForm($form = '') { $this->form = $form; + return $this; } @@ -62,11 +63,13 @@ public function getForm() /** * @param string $plac + * * @return Plac */ public function setPlac($plac = '') { $this->plac = $plac; + return $this; } @@ -88,11 +91,13 @@ public function getNote() /** * @param Record\NoteRef $note + * * @return Plac */ public function addNote($note = []) { $this->note[] = $note; + return $this; } @@ -106,11 +111,13 @@ public function getSour() /** * @param Record\SourRef $sour + * * @return Plac */ public function addSour($sour = []) { $this->sour[] = $sour; + return $this; } } diff --git a/library/PhpGedcom/Record/Indi/Famc.php b/library/PhpGedcom/Record/Indi/Famc.php index 6e78c937..f615069e 100644 --- a/library/PhpGedcom/Record/Indi/Famc.php +++ b/library/PhpGedcom/Record/Indi/Famc.php @@ -1,37 +1,28 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Indi; -use \PhpGedcom\Record\Noteable; +use PhpGedcom\Record\Noteable; -/** - * - */ class Famc extends \PhpGedcom\Record implements Noteable { protected $_famc = null; protected $_pedi = null; - /** - * - */ - protected $_note = array(); + protected $_note = []; - /** - * - */ public function addNote($note = []) { $this->_note[] = $note; diff --git a/library/PhpGedcom/Record/Indi/Fams.php b/library/PhpGedcom/Record/Indi/Fams.php index 9a143778..f0a6a0dc 100644 --- a/library/PhpGedcom/Record/Indi/Fams.php +++ b/library/PhpGedcom/Record/Indi/Fams.php @@ -1,39 +1,27 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Indi; -use \PhpGedcom\Record\Noteable; +use PhpGedcom\Record\Noteable; -/** - * - */ class Fams extends \PhpGedcom\Record implements Noteable { - /** - * - */ protected $_fams = null; - /** - * - */ - protected $_note = array(); + protected $_note = []; - /** - * - */ public function addNote($note = []) { $this->_note[] = $note; diff --git a/library/PhpGedcom/Record/Indi/Fcom.php b/library/PhpGedcom/Record/Indi/Fcom.php index a6d9e1d2..81c0f83d 100644 --- a/library/PhpGedcom/Record/Indi/Fcom.php +++ b/library/PhpGedcom/Record/Indi/Fcom.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index f7eaca93..a54ea19c 100644 --- a/library/PhpGedcom/Record/Indi/Grad.php +++ b/library/PhpGedcom/Record/Indi/Grad.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index ae464073..c10615de 100644 --- a/library/PhpGedcom/Record/Indi/Idno.php +++ b/library/PhpGedcom/Record/Indi/Idno.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 7739811c..cad6fd09 100644 --- a/library/PhpGedcom/Record/Indi/Immi.php +++ b/library/PhpGedcom/Record/Indi/Immi.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index a1d8c572..03479107 100644 --- a/library/PhpGedcom/Record/Indi/Lds.php +++ b/library/PhpGedcom/Record/Indi/Lds.php @@ -1,25 +1,22 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Indi; -use \PhpGedcom\Record\Sourceable; -use \PhpGedcom\Record\Noteable; +use PhpGedcom\Record\Noteable; +use PhpGedcom\Record\Sourceable; -/** - * - */ abstract class Lds extends \PhpGedcom\Record implements Sourceable, Noteable { protected $_stat; @@ -27,27 +24,15 @@ abstract class Lds extends \PhpGedcom\Record implements Sourceable, Noteable protected $_plac; protected $_temp; - /** - * - */ - protected $_sour = array(); + protected $_sour = []; - /** - * - */ - protected $_note = array(); + protected $_note = []; - /** - * - */ public function addSour($sour = []) { $this->_sour[] = $sour; } - /** - * - */ public function addNote($note = []) { $this->_note[] = $note; diff --git a/library/PhpGedcom/Record/Indi/Name.php b/library/PhpGedcom/Record/Indi/Name.php index 2e6ad000..dfeec6de 100644 --- a/library/PhpGedcom/Record/Indi/Name.php +++ b/library/PhpGedcom/Record/Indi/Name.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -23,38 +23,30 @@ * @method string getSurn() * @method string getNsfx() */ -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 $_fone = null; // PhpGedcom/ - protected $_romn = null; - protected $_type = null; - /** - * - */ - protected $_note = array(); +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 $_fone = null; // PhpGedcom/ + protected $_romn = null; + protected $_type = null; + + protected $_note = []; - /** - * - */ - protected $_sour = array(); + protected $_sour = []; - /** - * - */ - public function addSour($sour = []) { - $this->_sour[] = $sour; - } + public function addSour($sour = []) + { + $this->_sour[] = $sour; + } - /** - * - */ - public function addNote($note = []) { - $this->_note[] = $note; - } + public function addNote($note = []) + { + $this->_note[] = $note; + } } diff --git a/library/PhpGedcom/Record/Indi/Name/Fone.php b/library/PhpGedcom/Record/Indi/Name/Fone.php index 11cba359..53916383 100644 --- a/library/PhpGedcom/Record/Indi/Name/Fone.php +++ b/library/PhpGedcom/Record/Indi/Name/Fone.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,8 +17,7 @@ use PhpGedcom\Record; /** - * Class Refn - * @package PhpGedcom\Record + * Class Refn. */ class Fone extends Record { @@ -32,51 +31,47 @@ class Fone extends Record */ protected $type; /** - * string name_piece_prefix - */ - protected $_npfx = null; - /** - * string name_piece_given - */ - protected $_givn = null; - /** - * string name_piece_nickname - */ - protected $_nick = null; - /** - * strign name_piece_surname_prefix - */ - protected $_spfx = null; - /** - * string name_piece_surname - */ - protected $_surn = null; - /** - * string name_piece_suffix - */ - protected $_nsfx = null; + * string name_piece_prefix. + */ + protected $_npfx = null; + /** + * string name_piece_given. + */ + protected $_givn = null; + /** + * string name_piece_nickname. + */ + protected $_nick = null; + /** + * strign name_piece_surname_prefix. + */ + protected $_spfx = null; + /** + * string name_piece_surname. + */ + protected $_surn = null; + /** + * string name_piece_suffix. + */ + protected $_nsfx = null; - /** - * PhpGedcom\Record\NoteRef - */ - protected $_note = array(); + /** + * PhpGedcom\Record\NoteRef. + */ + protected $_note = []; - /** - * PhpGedcom\Record\SourRef - */ - protected $_sour = array(); + /** + * PhpGedcom\Record\SourRef. + */ + protected $_sour = []; - /** - * - */ - public function addSour($sour = []) { - $this->_sour[] = $sour; - } + public function addSour($sour = []) + { + $this->_sour[] = $sour; + } - /** - * - */ - public function addNote($note = []) { - $this->_note[] = $note; - } + public function addNote($note = []) + { + $this->_note[] = $note; + } } diff --git a/library/PhpGedcom/Record/Indi/Name/Romn.php b/library/PhpGedcom/Record/Indi/Name/Romn.php index dfa1f39c..0e079b6b 100644 --- a/library/PhpGedcom/Record/Indi/Name/Romn.php +++ b/library/PhpGedcom/Record/Indi/Name/Romn.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,8 +17,7 @@ use PhpGedcom\Record; /** - * Class Refn - * @package PhpGedcom\Record + * Class Refn. */ class Romn extends Record { @@ -31,52 +30,48 @@ class Romn extends Record * @var string romanized_type */ protected $type; - /** - * string name_piece_prefix - */ - protected $_npfx = null; - /** - * string name_piece_given - */ - protected $_givn = null; - /** - * string name_piece_nickname - */ - protected $_nick = null; - /** - * strign name_piece_surname_prefix - */ - protected $_spfx = null; - /** - * string name_piece_surname - */ - protected $_surn = null; - /** - * string name_piece_suffix - */ - protected $_nsfx = null; + /** + * string name_piece_prefix. + */ + protected $_npfx = null; + /** + * string name_piece_given. + */ + protected $_givn = null; + /** + * string name_piece_nickname. + */ + protected $_nick = null; + /** + * strign name_piece_surname_prefix. + */ + protected $_spfx = null; + /** + * string name_piece_surname. + */ + protected $_surn = null; + /** + * string name_piece_suffix. + */ + protected $_nsfx = null; - /** - * PhpGedcom\Record\NoteRef - */ - protected $_note = array(); + /** + * PhpGedcom\Record\NoteRef. + */ + protected $_note = []; - /** - * PhpGedcom\Record\SourRef - */ - protected $_sour = array(); + /** + * PhpGedcom\Record\SourRef. + */ + protected $_sour = []; - /** - * - */ - public function addSour($sour = []) { - $this->_sour[] = $sour; - } + public function addSour($sour = []) + { + $this->_sour[] = $sour; + } - /** - * - */ - public function addNote($note = []) { - $this->_note[] = $note; - } + public function addNote($note = []) + { + $this->_note[] = $note; + } } diff --git a/library/PhpGedcom/Record/Indi/Nati.php b/library/PhpGedcom/Record/Indi/Nati.php index 6df07bb4..77bd569f 100644 --- a/library/PhpGedcom/Record/Indi/Nati.php +++ b/library/PhpGedcom/Record/Indi/Nati.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 60a9e436..abb8e5dc 100644 --- a/library/PhpGedcom/Record/Indi/Natu.php +++ b/library/PhpGedcom/Record/Indi/Natu.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 8718d684..94d7f0ee 100644 --- a/library/PhpGedcom/Record/Indi/Nchi.php +++ b/library/PhpGedcom/Record/Indi/Nchi.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 38492b7b..bdb801f4 100644 --- a/library/PhpGedcom/Record/Indi/Nmr.php +++ b/library/PhpGedcom/Record/Indi/Nmr.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 3811fb93..5b426ac5 100644 --- a/library/PhpGedcom/Record/Indi/Note.php +++ b/library/PhpGedcom/Record/Indi/Note.php @@ -1,16 +1,17 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 5e73980e..b21b6376 100644 --- a/library/PhpGedcom/Record/Indi/Occu.php +++ b/library/PhpGedcom/Record/Indi/Occu.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 0f5c6abe..8aa39890 100644 --- a/library/PhpGedcom/Record/Indi/Ordn.php +++ b/library/PhpGedcom/Record/Indi/Ordn.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 16c481d7..0236f8f4 100644 --- a/library/PhpGedcom/Record/Indi/Prob.php +++ b/library/PhpGedcom/Record/Indi/Prob.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index a4bfb763..99099eb1 100644 --- a/library/PhpGedcom/Record/Indi/Prop.php +++ b/library/PhpGedcom/Record/Indi/Prop.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 8aaed6db..26b4aee7 100644 --- a/library/PhpGedcom/Record/Indi/Reli.php +++ b/library/PhpGedcom/Record/Indi/Reli.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 9fdfbb3b..e39692d5 100644 --- a/library/PhpGedcom/Record/Indi/Resi.php +++ b/library/PhpGedcom/Record/Indi/Resi.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 91a22147..99fd4d13 100644 --- a/library/PhpGedcom/Record/Indi/Reti.php +++ b/library/PhpGedcom/Record/Indi/Reti.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 2e28107f..467346fb 100644 --- a/library/PhpGedcom/Record/Indi/Slgc.php +++ b/library/PhpGedcom/Record/Indi/Slgc.php @@ -1,26 +1,20 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 475f61b6..fa0c8351 100644 --- a/library/PhpGedcom/Record/Indi/Ssn.php +++ b/library/PhpGedcom/Record/Indi/Ssn.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index e9f94f85..9ce05b07 100644 --- a/library/PhpGedcom/Record/Indi/Titl.php +++ b/library/PhpGedcom/Record/Indi/Titl.php @@ -1,21 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 7c795bbc..fc8f7bbd 100644 --- a/library/PhpGedcom/Record/Indi/Will.php +++ b/library/PhpGedcom/Record/Indi/Will.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 index 46b2de93..26df6ea0 100644 --- a/library/PhpGedcom/Record/Note.php +++ b/library/PhpGedcom/Record/Note.php @@ -1,49 +1,36 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record; -/** - * - * - */ class Note extends \PhpGedcom\Record implements Sourceable { - protected $_id = null; + protected $_id = null; protected $_note = null; protected $_even = null; - protected $_refn = array(); - protected $_rin = null; + protected $_refn = []; + protected $_rin = null; - /** - * - */ - protected $_sour = array(); + protected $_sour = []; protected $_chan = null; - /** - * - */ public function addRefn($refn = []) { $this->_refn[] = $refn; } - /** - * - */ public function addSour($sour = []) { $this->_sour[] = $sour; diff --git a/library/PhpGedcom/Record/NoteRef.php b/library/PhpGedcom/Record/NoteRef.php index 26f61bc6..caf2f9e7 100644 --- a/library/PhpGedcom/Record/NoteRef.php +++ b/library/PhpGedcom/Record/NoteRef.php @@ -1,60 +1,37 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 $_isRef = false; - /** - * - */ - protected $_note = ''; + protected $_note = ''; - /** - * - */ - protected $_sour = array(); + protected $_sour = []; - /** - * - */ public function setIsReference($isReference = true) { $this->_isRef = $isReference; } - /** - * - */ public function getIsReference() { return $this->_isRef; } - /** - * - */ public function addSour($sour = []) { $this->_sour[] = $sour; diff --git a/library/PhpGedcom/Record/Noteable.php b/library/PhpGedcom/Record/Noteable.php index 1244e55e..acc21f9a 100644 --- a/library/PhpGedcom/Record/Noteable.php +++ b/library/PhpGedcom/Record/Noteable.php @@ -1,26 +1,20 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record; -/** - * - */ interface Noteable { - /** - * - */ public function addNote($note = []); } diff --git a/library/PhpGedcom/Record/Obje.php b/library/PhpGedcom/Record/Obje.php index 8417771d..196764df 100644 --- a/library/PhpGedcom/Record/Obje.php +++ b/library/PhpGedcom/Record/Obje.php @@ -1,67 +1,50 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record; -/** - * - */ class Obje extends \PhpGedcom\Record implements Noteable { - protected $_id = null; + protected $_id = null; - protected $_file = array(); - protected $_rin = null; + protected $_file = []; + protected $_rin = null; protected $_chan = null; - protected $_refn = array(); + protected $_refn = []; - /** - * - */ - protected $_note = array(); + protected $_note = []; - protected $_sour = array(); + protected $_sour = []; - /** - * - */ public function addRefn($refn = []) { $this->_refn[] = $refn; } - /** - * - */ public function addNote($note = []) { $this->_note[] = $note; } - /** - * - */ + public function addFile($file) { $this->_file[] = $file; } - /** - * - */ public function addSour($sour) { $this->_sour[] = $sour; - } + } } diff --git a/library/PhpGedcom/Record/ObjeRef.php b/library/PhpGedcom/Record/ObjeRef.php index 3c19a3db..859bacf4 100644 --- a/library/PhpGedcom/Record/ObjeRef.php +++ b/library/PhpGedcom/Record/ObjeRef.php @@ -1,56 +1,34 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record; -/** - * - */ class ObjeRef extends \PhpGedcom\Record { - /** - * - */ - protected $_isRef = false; - - /** - * - */ - protected $_obje = null; + protected $_isRef = false; - /** - * - */ - protected $_titl = null; + protected $_obje = null; - /** - * - */ - protected $_file = null; + protected $_titl = null; + protected $_file = null; - /** - * - */ public function setIsReference($isReference = true) { $this->_isRef = $isReference; } - /** - * - */ public function getIsReference() { return $this->_isRef; diff --git a/library/PhpGedcom/Record/ObjeRef/File.php b/library/PhpGedcom/Record/ObjeRef/File.php index 59d71405..0a4dcfbc 100644 --- a/library/PhpGedcom/Record/ObjeRef/File.php +++ b/library/PhpGedcom/Record/ObjeRef/File.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,8 +17,7 @@ use PhpGedcom\Record; /** - * Class Refn - * @package PhpGedcom\Record + * Class Refn. */ class File extends Record { @@ -32,5 +31,4 @@ class File extends Record */ protected $_form; protected $_titl; - } diff --git a/library/PhpGedcom/Record/ObjeRef/File/Form.php b/library/PhpGedcom/Record/ObjeRef/File/Form.php index 1b2710d3..6671e0c4 100644 --- a/library/PhpGedcom/Record/ObjeRef/File/Form.php +++ b/library/PhpGedcom/Record/ObjeRef/File/Form.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,8 +17,7 @@ use PhpGedcom\Record; /** - * Class Refn - * @package PhpGedcom\Record + * Class Refn. */ class Form extends Record { @@ -29,13 +28,13 @@ class Form extends Record /** * @var string source_media_type - * for only obje + * for only obje */ protected $type; /** * @var string source_media_type - * for only objeref + * for only objeref */ protected $medi; } diff --git a/library/PhpGedcom/Record/Objectable.php b/library/PhpGedcom/Record/Objectable.php index 894eb32c..05390358 100644 --- a/library/PhpGedcom/Record/Objectable.php +++ b/library/PhpGedcom/Record/Objectable.php @@ -1,26 +1,20 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record; -/** - * - */ interface Objectable { - /** - * - */ public function addObje($obje = []); } diff --git a/library/PhpGedcom/Record/Phon.php b/library/PhpGedcom/Record/Phon.php index 4c29a528..2079adda 100644 --- a/library/PhpGedcom/Record/Phon.php +++ b/library/PhpGedcom/Record/Phon.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,8 +17,7 @@ use PhpGedcom\Record; /** - * Class Phon - * @package PhpGedcom\Record + * Class Phon. */ class Phon extends Record { @@ -29,11 +28,13 @@ class Phon extends Record /** * @param $phon + * * @return Phon */ public function setPhon($phon = []) { $this->phon = $phon; + return $this; } diff --git a/library/PhpGedcom/Record/Plac.php b/library/PhpGedcom/Record/Plac.php index 80da6c40..5c7e2085 100644 --- a/library/PhpGedcom/Record/Plac.php +++ b/library/PhpGedcom/Record/Plac.php @@ -1,55 +1,55 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record; -use \PhpGedcom\Record\Noteable; -/** - * - */ + class Plac extends \PhpGedcom\Record implements Noteable { /** - * string plac + * string plac. */ protected $_plac = null; /** - * string place_hierarchy + * string place_hierarchy. */ protected $_form = null; /** - * array PhpGedcom\Record\Plac\Fone + * array PhpGedcom\Record\Plac\Fone. */ protected $_fone = null; /** - * array PhpGedcom\Record\Plac\Romn + * array PhpGedcom\Record\Plac\Romn. */ protected $_romn = null; /** - * PhpGedcom\Record\Plac\Map + * PhpGedcom\Record\Plac\Map. */ protected $_map = null; /** - * array PhpGedcom\Record\NoteRef + * array PhpGedcom\Record\NoteRef. */ - protected $_note= null; + protected $_note = null; /** - * @param PhpGedcom\Record\NoteRef $note - * @return Plac - */ - public function addNote($note = null) { - $this->_note[] = $note; - return $this; - } + * @param PhpGedcom\Record\NoteRef $note + * + * @return Plac + */ + public function addNote($note = null) + { + $this->_note[] = $note; + + return $this; + } } diff --git a/library/PhpGedcom/Record/Plac/Fone.php b/library/PhpGedcom/Record/Plac/Fone.php index 309e4d18..cdd0eb09 100644 --- a/library/PhpGedcom/Record/Plac/Fone.php +++ b/library/PhpGedcom/Record/Plac/Fone.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,8 +17,7 @@ use PhpGedcom\Record; /** - * Class Refn - * @package PhpGedcom\Record + * Class Refn. */ class Fone extends Record { diff --git a/library/PhpGedcom/Record/Plac/Map.php b/library/PhpGedcom/Record/Plac/Map.php index b322f9f1..2a22a341 100644 --- a/library/PhpGedcom/Record/Plac/Map.php +++ b/library/PhpGedcom/Record/Plac/Map.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,8 +17,7 @@ use PhpGedcom\Record; /** - * Class Refn - * @package PhpGedcom\Record + * Class Refn. */ class Map extends Record { diff --git a/library/PhpGedcom/Record/Plac/Romn.php b/library/PhpGedcom/Record/Plac/Romn.php index 9f0e6b82..d49fbbee 100644 --- a/library/PhpGedcom/Record/Plac/Romn.php +++ b/library/PhpGedcom/Record/Plac/Romn.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,8 +17,7 @@ use PhpGedcom\Record; /** - * Class Refn - * @package PhpGedcom\Record + * Class Refn. */ class Romn extends Record { diff --git a/library/PhpGedcom/Record/Refn.php b/library/PhpGedcom/Record/Refn.php index 0df6d4c6..b25ea352 100644 --- a/library/PhpGedcom/Record/Refn.php +++ b/library/PhpGedcom/Record/Refn.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,8 +17,7 @@ use PhpGedcom\Record; /** - * Class Refn - * @package PhpGedcom\Record + * Class Refn. */ class Refn extends Record { @@ -34,11 +33,13 @@ class Refn extends Record /** * @param string $refn + * * @return Refn */ public function setRefn($refn = '') { $this->refn = $refn; + return $this; } @@ -52,11 +53,13 @@ public function getRefn() /** * @param string $type + * * @return Refn */ public function setType($type = '') { $this->type = $type; + return $this; } diff --git a/library/PhpGedcom/Record/Repo.php b/library/PhpGedcom/Record/Repo.php index 9bd04fd5..68b3aa0b 100644 --- a/library/PhpGedcom/Record/Repo.php +++ b/library/PhpGedcom/Record/Repo.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,244 +17,287 @@ use PhpGedcom\Record; /** - * Class Repo - * @package PhpGedcom\Record + * Class Repo. */ -class Repo extends Record implements Noteable { - /** - * @var string - */ - protected $repo; - - /** - * @var string - */ - protected $name; - - /** - * @var Addr - */ - protected $addr; - - /** - * @var array - */ - protected $phon = array(); - /** - * @var array - */ - protected $email = array(); - /** - * @var array - */ - protected $fax = array(); - /** - * @var array - */ - protected $www = array(); - /** - * @var string - */ - protected $rin; - - /** - * @var Chan - */ - protected $chan; - - - - /** - * @var array - */ - protected $refn = array(); - - /** - * @var array - */ - protected $note = array(); - - /** - * @param null - * @return Repo - */ - public function addPhon($phon = null) { - $this->phon[] = $phon; - return $this; - } - - /** - * @return array - */ - public function getPhon() { - return $this->phon; - } - - /** - * @param null - * @return Repo - */ - public function addEmail($email = null) { - $this->email[] = $email; - return $this; - } - - /** - * @return array - */ - public function getEmail() { - return $this->email; - } - - /** - * @param null - * @return Repo - */ - public function addFax($fax = null) { - $this->fax[] = $fax; - return $this; - } - - /** - * @return array - */ - public function getFax() { - return $this->fax; - } - /** - * @param null - * @return Repo - */ - public function addWww($www = null) { - $this->www[] = $www; - return $this; - } - - /** - * @return array - */ - public function getWww() { - return $this->www; - } - - /** - * @param null|\PhpGedcom\Record\Refn $refn - * @return Repo - */ - public function addRefn($refn = null) { - if (empty($refn)) { - $refn = new \PhpGedcom\Record\Refn(); - } - $this->refn[] = $refn; - return $this; - } - - /** - * @return array - */ - public function getRefn() { - return $this->refn; - } - - /** - * @param null|\PhpGedcom\Record\NoteRef $note - * @return Repo - */ - public function addNote($note = null) { - if (empty($node)) { - $note = new \PhpGedcom\Record\NoteRef(); - } - $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 null|\PhpGedcom\Record\Addr $addr - * @return Repo - */ - public function setAddr($addr = null) { - if (empty($addr)) { - $addr = new \PhpGedcom\Record\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; - } +class Repo extends Record implements Noteable +{ + /** + * @var string + */ + protected $repo; + + /** + * @var string + */ + protected $name; + + /** + * @var Addr + */ + protected $addr; + + /** + * @var array + */ + protected $phon = []; + /** + * @var array + */ + protected $email = []; + /** + * @var array + */ + protected $fax = []; + /** + * @var array + */ + protected $www = []; + /** + * @var string + */ + protected $rin; + + /** + * @var Chan + */ + protected $chan; + + /** + * @var array + */ + protected $refn = []; + + /** + * @var array + */ + protected $note = []; + + /** + * @param null + * + * @return Repo + */ + public function addPhon($phon = null) + { + $this->phon[] = $phon; + + return $this; + } + + /** + * @return array + */ + public function getPhon() + { + return $this->phon; + } + + /** + * @param null + * + * @return Repo + */ + public function addEmail($email = null) + { + $this->email[] = $email; + + return $this; + } + + /** + * @return array + */ + public function getEmail() + { + return $this->email; + } + + /** + * @param null + * + * @return Repo + */ + public function addFax($fax = null) + { + $this->fax[] = $fax; + + return $this; + } + + /** + * @return array + */ + public function getFax() + { + return $this->fax; + } + + /** + * @param null + * + * @return Repo + */ + public function addWww($www = null) + { + $this->www[] = $www; + + return $this; + } + + /** + * @return array + */ + public function getWww() + { + return $this->www; + } + + /** + * @param null|\PhpGedcom\Record\Refn $refn + * + * @return Repo + */ + public function addRefn($refn = null) + { + if (empty($refn)) { + $refn = new \PhpGedcom\Record\Refn(); + } + $this->refn[] = $refn; + + return $this; + } + + /** + * @return array + */ + public function getRefn() + { + return $this->refn; + } + + /** + * @param null|\PhpGedcom\Record\NoteRef $note + * + * @return Repo + */ + public function addNote($note = null) + { + if (empty($node)) { + $note = new \PhpGedcom\Record\NoteRef(); + } + $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 null|\PhpGedcom\Record\Addr $addr + * + * @return Repo + */ + public function setAddr($addr = null) + { + if (empty($addr)) { + $addr = new \PhpGedcom\Record\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 index 53172aa9..4bdf1d15 100644 --- a/library/PhpGedcom/Record/RepoRef.php +++ b/library/PhpGedcom/Record/RepoRef.php @@ -1,36 +1,27 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record; -/** - * - */ class RepoRef extends \PhpGedcom\Record implements Noteable { protected $_repo = null; - protected $_caln = array(); + protected $_caln = []; - /** - * - */ - protected $_note = array(); + protected $_note = []; - /** - * - */ public function addNote($note = []) { $this->_note[] = $note; diff --git a/library/PhpGedcom/Record/Sour.php b/library/PhpGedcom/Record/Sour.php index f1dfa271..0a9df348 100644 --- a/library/PhpGedcom/Record/Sour.php +++ b/library/PhpGedcom/Record/Sour.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,8 +17,7 @@ use PhpGedcom\Record; /** - * Class Sour - * @package PhpGedcom\Record + * Class Sour. */ class Sour extends Record implements Noteable, Objectable { @@ -65,7 +64,7 @@ class Sour extends Record implements Noteable, Objectable /** * @var array */ - protected $refn = array(); + protected $refn = []; /** * @var string @@ -80,20 +79,22 @@ class Sour extends Record implements Noteable, Objectable /** * @var array */ - protected $note = array(); + protected $note = []; /** * @var array */ - protected $obje = array(); + protected $obje = []; /** * @param string $sour + * * @return Sour */ public function setSour($sour = '') { $this->sour = $sour; + return $this; } @@ -107,11 +108,13 @@ public function getSour() /** * @param string $titl + * * @return Sour */ public function setTitl($titl = '') { $this->titl = $titl; + return $this; } @@ -125,11 +128,13 @@ public function getTitl() /** * @param string $abbr + * * @return Sour */ public function setAbbr($abbr = '') { $this->abbr = $abbr; + return $this; } @@ -143,11 +148,13 @@ public function getAbbr() /** * @param string $auth + * * @return Sour */ public function setAuth($auth = '') { $this->auth = $auth; + return $this; } @@ -161,11 +168,13 @@ public function getAuth() /** * @param string $publ + * * @return Sour */ public function setPubl($publ = '') { $this->publ = $publ; + return $this; } @@ -179,11 +188,13 @@ public function getPubl() /** * @param \PhpGedcom\Record\Repo $repo + * * @return Sour */ public function setRepo($repo) { $this->repo = $repo; + return $this; } @@ -197,11 +208,13 @@ public function getRepo() /** * @param string $text + * * @return Sour */ public function setText($text = '') { $this->text = $text; + return $this; } @@ -215,11 +228,13 @@ public function getText() /** * @param string $data + * * @return Sour */ public function setData($data = '') { $this->data = $data; + return $this; } @@ -233,11 +248,13 @@ public function getData() /** * @param string $rin + * * @return Sour */ public function setRin($rin = '') { $this->rin = $rin; + return $this; } @@ -251,11 +268,13 @@ public function getRin() /** * @param \PhpGedcom\Record\Chan $chan + * * @return Sour */ public function setChan($chan = []) { $this->chan = $chan; + return $this; } @@ -269,11 +288,13 @@ public function getChan() /** * @param Refn $refn + * * @return Sour */ public function addRefn($refn = []) { $this->refn[] = $refn; + return $this; } @@ -287,11 +308,13 @@ public function getRefn() /** * @param NoteRef $note + * * @return Sour */ public function addNote($note = []) { $this->note[] = $note; + return $this; } @@ -305,11 +328,13 @@ public function getNote() /** * @param ObjeRef $obje + * * @return Sour */ public function addObje($obje = []) { $this->obje[] = $obje; + return $this; } diff --git a/library/PhpGedcom/Record/Sour/Data.php b/library/PhpGedcom/Record/Sour/Data.php index 2d960be6..9c9fdceb 100644 --- a/library/PhpGedcom/Record/Sour/Data.php +++ b/library/PhpGedcom/Record/Sour/Data.php @@ -1,40 +1,31 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Sour; -use \PhpGedcom\Record\Noteable; +use PhpGedcom\Record\Noteable; -/** - * - */ class Data extends \PhpGedcom\Record implements Noteable { - protected $_even = array(); + protected $_even = []; protected $_agnc = null; protected $_date = null; protected $_text = null; - /** - * - */ - protected $_note = array(); + protected $_note = []; - /** - * - */ public function addNote($note = []) { $this->_note[] = $note; diff --git a/library/PhpGedcom/Record/Sour/Data/Even.php b/library/PhpGedcom/Record/Sour/Data/Even.php index 2601b552..9857ce1e 100644 --- a/library/PhpGedcom/Record/Sour/Data/Even.php +++ b/library/PhpGedcom/Record/Sour/Data/Even.php @@ -1,22 +1,19 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Sour\Data; -/** - * - */ class Even extends \PhpGedcom\Record { protected $_date = null; diff --git a/library/PhpGedcom/Record/Sour/Repo.php b/library/PhpGedcom/Record/Sour/Repo.php index fa15bb57..af7d01dc 100644 --- a/library/PhpGedcom/Record/Sour/Repo.php +++ b/library/PhpGedcom/Record/Sour/Repo.php @@ -1,49 +1,41 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Sour; -use \PhpGedcom\Record\Noteable; +use PhpGedcom\Record\Noteable; -/** - * - */ class Repo extends \PhpGedcom\Record implements Noteable { protected $_repo = null; /** - * array PhpGedcom\Record\Sour\Repo\Caln - */ - protected $_caln = array(); - - /** - * array PhpGedcom\Record\NoteRef + * array PhpGedcom\Record\Sour\Repo\Caln. */ - protected $_note = array(); + protected $_caln = []; /** - * + * array PhpGedcom\Record\NoteRef. */ + protected $_note = []; + public function addNote($note = []) { $this->_note[] = $note; } - /** - * - */ - public function addCaln($caln=[]){ + public function addCaln($caln = []) + { $this->_caln[] = $caln; } } diff --git a/library/PhpGedcom/Record/Sour/Repo/Caln.php b/library/PhpGedcom/Record/Sour/Repo/Caln.php index 0f0bf547..7fbbe437 100644 --- a/library/PhpGedcom/Record/Sour/Repo/Caln.php +++ b/library/PhpGedcom/Record/Sour/Repo/Caln.php @@ -1,30 +1,27 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\Sour\Repo; -/** - * - */ class Caln extends \PhpGedcom\Record { /** - * string source_call_number + * string source_call_number. */ protected $_caln = null; /** - * string source_media_type + * string source_media_type. */ protected $_medi = null; } diff --git a/library/PhpGedcom/Record/SourRef.php b/library/PhpGedcom/Record/SourRef.php index 319155b9..2cdbe43f 100644 --- a/library/PhpGedcom/Record/SourRef.php +++ b/library/PhpGedcom/Record/SourRef.php @@ -1,33 +1,30 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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(); + protected $_isRef = false; + + protected $_sour = null; + protected $_page = null; + protected $_even = null; + protected $_data = null; + protected $_quay = null; + protected $_text = null; + + protected $_obje = []; + protected $_note = []; } diff --git a/library/PhpGedcom/Record/SourRef/Data.php b/library/PhpGedcom/Record/SourRef/Data.php index 9757f079..51dc0c9b 100644 --- a/library/PhpGedcom/Record/SourRef/Data.php +++ b/library/PhpGedcom/Record/SourRef/Data.php @@ -1,30 +1,27 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\SourRef; -/** - * - */ class Data extends \PhpGedcom\Record { /** - * string entry_recording_date + * string entry_recording_date. */ - protected $_date = null; + protected $_date = null; /** - * string text_from_source + * string text_from_source. */ - protected $_text = null; + protected $_text = null; } diff --git a/library/PhpGedcom/Record/SourRef/Even.php b/library/PhpGedcom/Record/SourRef/Even.php index 5d2c1a58..ddf9ac3f 100644 --- a/library/PhpGedcom/Record/SourRef/Even.php +++ b/library/PhpGedcom/Record/SourRef/Even.php @@ -1,24 +1,21 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record\SourRef; -/** - * - */ class Even extends \PhpGedcom\Record { - protected $_even = null; - protected $_role = null; + protected $_even = null; + protected $_role = null; } diff --git a/library/PhpGedcom/Record/Sourceable.php b/library/PhpGedcom/Record/Sourceable.php index 3485cd6b..d130db16 100644 --- a/library/PhpGedcom/Record/Sourceable.php +++ b/library/PhpGedcom/Record/Sourceable.php @@ -1,26 +1,20 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Record; -/** - * - */ interface Sourceable { - /** - * - */ public function addSour($sour = []); } diff --git a/library/PhpGedcom/Record/Subm.php b/library/PhpGedcom/Record/Subm.php index 8721be7e..beeafe5e 100644 --- a/library/PhpGedcom/Record/Subm.php +++ b/library/PhpGedcom/Record/Subm.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,293 +17,344 @@ use PhpGedcom\Record; /** - * Class Subm - * @package PhpGedcom\Record + * Class Subm. */ -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 $email = array(); - - /** - * @var array - */ - protected $fax = array(); - - /** - * @var array - */ - protected $www = array(); - - /** - * @var array - */ - protected $obje = array(); - - /** - * @var array - */ - protected $note = 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 Record\Phon $phon - * @return Subm - */ - public function addPhon($phon = []) { - $this->phon[] = $phon; - return $this; - } - - /** - * @return array - */ - public function getEmail() { - return $this->email; - } - - - /** - * @param Record\Phon $phon - * @return Subm - */ - public function addEmail($email) { - $this->email[] = $email; - return $this; - } - - /** - * @return array - */ - public function getFax() { - return $this->fax; - } - - - /** - * @param Record\Phon $phon - * @return Subm - */ - public function addFax($fax) { - $this->fax[] = $fax; - return $this; - } - - /** - * @return array - */ - public function getWww() { - return $this->www; - } - - - /** - * @param Record\Phon $phon - * @return Subm - */ - public function addWww($www) { - $this->www[] = $www; - return $this; - } - - /** - * @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; - } - - /** - * @return Addr - */ - public function getAddr() { - return $this->addr; - } - - /** - * @param Addr $addr - * @return Subm - */ - public function setAddr($addr = []) { - $this->addr = $addr; - return $this; - } - - /** - * @return array - */ - public function getObje() { - return $this->obje; - } - - /** - * @param Record\ObjeRef $obje - * @return Subm - */ - public function addObje($obje = []) { - $this->obje[] = $obje; - return $this; - } - - /** - * @return array - */ - public function getNote() { - return $this->note; - } - - /** - * @param Record\Note $note - * @return Subm - */ - public function addNote($note = []) { - $this->note[] = $note; - return $this; - } +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 = []; + + /** + * @var array + */ + protected $phon = []; + + /** + * @var array + */ + protected $email = []; + + /** + * @var array + */ + protected $fax = []; + + /** + * @var array + */ + protected $www = []; + + /** + * @var array + */ + protected $obje = []; + + /** + * @var array + */ + protected $note = []; + + /** + * @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 Record\Phon $phon + * + * @return Subm + */ + public function addPhon($phon = []) + { + $this->phon[] = $phon; + + return $this; + } + + /** + * @return array + */ + public function getEmail() + { + return $this->email; + } + + /** + * @param Record\Phon $phon + * + * @return Subm + */ + public function addEmail($email) + { + $this->email[] = $email; + + return $this; + } + + /** + * @return array + */ + public function getFax() + { + return $this->fax; + } + + /** + * @param Record\Phon $phon + * + * @return Subm + */ + public function addFax($fax) + { + $this->fax[] = $fax; + + return $this; + } + + /** + * @return array + */ + public function getWww() + { + return $this->www; + } + + /** + * @param Record\Phon $phon + * + * @return Subm + */ + public function addWww($www) + { + $this->www[] = $www; + + return $this; + } + + /** + * @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; + } + + /** + * @return Addr + */ + public function getAddr() + { + return $this->addr; + } + + /** + * @param Addr $addr + * + * @return Subm + */ + public function setAddr($addr = []) + { + $this->addr = $addr; + + return $this; + } + + /** + * @return array + */ + public function getObje() + { + return $this->obje; + } + + /** + * @param Record\ObjeRef $obje + * + * @return Subm + */ + public function addObje($obje = []) + { + $this->obje[] = $obje; + + return $this; + } + + /** + * @return array + */ + public function getNote() + { + return $this->note; + } + + /** + * @param Record\Note $note + * + * @return Subm + */ + public function addNote($note = []) + { + $this->note[] = $note; + + return $this; + } } diff --git a/library/PhpGedcom/Record/Subn.php b/library/PhpGedcom/Record/Subn.php index 806a80ab..cfba4c93 100644 --- a/library/PhpGedcom/Record/Subn.php +++ b/library/PhpGedcom/Record/Subn.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,8 +17,7 @@ use PhpGedcom\Record; /** - * Class Subn - * @package PhpGedcom\Record + * Class Subn. */ class Subn extends Record { @@ -65,38 +64,46 @@ class Subn extends Record /** * @var array */ - protected $_note = array(); + protected $_note = []; /** * @var \PhpGedcom\Record\Chan */ protected $_chan = null; - public function setChan($chan) { + public function setChan($chan) + { $this->_chan = $chan; + return $this; } - public function getChan() { + public function getChan() + { return $this->_chan; } - public function addNote($note) { + public function addNote($note) + { $this->_note[] = $note; + return $this; } - public function getNote() { + public function getNote() + { return $this->_note; } /** * @param string $subn + * * @return Subn */ public function setSubn($subn = '') { $this->subn = $subn; + return $this; } @@ -110,11 +117,13 @@ public function getSubn() /** * @param string $subm + * * @return Subn */ public function setSubm($subm = '') { $this->subm = $subm; + return $this; } @@ -128,11 +137,13 @@ public function getSubm() /** * @param string $famf + * * @return Subn */ public function setFamf($famf = '') { $this->famf = $famf; + return $this; } @@ -146,11 +157,13 @@ public function getFamf() /** * @param string $temp + * * @return Subn */ public function setTemp($temp = '') { $this->temp = $temp; + return $this; } @@ -164,11 +177,13 @@ public function getTemp() /** * @param string $ance + * * @return Subn */ public function setAnce($ance = '') { $this->ance = $ance; + return $this; } @@ -182,11 +197,13 @@ public function getAnce() /** * @param string $desc + * * @return Subn */ public function setDesc($desc = '') { $this->desc = $desc; + return $this; } @@ -200,11 +217,13 @@ public function getDesc() /** * @param string $ordi + * * @return Subn */ public function setOrdi($ordi = '') { $this->ordi = $ordi; + return $this; } @@ -218,11 +237,13 @@ public function getOrdi() /** * @param string $rin + * * @return Subn */ public function setRin($rin = '') { $this->rin = $rin; + return $this; } diff --git a/library/PhpGedcom/Writer.php b/library/PhpGedcom/Writer.php index 36a44faa..09bd368d 100644 --- a/library/PhpGedcom/Writer.php +++ b/library/PhpGedcom/Writer.php @@ -1,43 +1,39 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom; -use \PhpGedcom\Gedcom; -use \PhpGedcom\Writer\Head; -use \PhpGedcom\Writer\Subn; -use \PhpGedcom\Writer\Subm; -use \PhpGedcom\Writer\Sour; -use \PhpGedcom\Writer\Indi; -use \PhpGedcom\Writer\Fam; -use \PhpGedcom\Writer\Note; -use \PhpGedcom\Writer\Repo; -use \PhpGedcom\Writer\Obje; +use PhpGedcom\Writer\Fam; +use PhpGedcom\Writer\Head; +use PhpGedcom\Writer\Indi; +use PhpGedcom\Writer\Note; +use PhpGedcom\Writer\Obje; +use PhpGedcom\Writer\Repo; +use PhpGedcom\Writer\Sour; +use PhpGedcom\Writer\Subm; +use PhpGedcom\Writer\Subn; -/** - * - */ 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 + * @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) @@ -51,81 +47,82 @@ public static function convert(Gedcom $gedcom, $format = self::GEDCOM55) $notes = $gedcom->getNote(); // array() $repos = $gedcom->getRepo(); // array() $objes = $gedcom->getObje(); // array() - - $output = "0 FORMAT ".$format."\n"; + + $output = '0 FORMAT '.$format."\n"; // head - if($head){ + if ($head) { $output = Head::convert($head, $format); } - + // subn - if($subn){ + if ($subn) { $output .= Subn::convert($subn); } // subms - if(!empty($subms) && count($subms) > 0){ - foreach($subms as $item){ - if($item){ + if (!empty($subms) && count($subms) > 0) { + foreach ($subms as $item) { + if ($item) { $output .= Subm::convert($item); } } } - + // sours - if(!empty($sours) && count($sours) > 0){ - foreach($sours as $item){ - if($item){ + if (!empty($sours) && count($sours) > 0) { + foreach ($sours as $item) { + if ($item) { $output .= Sour::convert($item); } } } // indis - if(!empty($indis) && count($indis) > 0){ - foreach($indis as $item){ - if($item){ + if (!empty($indis) && count($indis) > 0) { + foreach ($indis as $item) { + if ($item) { $output .= Indi::convert($item); } } } // fams - if(!empty($fams) && count($fams) > 0){ - foreach($fams as $item){ - if($item){ + if (!empty($fams) && count($fams) > 0) { + foreach ($fams as $item) { + if ($item) { $output .= Fam::convert($item); } } } // notes - if(!empty($notes) && count($notes) > 0){ - foreach($notes as $item){ - if($item){ + if (!empty($notes) && count($notes) > 0) { + foreach ($notes as $item) { + if ($item) { $output .= Note::convert($item); } } } // repos - if(!empty($repos) && count($repos) > 0){ - foreach($repos as $item){ - if($item){ + if (!empty($repos) && count($repos) > 0) { + foreach ($repos as $item) { + if ($item) { $output .= Repo::convert($item); } } } // Objes - if(!empty($objes) && count($objes) > 0){ - foreach($objes as $item){ - if($item){ + if (!empty($objes) && count($objes) > 0) { + foreach ($objes as $item) { + if ($item) { $output .= Obje::convert($item); } } } // EOF $output .= "0 TRLR\n"; + return $output; } } diff --git a/library/PhpGedcom/Writer/Addr.php b/library/PhpGedcom/Writer/Addr.php index fec98109..16cf6d68 100644 --- a/library/PhpGedcom/Writer/Addr.php +++ b/library/PhpGedcom/Writer/Addr.php @@ -1,49 +1,47 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer; -/** - * - */ class Addr { /** * @param \PhpGedcom\Record\Addr $addr - * @param string $format - * @param int $level + * @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->getAddr()); - - $output = "{$level} ADDR " . $addrs[0] . "\n"; - + + $output = "{$level} ADDR ".$addrs[0]."\n"; + array_shift($addrs); - + foreach ($addrs as $cont) { - $output .= ($level+1) . " CONT " . $cont . "\n"; + $output .= ($level + 1).' CONT '.$cont."\n"; } - $output .= ($level+1) . " ADR1 " . $addr->adr1 . "\n" . - ($level+1) . " ADR2 " . $addr->getAdr2() . "\n" . - ($level+1) . " CITY " . $addr->getCity() . "\n" . - ($level+1) . " STAE " . $addr->getStae() . "\n" . - ($level+1) . " POST " . $addr->getPost() . "\n" . - ($level+1) . " CTRY " . $addr->getCtry() . "\n"; - + $output .= ($level + 1).' ADR1 '.$addr->adr1."\n". + ($level + 1).' ADR2 '.$addr->getAdr2()."\n". + ($level + 1).' CITY '.$addr->getCity()."\n". + ($level + 1).' STAE '.$addr->getStae()."\n". + ($level + 1).' POST '.$addr->getPost()."\n". + ($level + 1).' CTRY '.$addr->getCtry()."\n"; + return $output; } } diff --git a/library/PhpGedcom/Writer/Caln.php b/library/PhpGedcom/Writer/Caln.php index aee2cd12..39212331 100644 --- a/library/PhpGedcom/Writer/Caln.php +++ b/library/PhpGedcom/Writer/Caln.php @@ -1,37 +1,35 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer; -/** - * - */ class Caln { /** * @param \PhpGedcom\Record\Caln $note - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Caln &$caln, $level) { - $output = ""; + $output = ''; $_caln = $caln->getCaln(); - if(empty($_caln)){ + if (empty($_caln)) { return $output; - }else{ - $output.=$level." CALN ".$_caln."\n"; + } else { + $output .= $level.' CALN '.$_caln."\n"; } // level up @@ -39,9 +37,10 @@ public static function convert(\PhpGedcom\Record\Caln &$caln, $level) // medi $medi = $caln->getMedi(); - if(!empty($medi)){ - $output.=$level." MEDI ".$medi."\n"; + if (!empty($medi)) { + $output .= $level.' MEDI '.$medi."\n"; } + return $output; } } diff --git a/library/PhpGedcom/Writer/Chan.php b/library/PhpGedcom/Writer/Chan.php index 0d119b51..ae4a7e29 100644 --- a/library/PhpGedcom/Writer/Chan.php +++ b/library/PhpGedcom/Writer/Chan.php @@ -1,27 +1,25 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer; -/** - * - */ class Chan { /** * @param \PhpGedcom\Record\Chan $note - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Chan &$chan, $level) @@ -31,22 +29,23 @@ public static function convert(\PhpGedcom\Record\Chan &$chan, $level) $level++; // DATE $_date = $chan->getDate(); - if(!empty($_date)){ - $output.=$level." DATE ".$_date."\n"; + if (!empty($_date)) { + $output .= $level.' DATE '.$_date."\n"; } // TIME $_time = $chan->getDate(); - if(!empty($_time)){ - $output.=$level." DATE ".$_time."\n"; + if (!empty($_time)) { + $output .= $level.' DATE '.$_time."\n"; } // $_note = array() $_note = $chan->getNote(); - if(!empty($_note) && count($_note) > 0){ - foreach($_note as $item){ + if (!empty($_note) && count($_note) > 0) { + foreach ($_note as $item) { $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } + return $output; } } diff --git a/library/PhpGedcom/Writer/Fam.php b/library/PhpGedcom/Writer/Fam.php index e97e5b9e..c9188bc8 100644 --- a/library/PhpGedcom/Writer/Fam.php +++ b/library/PhpGedcom/Writer/Fam.php @@ -1,155 +1,153 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer; -/** - * - */ class Fam { /** * @param \PhpGedcom\Record\Fam $sour - * @param int $level + * @param int $level + * * @return string */ - public static function convert(\PhpGedcom\Record\Fam &$fam, $level=0) + public static function convert(\PhpGedcom\Record\Fam &$fam, $level = 0) { - - $output = ""; + $output = ''; $id = $fam->getId(); - if(empty($id)){ + if (empty($id)) { return $output; - }else{ - $output.=$level." @".$id."@ FAM "."\n"; + } else { + $output .= $level.' @'.$id.'@ FAM '."\n"; } // level up $level++; // HUSB $husb = $fam->getHusb(); - if(!empty($husb)){ - $output.=$level." HUSB @".$husb."@\n"; + if (!empty($husb)) { + $output .= $level.' HUSB @'.$husb."@\n"; } - + // WIFE $wife = $fam->getWife(); - if(!empty($wife)){ - $output.=$level." WIFE @".$wife."@\n"; + if (!empty($wife)) { + $output .= $level.' WIFE @'.$wife."@\n"; } // CHIL $chil = $fam->getChil(); - if(!empty($chil) && count($chil) > 0){ - foreach($chil as $item){ - if($item){ - $_convert = $level." CHIL @".$item."@\n"; - $output.=$_convert; + if (!empty($chil) && count($chil) > 0) { + foreach ($chil as $item) { + if ($item) { + $_convert = $level.' CHIL @'.$item."@\n"; + $output .= $_convert; } } } // NCHI $nchi = $fam->getNchi(); - if(!empty($nchi)){ - $output.=$level." NCHI ".$nchi."\n"; + if (!empty($nchi)) { + $output .= $level.' NCHI '.$nchi."\n"; } // SUBM array $subm = $fam->getSubm(); - - if(!empty($subm) && count($subm) > 0){ - foreach($subm as $item){ - if($item){ - $output.=$level." SUBM ".$item."\n"; + + if (!empty($subm) && count($subm) > 0) { + foreach ($subm as $item) { + if ($item) { + $output .= $level.' SUBM '.$item."\n"; } } } // RIN $rin = $fam->getRin(); - if(!empty($rin)){ - $output.=$level." RIN ".$rin."\n"; + if (!empty($rin)) { + $output .= $level.' RIN '.$rin."\n"; } // CHAN $chan = $fam->getChan(); - if(!empty($chan)){ + if (!empty($chan)) { $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level); - $output.=$_convert; + $output .= $_convert; } // SLGS $slgs = $fam->getSlgs(); - if(!empty($slgs) && count($slgs) > 0){ - if($slgs){ + if (!empty($slgs) && count($slgs) > 0) { + if ($slgs) { $_convert = \PhpGedcom\Writer\Fam\Slgs::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // REFN array $refn = $fam->getRefn(); - if(!empty($refn) && count($refn) > 0){ - foreach($refn as $item){ - if($item){ + if (!empty($refn) && count($refn) > 0) { + foreach ($refn as $item) { + if ($item) { $_convert = \PhpGedcom\Writer\Refn::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } } // NOTE array $note = $fam->getNote(); - if(!empty($note) && count($note) > 0){ - foreach($note as $item){ - if($item){ + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { + if ($item) { $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } } // SOUR $sour = $fam->getSour(); - if(!empty($sour) && count($sour) > 0){ - foreach($sour as $item){ - if($item){ + if (!empty($sour) && count($sour) > 0) { + foreach ($sour as $item) { + if ($item) { $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } } // OBJE $obje = $fam->getObje(); - if(!empty($obje) && count($obje) > 0){ - foreach($obje as $item){ - if($item){ + if (!empty($obje) && count($obje) > 0) { + foreach ($obje as $item) { + if ($item) { $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } } // EVEN $even = $fam->getAllEven(); - if(!empty($even) && count($even) > 0){ - foreach($even as $item){ - if($item){ + if (!empty($even) && count($even) > 0) { + foreach ($even as $item) { + if ($item) { $_convert = \PhpGedcom\Writer\Fam\Even::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } } + return $output; } } diff --git a/library/PhpGedcom/Writer/Fam/Even.php b/library/PhpGedcom/Writer/Fam/Even.php index 05dcc955..5ccd8317 100644 --- a/library/PhpGedcom/Writer/Fam/Even.php +++ b/library/PhpGedcom/Writer/Fam/Even.php @@ -1,106 +1,104 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer\Fam; -/** - * - */ class Even { /** * @param \PhpGedcom\Record\Fam\Even $even - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Fam\Even &$even, $level) { - $output = ""; + $output = ''; // $type; $type = $even->getType(); - if(!empty($type)){ - $output.=$level." ".$type."\n"; - }else{ + if (!empty($type)) { + $output .= $level.' '.$type."\n"; + } else { return $output; } $level++; // $type; $type = $even->getType(); - if(!empty($type)){ - $output.=$level." TYPE ".$type."\n"; + if (!empty($type)) { + $output .= $level.' TYPE '.$type."\n"; } // $date; $date = $even->getDate(); - if(!empty($date)){ - $output.=$level." DATE ".$date."\n"; + if (!empty($date)) { + $output .= $level.' DATE '.$date."\n"; } - + // Plac $plac = $even->getPlac(); - if(!empty($plac)){ + if (!empty($plac)) { $_convert = \PhpGedcom\Writer\Indi\Even\Plac::convert($plac, $level); - $output.=$_convert; + $output .= $_convert; } // $caus; $caus = $even->getCaus(); - if(!empty($caus)){ - $output.=$level." CAUS ".$caus."\n"; + if (!empty($caus)) { + $output .= $level.' CAUS '.$caus."\n"; } // $age; $age = $even->getAge(); - if(!empty($age)){ - $output.=$level." AGE ".$age."\n"; + if (!empty($age)) { + $output .= $level.' AGE '.$age."\n"; } // $addr $addr = $even->getAddr(); - if(!empty($addr)){ + if (!empty($addr)) { $_convert = \PhpGedcom\Writer\Addr::convert($addr, $level); - $output.=$_convert; + $output .= $_convert; } // $phon = array() $phon = $even->getPhon(); - if(!empty($phon) && count($phon) > 0){ - foreach($phon as $item){ + if (!empty($phon) && count($phon) > 0) { + foreach ($phon as $item) { $_convert = \PhpGedcom\Writer\Phon::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // $agnc $agnc = $even->getAgnc(); - if(!empty($agnc)){ - $output.=$level." AGNC ".$agnc."\n"; + if (!empty($agnc)) { + $output .= $level.' AGNC '.$agnc."\n"; } // HUSB $husb = $even->getHusb(); - if(!empty($husb)){ + if (!empty($husb)) { $_convert = \PhpGedcom\Writer\Fam\Even\Husb::convert($husb, $level); - $output.=$_convert; + $output .= $_convert; } // WIFE $wife = $even->getWife(); - if(!empty($wife)){ + if (!empty($wife)) { $_convert = \PhpGedcom\Writer\Fam\Even\Wife::convert($wife, $level); - $output.=$_convert; + $output .= $_convert; } // $ref = array(); @@ -108,26 +106,26 @@ public static function convert(\PhpGedcom\Record\Fam\Even &$even, $level) // $obje = array(); $obje = $even->getObje(); - if(!empty($obje) && count($obje) > 0){ - foreach($obje as $item){ + if (!empty($obje) && count($obje) > 0) { + foreach ($obje as $item) { $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // $sour = array(); $sour = $even->getSour(); - if(!empty($sour) && count($sour) > 0){ - foreach($sour as $item){ + if (!empty($sour) && count($sour) > 0) { + foreach ($sour as $item) { $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // $note = array(); $note = $even->getNote(); - if(!empty($note) && count($note) > 0){ - foreach($note as $item){ + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } diff --git a/library/PhpGedcom/Writer/Fam/Even/Husb.php b/library/PhpGedcom/Writer/Fam/Even/Husb.php index 5c3ce27c..69739b1d 100644 --- a/library/PhpGedcom/Writer/Fam/Even/Husb.php +++ b/library/PhpGedcom/Writer/Fam/Even/Husb.php @@ -1,43 +1,41 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer\Fam\Even; -/** - * - */ class Husb { /** * @param \PhpGedcom\Record\Fam\Even\Husb $attr - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Fam\Even\Husb &$husb, $level = 0) { $output = ''; - - $output.= $level." WIFE \n"; + + $output .= $level." WIFE \n"; // level up $level++; - + // AGE $age = $husb->getAge(); - if(!empty($age)){ - $output.=$level." AGE ".$age."\n"; + if (!empty($age)) { + $output .= $level.' AGE '.$age."\n"; } - + return $output; } } diff --git a/library/PhpGedcom/Writer/Fam/Even/Wife.php b/library/PhpGedcom/Writer/Fam/Even/Wife.php index 02163d10..d9cb0644 100644 --- a/library/PhpGedcom/Writer/Fam/Even/Wife.php +++ b/library/PhpGedcom/Writer/Fam/Even/Wife.php @@ -1,43 +1,41 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer\Fam\Even; -/** - * - */ class Wife { /** * @param \PhpGedcom\Record\Fam\Even\Wife $attr - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Fam\Even\Wife &$wife, $level = 0) { $output = ''; - - $output.= $level." HUSB \n"; + + $output .= $level." HUSB \n"; // level up $level++; - + // AGE $age = $wife->getAge(); - if(!empty($age)){ - $output.=$level." AGE ".$age."\n"; + if (!empty($age)) { + $output .= $level.' AGE '.$age."\n"; } - + return $output; } } diff --git a/library/PhpGedcom/Writer/Fam/Slgs.php b/library/PhpGedcom/Writer/Fam/Slgs.php index 4923b98a..d9b00f59 100644 --- a/library/PhpGedcom/Writer/Fam/Slgs.php +++ b/library/PhpGedcom/Writer/Fam/Slgs.php @@ -1,78 +1,76 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer\Fam; -/** - * - */ class Slgs { /** * @param \PhpGedcom\Record\Fam\Slgs $slgs - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Fam\Slgs &$slgs, $level) { - $output = ""; - $output.=$level." SLGS \n"; - + $output = ''; + $output .= $level." SLGS \n"; + // Level up $level++; // $STAT; $stat = $slgs->getStat(); - if(!empty($stat)){ - $output.=$level." STAT ".$stat."\n"; + if (!empty($stat)) { + $output .= $level.' STAT '.$stat."\n"; } // $date; $date = $slgs->getDate(); - if(!empty($date)){ - $output.=$level." DATE ".$date."\n"; + if (!empty($date)) { + $output .= $level.' DATE '.$date."\n"; } - + // PLAC $plac = $slgs->getPlac(); - if(!empty($plac)){ - $output.=$level." PLAC ".$plac."\n"; + if (!empty($plac)) { + $output .= $level.' PLAC '.$plac."\n"; } // $TEMP; $temp = $slgs->getTemp(); - if(!empty($temp)){ - $output.=$level." TEMP ".$temp."\n"; + if (!empty($temp)) { + $output .= $level.' TEMP '.$temp."\n"; } // $sour = array(); $sour = $slgs->getSour(); - if(!empty($sour) && count($sour) > 0){ - foreach($sour as $item){ + if (!empty($sour) && count($sour) > 0) { + foreach ($sour as $item) { $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // $note = array(); $note = $slgs->getNote(); - if(!empty($note) && count($note) > 0){ - foreach($note as $item){ + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } - + return $output; } } diff --git a/library/PhpGedcom/Writer/Head.php b/library/PhpGedcom/Writer/Head.php index 4f51f295..2d22eb3f 100644 --- a/library/PhpGedcom/Writer/Head.php +++ b/library/PhpGedcom/Writer/Head.php @@ -1,114 +1,110 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer; -/** - * - */ class Head { /** * @param \PhpGedcom\Record\Head $head - * @param string $format + * @param string $format + * * @return string */ public static function convert(\PhpGedcom\Record\Head &$head, $format = self::GEDCOM55) { - $level = 0; - $output = $level." HEAD\n"; - - // level up - $level++; + $level = 0; + $output = $level." HEAD\n"; - //SOUR - $sour = $head->getSour(); - if($sour){ - $_convert = \PhpGedcom\Writer\Head\Sour::convert($sour, $level); - $output.=$_convert; - } - - // DEST - $dest = $head->getDest(); - if($dest){ - $output.=$level." DEST ".$dest."\n"; - } + // level up + $level++; - //Subm - $subm = $head->getSubm(); - if($subm){ - $output.=$level." SUBM ".$subm."\n"; - } + //SOUR + $sour = $head->getSour(); + if ($sour) { + $_convert = \PhpGedcom\Writer\Head\Sour::convert($sour, $level); + $output .= $_convert; + } - // SUBN - $subn = $head->getSubn(); - if($subn){ - $output.=$level." SUBN ".$subn."\n"; - } + // DEST + $dest = $head->getDest(); + if ($dest) { + $output .= $level.' DEST '.$dest."\n"; + } - // FILE - $file = $head->getFile(); - if($file){ - $output.=$level." FILE ".$file."\n"; - } + //Subm + $subm = $head->getSubm(); + if ($subm) { + $output .= $level.' SUBM '.$subm."\n"; + } - // COPR - $copr = $head->getCopr(); - if($copr){ - $output.=$level." COPR ".$copr."\n"; - } + // SUBN + $subn = $head->getSubn(); + if ($subn) { + $output .= $level.' SUBN '.$subn."\n"; + } - // LANG - $lang = $head->getLang(); - if($lang){ - $output.=$level." LANG ".$lang."\n"; - } - // DATE - $date = $head->getDate(); - if($date){ - $_convert = \PhpGedcom\Writer\Head\Date::convert($date, $level); - $output.=$_convert; - } + // FILE + $file = $head->getFile(); + if ($file) { + $output .= $level.' FILE '.$file."\n"; + } + // COPR + $copr = $head->getCopr(); + if ($copr) { + $output .= $level.' COPR '.$copr."\n"; + } - // GEDC - $gedc = $head->getGedc(); - if($gedc){ - $_convert = \PhpGedcom\Writer\Head\Gedc::convert($gedc, $level); - $output.=$_convert; - } + // LANG + $lang = $head->getLang(); + if ($lang) { + $output .= $level.' LANG '.$lang."\n"; + } + // DATE + $date = $head->getDate(); + if ($date) { + $_convert = \PhpGedcom\Writer\Head\Date::convert($date, $level); + $output .= $_convert; + } + // GEDC + $gedc = $head->getGedc(); + if ($gedc) { + $_convert = \PhpGedcom\Writer\Head\Gedc::convert($gedc, $level); + $output .= $_convert; + } - // CHAR - $char = $head->getChar(); - if($char){ - $_convert = \PhpGedcom\Writer\Head\Char::convert($char, $level); - $output.=$_convert; - } - // PLAC - $plac = $head->getPlac(); - if($plac){ - $_convert = \PhpGedcom\Writer\Head\Plac::convert($plac, $level); - $output.=$_convert; - } + // CHAR + $char = $head->getChar(); + if ($char) { + $_convert = \PhpGedcom\Writer\Head\Char::convert($char, $level); + $output .= $_convert; + } + // PLAC + $plac = $head->getPlac(); + if ($plac) { + $_convert = \PhpGedcom\Writer\Head\Plac::convert($plac, $level); + $output .= $_convert; + } - // NOTE - $note = $head->getNote(); - if($note){ - $output.=$level." NOTE ".$note."\n"; - } - // + // NOTE + $note = $head->getNote(); + if ($note) { + $output .= $level.' NOTE '.$note."\n"; + } + // /* +1 SUBM @@ {1:1} +1 SUBN @@ {0:1} @@ -125,7 +121,7 @@ public static function convert(\PhpGedcom\Record\Head &$head, $format = self::GE +1 NOTE {0:1} +2 [CONT|CONC] {0:M} */ - + return $output; } } diff --git a/library/PhpGedcom/Writer/Head/Char.php b/library/PhpGedcom/Writer/Head/Char.php index a606d0a1..15bdc888 100644 --- a/library/PhpGedcom/Writer/Head/Char.php +++ b/library/PhpGedcom/Writer/Head/Char.php @@ -1,38 +1,36 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer\Head; -/** - * - */ class Char { /** * @param \PhpGedcom\Record\Head\Char $char - * @param string $format - * @param int $level + * @param string $format + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Head\Char &$char, $level) { - $output =""; + $output = ''; // char $_char = $char->getChar(); - if($_char){ - $output.=$level." CHAR ".$_char."\n"; - }else{ + if ($_char) { + $output .= $level.' CHAR '.$_char."\n"; + } else { return $output; } @@ -40,11 +38,10 @@ public static function convert(\PhpGedcom\Record\Head\Char &$char, $level) $level++; // VERS $vers = $char->getVersion(); - if($vers){ - $output.=$level." VERS ".$vers."\n"; + if ($vers) { + $output .= $level.' VERS '.$vers."\n"; } - return $output; } } diff --git a/library/PhpGedcom/Writer/Head/Date.php b/library/PhpGedcom/Writer/Head/Date.php index b4c3d3e9..0459dd32 100644 --- a/library/PhpGedcom/Writer/Head/Date.php +++ b/library/PhpGedcom/Writer/Head/Date.php @@ -1,37 +1,35 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer\Head; -/** - * - */ class Date { /** * @param \PhpGedcom\Record\Head\Date $date - * @param string $format - * @param int $level + * @param string $format + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Head\Date &$date, $level) { - $output = ""; + $output = ''; $_date = $date->getDate(); - if($_date){ - $output .=$level." DATE ".$_date."\n"; - }else{ + if ($_date) { + $output .= $level.' DATE '.$_date."\n"; + } else { return $output; } @@ -39,8 +37,8 @@ public static function convert(\PhpGedcom\Record\Head\Date &$date, $level) $level++; // Time $time = $date->getTime(); - if($time){ - $output.=$level." TIME ".$time."\n"; + if ($time) { + $output .= $level.' TIME '.$time."\n"; } return $output; diff --git a/library/PhpGedcom/Writer/Head/Gedc.php b/library/PhpGedcom/Writer/Head/Gedc.php index eb73235b..3514c14a 100644 --- a/library/PhpGedcom/Writer/Head/Gedc.php +++ b/library/PhpGedcom/Writer/Head/Gedc.php @@ -1,47 +1,46 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer\Head; -/** - * - */ class Gedc { /** * @param \PhpGedcom\Record\Head\Gedc $gedc - * @param string $format - * @param int $level + * @param string $format + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Head\Gedc &$gedc, $level) { $output = $level." GEDC \n"; - + // level up $level++; // VERS $vers = $gedc->getVersion(); - if($vers){ - $output.=$level." VERS ".$vers."\n"; + if ($vers) { + $output .= $level.' VERS '.$vers."\n"; } // FORM $form = $gedc->getForm(); - if($form){ - $output.=$level." FORM ".$form."\n"; + if ($form) { + $output .= $level.' FORM '.$form."\n"; } + return $output; } } diff --git a/library/PhpGedcom/Writer/Head/Plac.php b/library/PhpGedcom/Writer/Head/Plac.php index 275f3cdd..ef3a1b8a 100644 --- a/library/PhpGedcom/Writer/Head/Plac.php +++ b/library/PhpGedcom/Writer/Head/Plac.php @@ -1,28 +1,26 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer\Head; -/** - * - */ class Plac { /** * @param \PhpGedcom\Record\Head\Plac $plac - * @param string $format - * @param int $level + * @param string $format + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Head\Plac &$plac, $level) @@ -33,10 +31,10 @@ public static function convert(\PhpGedcom\Record\Head\Plac &$plac, $level) $level++; // FORM $form = $plac->getForm(); - if($form){ - $output.=$level." FORM ".$form."\n"; + if ($form) { + $output .= $level.' FORM '.$form."\n"; } - + return $output; } } diff --git a/library/PhpGedcom/Writer/Head/Sour.php b/library/PhpGedcom/Writer/Head/Sour.php index 1b76325a..d5d38258 100644 --- a/library/PhpGedcom/Writer/Head/Sour.php +++ b/library/PhpGedcom/Writer/Head/Sour.php @@ -1,37 +1,35 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @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 + * @param string $format + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Head\Sour &$sour, $level) { - $output = ""; + $output = ''; $_sour = $sour->getSour(); - if($_sour){ - $output.=$level." SOUR ".$_sour."\n"; - }else{ + if ($_sour) { + $output .= $level.' SOUR '.$_sour."\n"; + } else { return $output; } @@ -40,29 +38,30 @@ public static function convert(\PhpGedcom\Record\Head\Sour &$sour, $level) // VERS $vers = $sour->getVersion(); - if($vers){ - $output.=$level." VERS ".$vers."\n"; + if ($vers) { + $output .= $level.' VERS '.$vers."\n"; } // NAME $name = $sour->getName(); - if($name){ - $output.=$level." NAME ".$name."\n"; + if ($name) { + $output .= $level.' NAME '.$name."\n"; } // CORP $corp = $sour->getCorp(); - if($corp){ + if ($corp) { $_convert = \PhpGedcom\Writer\Head\Sour\Corp::convert($corp, $level); - $output.=$_convert; + $output .= $_convert; } // DATA $data = $sour->getData(); - if($data){ + if ($data) { $_convert = \PhpGedcom\Writer\Head\Sour\Data::convert($data, $level); - $output.=$_convert; + $output .= $_convert; } + return $output; } } diff --git a/library/PhpGedcom/Writer/Head/Sour/Corp.php b/library/PhpGedcom/Writer/Head/Sour/Corp.php index 83c9094c..07f795c9 100644 --- a/library/PhpGedcom/Writer/Head/Sour/Corp.php +++ b/library/PhpGedcom/Writer/Head/Sour/Corp.php @@ -1,37 +1,35 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @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 + * @param string $format + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Head\Sour\Corp &$corp, $level) { - $output = ""; + $output = ''; $_corp = $corp->getCorp(); - if($_corp){ - $output.=$level." CORP ".$_corp."\n"; - }else{ + if ($_corp) { + $output .= $level.' CORP '.$_corp."\n"; + } else { return $output; } @@ -40,18 +38,18 @@ public static function convert(\PhpGedcom\Record\Head\Sour\Corp &$corp, $level) // ADDR $addr = $corp->getAddr(); - if($addr){ + if ($addr) { $_convert = \PhpGedcom\Writer\Addr::convert($addr, $level); - $output.=$_convert; + $output .= $_convert; } // phon $phon = $corp->getPhon(); - if($phon && count($phon) > 0){ - foreach($phon as $item){ - if($item){ + if ($phon && count($phon) > 0) { + foreach ($phon as $item) { + if ($item) { $_convert = \PhpGedcom\Writer\Phon::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } } diff --git a/library/PhpGedcom/Writer/Head/Sour/Data.php b/library/PhpGedcom/Writer/Head/Sour/Data.php index 66186ae1..90307666 100644 --- a/library/PhpGedcom/Writer/Head/Sour/Data.php +++ b/library/PhpGedcom/Writer/Head/Sour/Data.php @@ -1,37 +1,35 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer\Head\Sour; -/** - * - */ class Data { /** * @param \PhpGedcom\Record\Head\Sour\Data $data - * @param string $format - * @param int $level + * @param string $format + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Head\Sour\Data &$data, $level) { - $output = ""; + $output = ''; $_data = $data->getData(); - if($_data){ - $output.=$level." DATA ".$_data."\n"; - }else{ + if ($_data) { + $output .= $level.' DATA '.$_data."\n"; + } else { return $output; } @@ -40,14 +38,14 @@ public static function convert(\PhpGedcom\Record\Head\Sour\Data &$data, $level) // DATE $date = $corp->getDate(); - if($date){ - $output.=$level." DATE ".$date."\n"; + if ($date) { + $output .= $level.' DATE '.$date."\n"; } // COPR $corp = $corp->getCorp(); - if($corp){ - $output.=$level." COPR ".$corp."\n"; + if ($corp) { + $output .= $level.' COPR '.$corp."\n"; } return $output; diff --git a/library/PhpGedcom/Writer/Indi.php b/library/PhpGedcom/Writer/Indi.php index fb44c1c5..9e3d1c0b 100644 --- a/library/PhpGedcom/Writer/Indi.php +++ b/library/PhpGedcom/Writer/Indi.php @@ -1,27 +1,25 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer; -/** - * - */ class Indi { /** * @param \PhpGedcom\Record\Indi $indi - * @param string $format + * @param string $format + * * @return string */ public static function convert(\PhpGedcom\Record\Indi &$indi) @@ -30,7 +28,7 @@ public static function convert(\PhpGedcom\Record\Indi &$indi) // id $id = $indi->getId(); - $output = $level." @".$id."@ INDI\n"; + $output = $level.' @'.$id."@ INDI\n"; // increase level after start indi $level++; @@ -43,170 +41,170 @@ public static function convert(\PhpGedcom\Record\Indi &$indi) // chan $chan = $indi->getChan(); - if(!empty($chan)){ - $output .= $level." CHAN ".$chan."\n"; + if (!empty($chan)) { + $output .= $level.' CHAN '.$chan."\n"; } // $attr // PhpGedcom/Record/Attr extend PhpGedcom/Record/Even and there is no change. // So used convert Even $attr = $indi->getAllAttr(); - if(!empty($attr) && count($attr) > 0){ - foreach($attr as $item){ + if (!empty($attr) && count($attr) > 0) { + foreach ($attr as $item) { $_convert = \PhpGedcom\Writer\Indi\Even::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // $even $even = $indi->getAllEven(); - if(!empty($even) && count($even) > 0){ - foreach($even as $item){ + if (!empty($even) && count($even) > 0) { + foreach ($even as $item) { $_convert = \PhpGedcom\Writer\Indi\Even::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // $note $note = $indi->getNote(); - if(!empty($note) && count($note) > 0){ - foreach($note as $item){ + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // $obje $obje = $indi->getObje(); - if(!empty($obje) && count($obje) > 0){ - foreach($obje as $item){ + if (!empty($obje) && count($obje) > 0) { + foreach ($obje as $item) { $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // $sour $sour = $indi->getSour(); - if(!empty($sour) && count($sour) > 0){ - foreach($sour as $item){ + if (!empty($sour) && count($sour) > 0) { + foreach ($sour as $item) { $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // $name $name = $indi->getName(); - if(!empty($name) && count($name) > 0){ - foreach($name as $item){ + if (!empty($name) && count($name) > 0) { + foreach ($name as $item) { $_convert = \PhpGedcom\Writer\Indi\Name::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } - + // $alia $alia = $indi->getAlia(); - if(!empty($alia) && count($alia) > 0){ - foreach($alia as $item){ - if(!empty($item)){ - $_convert = $level." ALIA ".$item."\n"; - $output.=$_convert; + if (!empty($alia) && count($alia) > 0) { + foreach ($alia as $item) { + if (!empty($item)) { + $_convert = $level.' ALIA '.$item."\n"; + $output .= $_convert; } } } - + // $sex $sex = $indi->getSex(); - if(!empty($sex)){ - $output .= $level." SEX ".$sex."\n"; + if (!empty($sex)) { + $output .= $level.' SEX '.$sex."\n"; } // $rin $rin = $indi->getRin(); - if(!empty($rin)){ - $output .= $level." RIN ".$rin."\n"; + if (!empty($rin)) { + $output .= $level.' RIN '.$rin."\n"; } // $resn $resn = $indi->getResn(); - if(!empty($resn)){ - $output .= $level." RESN ".$resn."\n"; + if (!empty($resn)) { + $output .= $level.' RESN '.$resn."\n"; } // $rfn $rfn = $indi->getRfn(); - if(!empty($rfn)){ - $output .= $level." RFN ".$rfn."\n"; + if (!empty($rfn)) { + $output .= $level.' RFN '.$rfn."\n"; } // $afn $afn = $indi->getAfn(); - if(!empty($afn)){ - $output .= $level." AFN ".$afn."\n"; + if (!empty($afn)) { + $output .= $level.' AFN '.$afn."\n"; } // Fams[] $fams = $indi->getFams(); - if(!empty($fams) && count($fams) > 0){ - foreach($fams as $item){ + if (!empty($fams) && count($fams) > 0) { + foreach ($fams as $item) { $_convert = \PhpGedcom\Writer\Indi\Fams::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // Famc[] $famc = $indi->getFamc(); - if(!empty($famc) && count($famc) > 0){ - foreach($famc as $item){ + if (!empty($famc) && count($famc) > 0) { + foreach ($famc as $item) { $_convert = \PhpGedcom\Writer\Indi\Famc::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // Asso[] $asso = $indi->getAsso(); - if(!empty($asso) && count($asso) > 0){ - foreach($asso as $item){ + if (!empty($asso) && count($asso) > 0) { + foreach ($asso as $item) { $_convert = \PhpGedcom\Writer\Indi\Asso::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // $subm $subm = $indi->getSubm(); - if(!empty($subm) && count($subm) > 0){ - foreach($subm as $item){ - if(!empty($item)){ - $_convert = $level." SUBM ".$item."\n"; - $output.=$_convert; + if (!empty($subm) && count($subm) > 0) { + foreach ($subm as $item) { + if (!empty($item)) { + $_convert = $level.' SUBM '.$item."\n"; + $output .= $_convert; } } } // $anci $anci = $indi->getAnci(); - if(!empty($anci) && count($anci) > 0){ - foreach($anci as $item){ - $_convert = $level." ANCI ".$item."\n"; - $output.=$_convert; + if (!empty($anci) && count($anci) > 0) { + foreach ($anci as $item) { + $_convert = $level.' ANCI '.$item."\n"; + $output .= $_convert; } } // $desi $desi = $indi->getDesi(); - if(!empty($desi) && count($desi) > 0){ - foreach($desi as $item){ - $_convert = $level." DESI ".$item."\n"; - $output.=$_convert; + if (!empty($desi) && count($desi) > 0) { + foreach ($desi as $item) { + $_convert = $level.' DESI '.$item."\n"; + $output .= $_convert; } } // Refn[] $refn = $indi->getRefn(); - if(!empty($refn) && count($refn) > 0){ - foreach($refn as $item){ + if (!empty($refn) && count($refn) > 0) { + foreach ($refn as $item) { $_convert = \PhpGedcom\Writer\Refn::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } @@ -217,7 +215,7 @@ public static function convert(\PhpGedcom\Record\Indi &$indi) // $_convert = \PhpGedcom\Writer\Indi\Bapl::convert($bapl, $level); // $output.=$_convert; // } - + // Conl // Currently Conl is empty // $conl = $indi->getConl(); diff --git a/library/PhpGedcom/Writer/Indi/Asso.php b/library/PhpGedcom/Writer/Indi/Asso.php index 1f68c424..dc922e6c 100644 --- a/library/PhpGedcom/Writer/Indi/Asso.php +++ b/library/PhpGedcom/Writer/Indi/Asso.php @@ -1,27 +1,25 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer\Indi; -/** - * - */ class Asso { /** * @param \PhpGedcom\Record\Indi\Asso $attr - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Indi\Asso &$asso, $level = 0) @@ -29,33 +27,33 @@ public static function convert(\PhpGedcom\Record\Indi\Asso &$asso, $level = 0) $output = ''; // _indi $_indi = $asso->getIndi(); - if(empty($_indi)){ + if (empty($_indi)) { return $output; } - $output.= $level." ASSO ".$_indi."\n"; + $output .= $level.' ASSO '.$_indi."\n"; // level up $level++; - + // RELA $rela = $asso->getRela(); - if(!empty($rela)){ - $output.=$level." RELA ".$rela."\n"; + if (!empty($rela)) { + $output .= $level.' RELA '.$rela."\n"; } // sour $sour = $asso->getSour(); - if(!empty($sour) && count($sour) > 0){ - foreach($sour as $item){ + if (!empty($sour) && count($sour) > 0) { + foreach ($sour as $item) { $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // note $note = $asso->getSour(); - if(!empty($note) && count($note) > 0){ - foreach($note as $item){ + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } diff --git a/library/PhpGedcom/Writer/Indi/Attr.php b/library/PhpGedcom/Writer/Indi/Attr.php index 62071004..5b27b78b 100644 --- a/library/PhpGedcom/Writer/Indi/Attr.php +++ b/library/PhpGedcom/Writer/Indi/Attr.php @@ -1,32 +1,31 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer\Indi; -/** - * - */ class Attr { /** * @param \PhpGedcom\Record\Indi\Attr $attr - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Indi\Attr &$attr, $level = 0) { - $output = ''; + $output = ''; + return $output; } } diff --git a/library/PhpGedcom/Writer/Indi/Even.php b/library/PhpGedcom/Writer/Indi/Even.php index 8f4d8772..0221d77d 100644 --- a/library/PhpGedcom/Writer/Indi/Even.php +++ b/library/PhpGedcom/Writer/Indi/Even.php @@ -1,92 +1,90 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer\Indi; -/** - * - */ class Even { /** * @param \PhpGedcom\Record\Indi\Even $even - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Indi\Even &$even, $level = 0) { - $output = ""; + $output = ''; // $_attr; $attr = $even->getAttr(); - if(!empty($attr)){ - $output.=$level." EVEN ".$attr."\n"; - }else{ + if (!empty($attr)) { + $output .= $level.' EVEN '.$attr."\n"; + } else { $output = $level." EVEN\n"; } $level++; // $type; $type = $even->getType(); - if(!empty($type)){ - $output.=$level." TYPE ".$type."\n"; + if (!empty($type)) { + $output .= $level.' TYPE '.$type."\n"; } // $date; $date = $even->getDate(); - if(!empty($date)){ - $output.=$level." DATE ".$date."\n"; + if (!empty($date)) { + $output .= $level.' DATE '.$date."\n"; } - + // Plac $plac = $even->getPlac(); - if(!empty($plac)){ + if (!empty($plac)) { $_convert = \PhpGedcom\Writer\Indi\Even\Plac::convert($plac, $level); - $output.=$_convert; + $output .= $_convert; } // $caus; $caus = $even->getCaus(); - if(!empty($caus)){ - $output.=$level." CAUS ".$caus."\n"; + if (!empty($caus)) { + $output .= $level.' CAUS '.$caus."\n"; } // $age; $age = $even->getAge(); - if(!empty($age)){ - $output.=$level." AGE ".$age."\n"; + if (!empty($age)) { + $output .= $level.' AGE '.$age."\n"; } // $addr $addr = $even->getAddr(); - if(!empty($addr)){ + if (!empty($addr)) { $_convert = \PhpGedcom\Writer\Addr::convert($addr, $level); - $output.=$_convert; + $output .= $_convert; } // $phon = array() $phon = $even->getPhon(); - if(!empty($phon) && count($phon) > 0){ - foreach($phon as $item){ + if (!empty($phon) && count($phon) > 0) { + foreach ($phon as $item) { $_convert = \PhpGedcom\Writer\Phon::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // $agnc $agnc = $even->getAgnc(); - if(!empty($agnc)){ - $output.=$level." AGNC ".$agnc."\n"; + if (!empty($agnc)) { + $output .= $level.' AGNC '.$agnc."\n"; } // $ref = array(); @@ -94,34 +92,35 @@ public static function convert(\PhpGedcom\Record\Indi\Even &$even, $level = 0) // $obje = array(); $obje = $even->getObje(); - if(!empty($obje) && count($obje) > 0){ - foreach($obje as $item){ + if (!empty($obje) && count($obje) > 0) { + foreach ($obje as $item) { $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // $sour = array(); $sour = $even->getSour(); - if(!empty($sour) && count($sour) > 0){ - foreach($sour as $item){ + if (!empty($sour) && count($sour) > 0) { + foreach ($sour as $item) { $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // $note = array(); $note = $even->getSour(); - if(!empty($note) && count($note) > 0){ - foreach($note as $item){ + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // Record\Chan $chan = $even->getChan(); - if(!empty($chan) ){ + if (!empty($chan)) { $_convert = \PhpGedcom\Writer\Chan::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } + return $output; } } diff --git a/library/PhpGedcom/Writer/Indi/Even/Plac.php b/library/PhpGedcom/Writer/Indi/Even/Plac.php index 214de658..5d74dc26 100644 --- a/library/PhpGedcom/Writer/Indi/Even/Plac.php +++ b/library/PhpGedcom/Writer/Indi/Even/Plac.php @@ -1,27 +1,25 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer\Indi\Even; -/** - * - */ class Plac { /** * @param \PhpGedcom\Record\Indi\Even\Plac $plac - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Indi\Even\Plac &$plac, $level = 0) @@ -30,9 +28,9 @@ public static function convert(\PhpGedcom\Record\Indi\Even\Plac &$plac, $level = // $plac $_plac = $plac->getPlac(); - if(!empty($_plac)){ - $output .= $level." PLAC ".$_plac."\n"; - }else{ + if (!empty($_plac)) { + $output .= $level.' PLAC '.$_plac."\n"; + } else { $output .= $level." PLAC\n"; } @@ -41,26 +39,27 @@ public static function convert(\PhpGedcom\Record\Indi\Even\Plac &$plac, $level = // $form $form = $plac->getForm(); - if(!empty($form)){ - $output .= $level." FORM ".$form."\n"; + if (!empty($form)) { + $output .= $level.' FORM '.$form."\n"; } // $note -array $note = $plac->getNote(); - if($note && count($note) > 0){ - foreach($note as $item){ + if ($note && count($note) > 0) { + foreach ($note as $item) { $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output.= $_convert; + $output .= $_convert; } } // $sour -array $sour = $plac->getSour(); - if($sour && count($sour) > 0){ - foreach($sour as $item){ + if ($sour && count($sour) > 0) { + foreach ($sour as $item) { $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); - $output.= $_convert; + $output .= $_convert; } } + return $output; } } diff --git a/library/PhpGedcom/Writer/Indi/Famc.php b/library/PhpGedcom/Writer/Indi/Famc.php index f4daec9e..9d67421b 100644 --- a/library/PhpGedcom/Writer/Indi/Famc.php +++ b/library/PhpGedcom/Writer/Indi/Famc.php @@ -1,27 +1,25 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer\Indi; -/** - * - */ class Famc { /** * @param \PhpGedcom\Record\Indi\Famc $attr - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Indi\Famc &$famc, $level = 0) @@ -29,25 +27,25 @@ public static function convert(\PhpGedcom\Record\Indi\Famc &$famc, $level = 0) $output = ''; // NAME $_famc = $famc->getFams(); - if(empty($_fams)){ + if (empty($_fams)) { return $output; } - $output.= $level." FAMC @".$_famc."@\n"; + $output .= $level.' FAMC @'.$_famc."@\n"; // level up $level++; - + // PEDI $pedi = $famc->getPedi(); - if(!empty($pedi)){ - $output.=$level." PEDI ".$pedi."\n"; + if (!empty($pedi)) { + $output .= $level.' PEDI '.$pedi."\n"; } - + // note $note = $famc->getSour(); - if(!empty($note) && count($note) > 0){ - foreach($note as $item){ + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } diff --git a/library/PhpGedcom/Writer/Indi/Fams.php b/library/PhpGedcom/Writer/Indi/Fams.php index 5454c717..3a29b758 100644 --- a/library/PhpGedcom/Writer/Indi/Fams.php +++ b/library/PhpGedcom/Writer/Indi/Fams.php @@ -1,27 +1,25 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer\Indi; -/** - * - */ class Fams { /** * @param \PhpGedcom\Record\Indi\Fams $attr - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Indi\Fams &$fams, $level = 0) @@ -29,19 +27,19 @@ public static function convert(\PhpGedcom\Record\Indi\Fams &$fams, $level = 0) $output = ''; // NAME $_fams = $fams->getFams(); - if(empty($_fams)){ + if (empty($_fams)) { return $output; } - $output.= $level." FAMS @".$_fams."@\n"; + $output .= $level.' FAMS @'.$_fams."@\n"; // level up $level++; - + // note $note = $fams->getNote(); - if(!empty($note) && count($note) > 0){ - foreach($note as $item){ + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } diff --git a/library/PhpGedcom/Writer/Indi/Name.php b/library/PhpGedcom/Writer/Indi/Name.php index b5dae323..e9c6af1f 100644 --- a/library/PhpGedcom/Writer/Indi/Name.php +++ b/library/PhpGedcom/Writer/Indi/Name.php @@ -1,27 +1,25 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer\Indi; -/** - * - */ class Name { /** * @param \PhpGedcom\Record\Indi\Name $attr - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Indi\Name &$name, $level = 0) @@ -29,58 +27,58 @@ public static function convert(\PhpGedcom\Record\Indi\Name &$name, $level = 0) $output = ''; // NAME $_name = $name->getName(); - if(empty($_name)){ + if (empty($_name)) { return $output; } - $output.= $level." NAME ".$_name."\n"; + $output .= $level.' NAME '.$_name."\n"; // level up $level++; - + // NPFX $npfx = $name->getNpfx(); - if(!empty($npfx)){ - $output.=$level." NPFX ".$npfx."\n"; + if (!empty($npfx)) { + $output .= $level.' NPFX '.$npfx."\n"; } // GIVN $givn = $name->getGivn(); - if(!empty($givn)){ - $output.=$level." GIVN ".$givn."\n"; + if (!empty($givn)) { + $output .= $level.' GIVN '.$givn."\n"; } // NICK $nick = $name->getNick(); - if(!empty($nick)){ - $output.=$level." NICK ".$nick."\n"; + if (!empty($nick)) { + $output .= $level.' NICK '.$nick."\n"; } // SPFX $spfx = $name->getSpfx(); - if(!empty($spfx)){ - $output.=$level." SPFX ".$spfx."\n"; + if (!empty($spfx)) { + $output .= $level.' SPFX '.$spfx."\n"; } // SURN $surn = $name->getSurn(); - if(!empty($surn)){ - $output.=$level." SURN ".$surn."\n"; + if (!empty($surn)) { + $output .= $level.' SURN '.$surn."\n"; } // NSFX $nsfx = $name->getNsfx(); - if(!empty($nsfx)){ - $output.=$level." NSFX ".$nsfx."\n"; + if (!empty($nsfx)) { + $output .= $level.' NSFX '.$nsfx."\n"; } // SOUR $sour = $name->getSour(); - if(!empty($sour) && count($sour) > 0){ - foreach($sour as $item){ + if (!empty($sour) && count($sour) > 0) { + foreach ($sour as $item) { $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // note $note = $name->getSour(); - if(!empty($note) && count($note) > 0){ - foreach($note as $item){ + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } diff --git a/library/PhpGedcom/Writer/Note.php b/library/PhpGedcom/Writer/Note.php index 71298a49..f01a8119 100644 --- a/library/PhpGedcom/Writer/Note.php +++ b/library/PhpGedcom/Writer/Note.php @@ -1,78 +1,76 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer; -/** - * - */ class Note { /** * @param \PhpGedcom\Record\Note $sour - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Note &$note) { $level = 0; - $output = ""; + $output = ''; $id = $note->getId(); - if(!empty($id)){ - $output.= $level." ".$id." "." NOTE \n"; - }else{ + if (!empty($id)) { + $output .= $level.' '.$id.' '." NOTE \n"; + } else { return $output; } - + // Level Up $level++; // RIN $rin = $note->getRin(); - if($rin){ - $output.=$level." RIN ".$rin."\n"; + if ($rin) { + $output .= $level.' RIN '.$rin."\n"; } // cont $cont = $note->getNote(); - if($cont){ - $output.=$level." CONT ".$cont."\n"; + if ($cont) { + $output .= $level.' CONT '.$cont."\n"; } // REFN $refn = $note->getRefn(); - if(!empty($refn) && count($refn) > 0) { - foreach($refn as $item){ - if($item){ + if (!empty($refn) && count($refn) > 0) { + foreach ($refn as $item) { + if ($item) { $_convert = \PhpGedcom\Writer\Refn::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } } // CHAN $chan = $note->getChan(); - if($chan){ + if ($chan) { $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level); - $output.=$_convert; + $output .= $_convert; } // SOUR array $sour = $note->getSour(); - if(!empty($sour) && count($sour) > 0) { - foreach($sour as $item){ - if($item){ + if (!empty($sour) && count($sour) > 0) { + foreach ($sour as $item) { + if ($item) { $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } } diff --git a/library/PhpGedcom/Writer/NoteRef.php b/library/PhpGedcom/Writer/NoteRef.php index 508c64e5..40825a45 100644 --- a/library/PhpGedcom/Writer/NoteRef.php +++ b/library/PhpGedcom/Writer/NoteRef.php @@ -1,48 +1,47 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer; -/** - * - */ class NoteRef { /** * @param \PhpGedcom\Record\NoteRef $note - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\NoteRef &$note, $level) { - $output = ""; + $output = ''; // $_note $_note = $note->getNote(); - if(!empty($_note)){ - $output.=$level." NOTE ".$_note."\n"; + if (!empty($_note)) { + $output .= $level.' NOTE '.$_note."\n"; } $level++; // $sour $sour = $note->getSour(); - if($sour && count($sour) > 0){ - foreach($sour as $item){ + if ($sour && count($sour) > 0) { + foreach ($sour as $item) { $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } + return $output; } } diff --git a/library/PhpGedcom/Writer/Obje.php b/library/PhpGedcom/Writer/Obje.php index 940e700f..d26adc2c 100644 --- a/library/PhpGedcom/Writer/Obje.php +++ b/library/PhpGedcom/Writer/Obje.php @@ -1,37 +1,35 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer; -/** - * - */ class Obje { /** * @param \PhpGedcom\Record\Obje $sour - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Obje &$obje) { $level = 0; - $output = ""; + $output = ''; $id = $obje->getId(); - if($id){ - $output.=$level." ".$id." OBJE\n"; - }else{ + if ($id) { + $output .= $level.' '.$id." OBJE\n"; + } else { return $output; } @@ -40,67 +38,67 @@ public static function convert(\PhpGedcom\Record\Obje &$obje) // FORM $form = $obje->getName(); - if($form){ - $output.=$level." FORM ".$form."\n"; + if ($form) { + $output .= $level.' FORM '.$form."\n"; } // TITL $titl = $obje->getTitl(); - if($titl){ - $output.=$level." TITL ".$titl."\n"; + if ($titl) { + $output .= $level.' TITL '.$titl."\n"; } - // OBJE + // OBJE // This is same as FORM // RIN $rin = $obje->getRin(); - if($rin){ - $output.=$level." RIN ".$rin."\n"; + if ($rin) { + $output .= $level.' RIN '.$rin."\n"; } // REFN $refn = $obje->getRefn(); - if(!empty($refn) && count($refn) > 0) { - foreach($refn as $item){ - if($item){ + if (!empty($refn) && count($refn) > 0) { + foreach ($refn as $item) { + if ($item) { $_convert = \PhpGedcom\Writer\Refn::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } } // BLOB $blob = $obje->getBlob(); - if($blob){ - $output.=$level." BLOB ".$blob."\n"; + if ($blob) { + $output .= $level.' BLOB '.$blob."\n"; } // NOTE $note = $obje->getNote(); - if($note && count($note) > 0) { - foreach($note as $item){ - if($item){ + if ($note && count($note) > 0) { + foreach ($note as $item) { + if ($item) { $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } } // CHAN $chan = $obje->getChan(); - if($chan){ + if ($chan) { $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level); - $output.=$_convert; + $output .= $_convert; } // FILE $file = $obje->getFile(); - if($file){ - $output.=$level." FILE ".$file."\n"; + if ($file) { + $output .= $level.' FILE '.$file."\n"; } - // + // return $output; } } diff --git a/library/PhpGedcom/Writer/ObjeRef.php b/library/PhpGedcom/Writer/ObjeRef.php index e919dfe5..4d8b20de 100644 --- a/library/PhpGedcom/Writer/ObjeRef.php +++ b/library/PhpGedcom/Writer/ObjeRef.php @@ -1,68 +1,67 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer; -/** - * - */ class ObjeRef { /** * @param \PhpGedcom\Record\ObjeRef $note - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\ObjeRef &$obje, $level) { - $output = ""; + $output = ''; // $_note $_obje = $obje->getObje(); - if(!empty($_note)){ - $output.=$level." OBJE ".$_obje."\n"; - }else{ - $output.=$level." OBJE \n"; + if (!empty($_note)) { + $output .= $level.' OBJE '.$_obje."\n"; + } else { + $output .= $level." OBJE \n"; } $level++; // _form $_form = $obje->getForm(); - if(!empty($_form)){ - $output.=$level." FORM ".$_form."\n"; + if (!empty($_form)) { + $output .= $level.' FORM '.$_form."\n"; } // _titl $_titl = $obje->getTitl(); - if(!empty($_titl)){ - $output.=$level." TITL ".$_titl."\n"; + if (!empty($_titl)) { + $output .= $level.' TITL '.$_titl."\n"; } // _file $_file = $obje->getFile(); - if(!empty($_file)){ - $output.=$level." FILE ".$_file."\n"; + if (!empty($_file)) { + $output .= $level.' FILE '.$_file."\n"; } // $_note = array() $_note = $obje->getNote(); - if(!empty($_note) && count($_note) > 0){ - foreach($_note as $item){ + if (!empty($_note) && count($_note) > 0) { + foreach ($_note as $item) { $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } + return $output; } } diff --git a/library/PhpGedcom/Writer/Phon.php b/library/PhpGedcom/Writer/Phon.php index f731234d..fcd60c63 100644 --- a/library/PhpGedcom/Writer/Phon.php +++ b/library/PhpGedcom/Writer/Phon.php @@ -1,34 +1,32 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer; -/** - * - */ class Phon { /** * @param string $phon * @param string $format - * @param int $level + * @param int $level + * * @return string */ public static function convert($phon, $level = 1) { - $output = "{$level} PHON " . $phon . "\n"; - + $output = "{$level} PHON ".$phon."\n"; + return $output; } } diff --git a/library/PhpGedcom/Writer/Refn.php b/library/PhpGedcom/Writer/Refn.php index 299f8099..8eeed6f4 100644 --- a/library/PhpGedcom/Writer/Refn.php +++ b/library/PhpGedcom/Writer/Refn.php @@ -1,47 +1,44 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer; -/** - * - */ class Refn { /** * @param \PhpGedcom\Record\Refn $note - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Refn &$refn, $level) { - - $output = ""; + $output = ''; $_refn = $refn->getRefn(); - if(empty($_refn)){ + if (empty($_refn)) { return $output; - }else{ - $output.=$level." REFN ".$_refn."\n"; + } else { + $output .= $level.' REFN '.$_refn."\n"; } // level up $level++; // DATE $type = $refn->getType(); - if(!empty($type)){ - $output.=$level." TYPE ".$type."\n"; + if (!empty($type)) { + $output .= $level.' TYPE '.$type."\n"; } - + return $output; } } diff --git a/library/PhpGedcom/Writer/Repo.php b/library/PhpGedcom/Writer/Repo.php index 66d274d9..6a9797e1 100644 --- a/library/PhpGedcom/Writer/Repo.php +++ b/library/PhpGedcom/Writer/Repo.php @@ -1,37 +1,35 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer; -/** - * - */ class Repo { /** * @param \PhpGedcom\Record\Repo $sour - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Repo &$repo) { $level = 0; - $output = ""; + $output = ''; $_repo = $repo->getRepo(); - if($_repo){ - $output.=$level." ".$_repo." REPO\n"; - }else{ + if ($_repo) { + $output .= $level.' '.$_repo." REPO\n"; + } else { return $output; } @@ -40,58 +38,59 @@ public static function convert(\PhpGedcom\Record\Repo &$repo) //NAME $name = $repo->getName(); - if($name){ - $output.=$level." NAME ".$name."\n"; + if ($name) { + $output .= $level.' NAME '.$name."\n"; } - // ADDR + // ADDR $addr = $repo->getAddr(); - if($addr){ + if ($addr) { $_convert = \PhpGedcom\Writer\Addr::convert($addr, $level); - $output.=$_convert; + $output .= $_convert; } // PHON $phon = $repo->getPhon(); - if($phon){ + if ($phon) { $_convert = \PhpGedcom\Writer\Phon::convert($phon, $level); - $output.=$_convert; + $output .= $_convert; } // NOTE array $note = $repo->getNote(); - if($note && count($note) > 0) { - foreach($note as $item){ - if($item){ + if ($note && count($note) > 0) { + foreach ($note as $item) { + if ($item) { $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } } // REFN $refn = $repo->getRefn(); - if(!empty($refn) && count($refn) > 0) { - foreach($refn as $item){ - if($item){ + if (!empty($refn) && count($refn) > 0) { + foreach ($refn as $item) { + if ($item) { $_convert = \PhpGedcom\Writer\Refn::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } } // CHAN $chan = $repo->getChan(); - if($chan){ + if ($chan) { $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level); - $output.=$_convert; + $output .= $_convert; } // RIN $rin = $repo->getRin(); - if($rin){ - $output.=$level." RIN ".$rin."\n"; + if ($rin) { + $output .= $level.' RIN '.$rin."\n"; } + return $output; } } diff --git a/library/PhpGedcom/Writer/RepoRef.php b/library/PhpGedcom/Writer/RepoRef.php index 794a6962..cba8c1c2 100644 --- a/library/PhpGedcom/Writer/RepoRef.php +++ b/library/PhpGedcom/Writer/RepoRef.php @@ -1,57 +1,54 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer; -/** - * - */ class RepoRef { /** * @param \PhpGedcom\Record\RepoRef $reporef - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\RepoRef &$reporef, $level) { - - $output = ""; + $output = ''; $_repo = $reporef->getRepo(); - if(empty($_sour)){ + if (empty($_sour)) { return $output; - }else{ - $output.=$level." REPO ".$_repo."\n"; + } else { + $output .= $level.' REPO '.$_repo."\n"; } // level up $level++; - // Note array + // Note array $note = $reporef->getNote(); - if(!empty($note) && count($note) > 0){ - foreach($note as $item){ + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } - // _caln array + // _caln array $_caln = $reporef->getCaln(); - if(!empty($_caln) && count($_caln) > 0){ - foreach($_caln as $item){ + if (!empty($_caln) && count($_caln) > 0) { + foreach ($_caln as $item) { $_convert = \PhpGedcom\Writer\Caln::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } diff --git a/library/PhpGedcom/Writer/Sour.php b/library/PhpGedcom/Writer/Sour.php index 880468c7..b4e851c5 100644 --- a/library/PhpGedcom/Writer/Sour.php +++ b/library/PhpGedcom/Writer/Sour.php @@ -1,125 +1,123 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer; -/** - * - */ class Sour { /** * @param \PhpGedcom\Record\Sour $sour - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Sour &$sour, $level) { - - $output = ""; + $output = ''; $_sour = $sour->getSour(); - if(empty($_sour)){ + if (empty($_sour)) { return $output; - }else{ - $output.=$level." ".$_sour." SOUR "."\n"; + } else { + $output .= $level.' '.$_sour.' SOUR '."\n"; } // level up $level++; // TITL $titl = $sour->getType(); - if(!empty($type)){ - $output.=$level." TITL ".$titl."\n"; + if (!empty($type)) { + $output .= $level.' TITL '.$titl."\n"; } - + // RIN $rin = $sour->getRin(); - if(!empty($rin)){ - $output.=$level." RIN ".$rin."\n"; + if (!empty($rin)) { + $output .= $level.' RIN '.$rin."\n"; } // AUTH $auth = $sour->getAuth(); - if(!empty($auth)){ - $output.=$level." AUTH ".$auth."\n"; + if (!empty($auth)) { + $output .= $level.' AUTH '.$auth."\n"; } // TEXT $text = $sour->getText(); - if(!empty($text)){ - $output.=$level." TEXT ".$text."\n"; + if (!empty($text)) { + $output .= $level.' TEXT '.$text."\n"; } // PUBL $publ = $sour->getPubl(); - if(!empty($publ)){ - $output.=$level." PUBL ".$publ."\n"; + if (!empty($publ)) { + $output .= $level.' PUBL '.$publ."\n"; } // ABBR $abbr = $sour->getAbbr(); - if(!empty($abbr)){ - $output.=$level." ABBR ".$abbr."\n"; + if (!empty($abbr)) { + $output .= $level.' ABBR '.$abbr."\n"; } - // REPO + // REPO $repo = $sour->getRepo(); - if(!empty($repo)){ + if (!empty($repo)) { $_convert = \PhpGedcom\Writer\RepoRef::convert($repo, $level); - $output.=$_convert; + $output .= $_convert; } // NOTE array $note = $sour->getNote(); - if(!empty($note) && count($note) > 0){ - foreach($note as $item){ + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // DATA $data = $sour->getData(); - if(!empty($data)){ + if (!empty($data)) { $_convert = \PhpGedcom\Writer\Sour\Data::convert($data, $level); - $output.=$_convert; + $output .= $_convert; } // OBJE array $obje = $sour->getObje(); - if(!empty($obje) && count($obje) > 0){ - foreach($obje as $item){ + if (!empty($obje) && count($obje) > 0) { + foreach ($obje as $item) { $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // REFN array $refn = $sour->getRefn(); - if(!empty($refn) && count($refn) > 0){ - foreach($refn as $item){ + if (!empty($refn) && count($refn) > 0) { + foreach ($refn as $item) { $_convert = \PhpGedcom\Writer\Refn::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // chan $chan = $sour->getChan(); - if(!empty($chan)){ + if (!empty($chan)) { $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level); - $output.=$_convert; + $output .= $_convert; } + return $output; } } diff --git a/library/PhpGedcom/Writer/Sour/Data.php b/library/PhpGedcom/Writer/Sour/Data.php index 747a6528..720dc3e3 100644 --- a/library/PhpGedcom/Writer/Sour/Data.php +++ b/library/PhpGedcom/Writer/Sour/Data.php @@ -1,72 +1,70 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer\Sour; -/** - * - */ class Data { /** * @param \PhpGedcom\Record\Sour\Data $data - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Sour\Data &$data, $level = 0) { - $output = ""; + $output = ''; $output = $level." DATA\n"; $level++; // $_date; $date = $data->getDate(); - if(!empty($date)){ - $output.=$level." DATE ".$date."\n"; + if (!empty($date)) { + $output .= $level.' DATE '.$date."\n"; } // $_agnc AGNC $_agnc = $data->getAgnc(); - if(!empty($_agnc)){ - $output.=$level." AGNC ".$_agnc."\n"; + if (!empty($_agnc)) { + $output .= $level.' AGNC '.$_agnc."\n"; } // $_text $_text = $data->getText(); - if(!empty($_text)){ - $output.=$level." TEXT ".$_text."\n"; + if (!empty($_text)) { + $output .= $level.' TEXT '.$_text."\n"; } - + // $_note $note = $data->getNote(); - if($note && count($note) > 0){ - foreach($note as $item){ + if ($note && count($note) > 0) { + foreach ($note as $item) { $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output.= $_convert; + $output .= $_convert; } - } - + } + // $_even $_even = $data->getEven(); - if($_even && count($_even) > 0){ - foreach($_even as $item){ + if ($_even && count($_even) > 0) { + foreach ($_even as $item) { $_convert = \PhpGedcom\Writer\Sour\Data\Even::convert($item, $level); - $output.= $_convert; + $output .= $_convert; } - } - + } + return $output; } } diff --git a/library/PhpGedcom/Writer/Sour/Data/Even.php b/library/PhpGedcom/Writer/Sour/Data/Even.php index c4afc8cf..13dc6c48 100644 --- a/library/PhpGedcom/Writer/Sour/Data/Even.php +++ b/library/PhpGedcom/Writer/Sour/Data/Even.php @@ -1,46 +1,44 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer\Sour\Data; -/** - * - */ class Even { /** * @param \PhpGedcom\Record\Sour\Data\Even $even - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Sour\Data\Even &$even, $level) { - $output = ""; + $output = ''; $output = $level." EVEN\n"; $level++; - + // $date; $date = $even->getDate(); - if(!empty($date)){ - $output.=$level." DATE ".$date."\n"; + if (!empty($date)) { + $output .= $level.' DATE '.$date."\n"; } - + // Plac $plac = $even->getPlac(); - if(!empty($plac)){ - $output.=$level." PLAC ".$plac."\n"; + if (!empty($plac)) { + $output .= $level.' PLAC '.$plac."\n"; } return $output; diff --git a/library/PhpGedcom/Writer/SourRef.php b/library/PhpGedcom/Writer/SourRef.php index f0cfdb56..921030fe 100644 --- a/library/PhpGedcom/Writer/SourRef.php +++ b/library/PhpGedcom/Writer/SourRef.php @@ -1,71 +1,69 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer; -/** - * - */ class SourRef { /** * @param \PhpGedcom\Record\SourRef $sour - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\SourRef &$sour, $level) { - $output = ""; + $output = ''; $_sour = $sour->getSour(); - if(!empty($_sour)){ - $output.=$level." SOUR ".$_sour."\n"; + if (!empty($_sour)) { + $output .= $level.' SOUR '.$_sour."\n"; } $level++; // protected $_text = null; $_text = $sour->getText(); - if(!empty($_text)){ - $output.=$level." TEXT ".$_text."\n"; + if (!empty($_text)) { + $output .= $level.' TEXT '.$_text."\n"; } // protected $_note = array(); $note = $sour->getNote(); - if($note && count($note) > 0){ - foreach($note as $item){ + if ($note && count($note) > 0) { + foreach ($note as $item) { $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output.= $_convert; + $output .= $_convert; } } // protected $_data = null; $_data = $sour->getData(); - if($_data){ + if ($_data) { $_convert = \PhpGedcom\Writer\Sour\Data::convert($_data, $level); - $output.= $_convert; + $output .= $_convert; } - // protected $_page setPage + // protected $_page setPage $_page = $sour->getPage(); - if(!empty($_page)){ - $output.=$level." PAGE ".$_page."\n"; + if (!empty($_page)) { + $output .= $level.' PAGE '.$_page."\n"; } // protected $_even = null; $_even = $sour->getData(); - if($_even){ + if ($_even) { $_convert = \PhpGedcom\Writer\SourRef\Even::convert($_even, $level); - $output.= $_convert; + $output .= $_convert; } - // protected $_quay + // protected $_quay $_quay = $sour->getQuay(); - if(!empty($_quay)){ - $output.=$level." QUAY ".$_quay."\n"; + if (!empty($_quay)) { + $output .= $level.' QUAY '.$_quay."\n"; } // protected $_obje = array(); // This is not defined in parser. diff --git a/library/PhpGedcom/Writer/SourRef/Even.php b/library/PhpGedcom/Writer/SourRef/Even.php index af2e282e..a5dc8877 100644 --- a/library/PhpGedcom/Writer/SourRef/Even.php +++ b/library/PhpGedcom/Writer/SourRef/Even.php @@ -1,48 +1,45 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer\SourRef; -/** - * - */ -class Even +class Even { /** * @param \PhpGedcom\Record\SourRef\Even $even - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\SourRef\Even &$even, $level = 0) { - $output = ""; + $output = ''; // $_date; $_even = $even->getEven(); - if(!empty($_even)){ - $output.=$level." EVEN ".$_even."\n"; - }else{ + if (!empty($_even)) { + $output .= $level.' EVEN '.$_even."\n"; + } else { $output = $level." EVEN\n"; } // level up $level++; - // $_role ROLE $_role = $data->getRole(); - if(!empty($_role)){ - $output.=$level." ROLE ".$_role."\n"; + if (!empty($_role)) { + $output .= $level.' ROLE '.$_role."\n"; } return $output; diff --git a/library/PhpGedcom/Writer/Subm.php b/library/PhpGedcom/Writer/Subm.php index fc25bb0b..8a3e0d9b 100644 --- a/library/PhpGedcom/Writer/Subm.php +++ b/library/PhpGedcom/Writer/Subm.php @@ -1,113 +1,111 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer; -/** - * - */ class Subm { /** * @param \PhpGedcom\Record\Subm $note - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Subm &$subm) { $level = 0; - $output = ""; + $output = ''; $_subm = $subm->getSubn(); - if(empty($_subm)){ + if (empty($_subm)) { return $output; - }else{ - $output.=$level." ".$_subm." SUBM "."\n"; + } else { + $output .= $level.' '.$_subm.' SUBM '."\n"; } // level up $level++; // NAME $name = $subm->getName(); - if(!empty($name)){ - $output.=$level." NAME ".$name."\n"; + if (!empty($name)) { + $output .= $level.' NAME '.$name."\n"; } // $chan $chan = $subm->getChan(); - if($chan){ + if ($chan) { $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level); - $output.=$_convert; + $output .= $_convert; } // $addr $addr = $subm->getAddr(); - if($addr){ + if ($addr) { $_convert = \PhpGedcom\Writer\Addr::convert($addr, $level); - $output.=$_convert; + $output .= $_convert; } // $rin $rin = $subm->getRin(); - if(!empty($rin)){ - $output.=$level." RIN ".$rin."\n"; + if (!empty($rin)) { + $output .= $level.' RIN '.$rin."\n"; } // $rfn $rfn = $subm->getRfn(); - if(!empty($rfn)){ - $output.=$level." RFN ".$rfn."\n"; + if (!empty($rfn)) { + $output .= $level.' RFN '.$rfn."\n"; } // $lang = array() $langs = $subm->getLang(); - if(!empty($langs) && count($langs) > 0){ - foreach($langs as $item){ - if($item){ - $_convert = $level." LANG ".$item."\n"; - $output.=$_convert; + if (!empty($langs) && count($langs) > 0) { + foreach ($langs as $item) { + if ($item) { + $_convert = $level.' LANG '.$item."\n"; + $output .= $_convert; } } } // $phon = array() $phon = $subm->getLang(); - if(!empty($phon) && count($phon) > 0){ - foreach($phon as $item){ - if($item){ + if (!empty($phon) && count($phon) > 0) { + foreach ($phon as $item) { + if ($item) { $_convert = \PhpGedcom\Writer\Phon::convert($item, $level); - $output.= $_convert; + $output .= $_convert; } } } // $obje = array() $obje = $subm->getObje(); - if(!empty($obje) && count($obje) > 0){ - foreach($obje as $item){ + if (!empty($obje) && count($obje) > 0) { + foreach ($obje as $item) { $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } // note $note = $subm->getNote(); - if(!empty($note) && count($note) > 0){ - foreach($note as $item){ + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output.=$_convert; + $output .= $_convert; } } - + return $output; } } diff --git a/library/PhpGedcom/Writer/Subn.php b/library/PhpGedcom/Writer/Subn.php index 0cd8de08..9aca13af 100644 --- a/library/PhpGedcom/Writer/Subn.php +++ b/library/PhpGedcom/Writer/Subn.php @@ -1,83 +1,81 @@ * @copyright Copyright (c) 2010-2013, Xiang Ming - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ namespace PhpGedcom\Writer; -/** - * - */ class Subn { /** * @param \PhpGedcom\Record\Subn $note - * @param int $level + * @param int $level + * * @return string */ public static function convert(\PhpGedcom\Record\Subn &$subn) { $level = 0; - $output = ""; + $output = ''; $_subn = $subn->getSubn(); - if(empty($_subn)){ + if (empty($_subn)) { return $output; - }else{ - $output.=$level." ".$_subn." SUBN \n"; + } else { + $output .= $level.' '.$_subn." SUBN \n"; } // level up $level++; // SUBM $subm = $subn->getSubm(); - if(!empty($subm)){ - $output.=$level." SUBM ".$subm."\n"; + if (!empty($subm)) { + $output .= $level.' SUBM '.$subm."\n"; } // FAMF $famf = $subn->getFamf(); - if(!empty($famf)){ - $output.=$level." FAMF ".$famf."\n"; + if (!empty($famf)) { + $output .= $level.' FAMF '.$famf."\n"; } // TEMP $temp = $subn->getTemp(); - if(!empty($temp)){ - $output.=$level." TEMP ".$temp."\n"; + if (!empty($temp)) { + $output .= $level.' TEMP '.$temp."\n"; } // ANCE $ance = $subn->getAnce(); - if(!empty($ance)){ - $output.=$level." ANCE ".$ance."\n"; + if (!empty($ance)) { + $output .= $level.' ANCE '.$ance."\n"; } - + // DESC $desc = $subn->getDesc(); - if(!empty($desc)){ - $output.=$level." DESC ".$desc."\n"; + if (!empty($desc)) { + $output .= $level.' DESC '.$desc."\n"; } // ORDI $ordi = $subn->getOrdi(); - if(!empty($ordi)){ - $output.=$level." ORDI ".$ordi."\n"; + if (!empty($ordi)) { + $output .= $level.' ORDI '.$ordi."\n"; } // RIN $rin = $subn->getRin(); - if(!empty($rin)){ - $output.=$level." RIN ".$rin."\n"; + if (!empty($rin)) { + $output .= $level.' RIN '.$rin."\n"; } - + return $output; } } diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 52f1b878..ebebc8e2 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,10 +1,10 @@ parse($sample); diff --git a/tests/issue/Issue00017Test.php b/tests/issue/Issue00017Test.php index 369f126b..3eb9e001 100644 --- a/tests/issue/Issue00017Test.php +++ b/tests/issue/Issue00017Test.php @@ -5,8 +5,7 @@ use PhpGedcom\Parser; /** - * Class Issue00017Test - * @package PhpGedcomTest + * Class Issue00017Test. */ class Issue00017Test extends \PHPUnit_Framework_TestCase { @@ -15,7 +14,7 @@ class Issue00017Test extends \PHPUnit_Framework_TestCase */ public function testEmptyFamc() { - $sample = realpath(__DIR__ . '/files/issue00017.ged'); + $sample = realpath(__DIR__.'/files/issue00017.ged'); $parser = new Parser(); $gedcom = $parser->parse($sample); diff --git a/tests/issue/Issue00018Test.php b/tests/issue/Issue00018Test.php index 5e5c6159..6fd90448 100644 --- a/tests/issue/Issue00018Test.php +++ b/tests/issue/Issue00018Test.php @@ -5,8 +5,7 @@ use PhpGedcom\Parser; /** - * Class Issue00018Test - * @package PhpGedcomTest + * Class Issue00018Test. */ class Issue00018Test extends \PHPUnit_Framework_TestCase { @@ -15,7 +14,7 @@ class Issue00018Test extends \PHPUnit_Framework_TestCase */ public function testEmptyNote() { - $sample = realpath(__DIR__ . '/files/issue00018.ged'); + $sample = realpath(__DIR__.'/files/issue00018.ged'); $parser = new Parser(); $gedcom = $parser->parse($sample); diff --git a/tests/library/Gedcom/ParserTest.php b/tests/library/Gedcom/ParserTest.php index 2776d5f5..4edc3aaa 100644 --- a/tests/library/Gedcom/ParserTest.php +++ b/tests/library/Gedcom/ParserTest.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,41 +17,31 @@ use PhpGedcom\Parser; /** - * Class ParserTest - * @package PhpGedcomTest + * Class ParserTest. */ class ParserTest extends \PHPUnit_Framework_TestCase { /** * @var \PhpGedcom\Parser */ - protected $parser = null; - + protected $parser = null; + /** * @var \PhpGedcom\Gedcom */ - protected $gedcom = null; - - /** - * - */ + protected $gedcom = null; + public function setUp() { $this->parser = new Parser(); - $this->gedcom = $this->parser->parse(TEST_DIR . '/stresstestfiles/TGC551LF.ged'); + $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); @@ -62,9 +52,6 @@ public function testRecordCounts() $this->assertEquals(count($this->gedcom->getRepo()), 1); } - /** - * - */ public function testHead() { $head = $this->gedcom->getHead(); @@ -114,9 +101,6 @@ public function testHead() $this->assertEquals($head->getSubn(), 'SUBMISSION'); } - /** - * - */ public function testSubn() { $subn = $this->gedcom->getSubn(); @@ -131,9 +115,6 @@ public function testSubn() $this->assertEquals($subn->getRin(), '1'); } - /** - * - */ public function testSubm() { $subm = $this->gedcom->getSubm(); @@ -142,10 +123,10 @@ public function testSubm() $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" + "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'); @@ -175,13 +156,12 @@ public function testSubm() $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" + "Secondary Submitter Address 1\n". + 'Secondary Submitter Address 2' ); $lang = $subm['SM2']->getLang(); @@ -190,54 +170,34 @@ public function testSubm() $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!!!!)" + "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(); @@ -253,9 +213,6 @@ public function testSour() $this->assertEquals($secondSource->getRin(), '2'); } - /** - * - */ public function testNote() { $firstNote = current($this->gedcom->getNote()); From e1d8bd93f6c4dff282861e860592cef449195add Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Mon, 14 Sep 2020 02:33:33 +0100 Subject: [PATCH 43/99] Create FUNDING.yml --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..47ed396c --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +open_collective: genealogy From 7129fb2f1a22de4750716c452fc80b32128e4d2c Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Thu, 17 Sep 2020 03:36:42 +0100 Subject: [PATCH 44/99] Fix import for Geni files. Thanks to the fork commit by Execut on GitHub. --- library/PhpGedcom/Record/ObjeRef/File.php | 1 + library/PhpGedcom/Record/ObjeRef/File/Form.php | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/library/PhpGedcom/Record/ObjeRef/File.php b/library/PhpGedcom/Record/ObjeRef/File.php index 59d71405..bb8ea027 100644 --- a/library/PhpGedcom/Record/ObjeRef/File.php +++ b/library/PhpGedcom/Record/ObjeRef/File.php @@ -32,5 +32,6 @@ class File extends Record */ protected $_form; protected $_titl; + protected $_date; } diff --git a/library/PhpGedcom/Record/ObjeRef/File/Form.php b/library/PhpGedcom/Record/ObjeRef/File/Form.php index 1b2710d3..a4244510 100644 --- a/library/PhpGedcom/Record/ObjeRef/File/Form.php +++ b/library/PhpGedcom/Record/ObjeRef/File/Form.php @@ -25,17 +25,17 @@ class Form extends Record /** * @var string multimedia_format */ - protected $form; + protected $_form; /** * @var string source_media_type * for only obje */ - protected $type; + protected $_type; /** * @var string source_media_type * for only objeref */ - protected $medi; + protected $_medi; } From 38d4a1b737d665faf3016267d170c2a63458b098 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Thu, 17 Sep 2020 02:40:08 +0000 Subject: [PATCH 45/99] Apply fixes from StyleCI --- library/PhpGedcom/Record/Indi.php | 1 - library/PhpGedcom/Record/ObjeRef/File.php | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/library/PhpGedcom/Record/Indi.php b/library/PhpGedcom/Record/Indi.php index 23d6e41b..220f4527 100644 --- a/library/PhpGedcom/Record/Indi.php +++ b/library/PhpGedcom/Record/Indi.php @@ -16,7 +16,6 @@ use PhpGedcom\Record; - /** * Class Indi. */ diff --git a/library/PhpGedcom/Record/ObjeRef/File.php b/library/PhpGedcom/Record/ObjeRef/File.php index bb8ea027..2db2e6d9 100644 --- a/library/PhpGedcom/Record/ObjeRef/File.php +++ b/library/PhpGedcom/Record/ObjeRef/File.php @@ -1,14 +1,14 @@ * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @package php-gedcom * @license MIT + * * @link http://github.com/mrkrstphr/php-gedcom */ @@ -17,8 +17,7 @@ use PhpGedcom\Record; /** - * Class Refn - * @package PhpGedcom\Record + * Class Refn. */ class File extends Record { @@ -33,5 +32,4 @@ class File extends Record protected $_form; protected $_titl; protected $_date; - } From 77d18ca7f1e310cfc00a54abc850c992e7f564e0 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Mon, 21 Sep 2020 22:16:44 +0100 Subject: [PATCH 46/99] Update package name. --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index ae3a516a..dd5ad06a 100644 --- a/composer.json +++ b/composer.json @@ -1,9 +1,9 @@ { - "name": "modularsoftware/php-gedcom", - "description": "A GEDCOM file parser (read + write) for PHP 5.3+", + "name": "genealogiawebsite/php-gedcom", + "description": "A GEDCOM file parser (read + write) for PHP 7.3+", "type": "library", "keywords": ["gedcom","parser"], - "homepage": "http://github.com/modularsoftware/php-gedcom", + "homepage": "http://github.com/genealogiawebsite/php-gedcom", "license": "MIT", "require": { "php": ">=7.3" From e57c98299dcf8ef16f30b8426b8a869ea5743583 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sat, 26 Sep 2020 21:05:43 +0100 Subject: [PATCH 47/99] Update package name. --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b293c2cd..0d4779ff 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # php-gedcom - ![Latest Stable Version](https://img.shields.io/github/release/modularsoftware/php-gedcom.svg) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/?branch=master) -[![Build Status](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/badges/build.png?b=master)](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/build-status/master) -[![Code Intelligence Status](https://scrutinizer-ci.com/g/modularsoftware/php-gedcom/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence) + ![Latest Stable Version](https://img.shields.io/github/release/genealogiawebsite/php-gedcom.svg) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/genealogiawebsite/php-gedcom/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/genealogiawebsite/php-gedcom/?branch=master) +[![Build Status](https://scrutinizer-ci.com/g/genealogiawebsite/php-gedcom/badges/build.png?b=master)](https://scrutinizer-ci.com/g/genealogiawebsite/php-gedcom/build-status/master) +[![Code Intelligence Status](https://scrutinizer-ci.com/g/genealogiawebsite/php-gedcom/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence) [![StyleCI](https://github.styleci.io/repos/262784020/shield?branch=master)](https://github.styleci.io/repos/262784020) -[![CodeFactor](https://www.codefactor.io/repository/github/modularsoftware/php-gedcom/badge/master)](https://www.codefactor.io/repository/github/modularsoftware/php-gedcom/overview/master) +[![CodeFactor](https://www.codefactor.io/repository/github/genealogiawebsite/php-gedcom/badge/master)](https://www.codefactor.io/repository/github/genealogiawebsite/php-gedcom/overview/master) [![codebeat badge](https://codebeat.co/badges/911f9e33-212a-4dfa-a860-751cdbbacff7)](https://codebeat.co/projects/github-com-modularphp-gedcom-php-gedcom-master) -[![Build Status](https://travis-ci.org/modularsoftware/php-gedcom.svg?branch=master)](https://travis-ci.org/modularsoftware/php-gedcom) +[![Build Status](https://travis-ci.org/genealogiawebsite/php-gedcom.svg?branch=master)](https://travis-ci.org/genealogiawebsite/php-gedcom) @@ -25,7 +25,7 @@ To install php-gedcom in your project using composer, simply add the following r { "require": { - "modularsoftware/php-gedcom": "1.0.*" + "genealogiawebsite/php-gedcom": "1.0.*" } } From ba7c7ca4971f23ff25ddf2b55470ef2e4fe3bd7a Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Mon, 5 Oct 2020 16:26:14 +0100 Subject: [PATCH 48/99] Add LICENSE.md --- LICENSE.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..e662c786 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,5 @@ +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. \ No newline at end of file From acf387e4498e6023bf4cf4916a9492688a7cd86f Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Mon, 5 Oct 2020 18:00:25 +0100 Subject: [PATCH 49/99] Update FUNDING.yml --- .github/FUNDING.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 47ed396c..276c3f0c 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1 @@ -open_collective: genealogy +github: genealogiawebsite From 85f07050a120f5d6afd477a34fc09793cf34c349 Mon Sep 17 00:00:00 2001 From: Denis Date: Thu, 22 Apr 2021 11:08:35 +0300 Subject: [PATCH 50/99] Fix PhpGedcom\Record\Map properties name --- library/PhpGedcom/Record/Plac/Map.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/PhpGedcom/Record/Plac/Map.php b/library/PhpGedcom/Record/Plac/Map.php index 2a22a341..c1395c00 100644 --- a/library/PhpGedcom/Record/Plac/Map.php +++ b/library/PhpGedcom/Record/Plac/Map.php @@ -24,10 +24,10 @@ class Map extends Record /** * @var string place_latitude */ - protected $lati; + protected $_lati; /** * @var string place_longitude */ - protected $long; + protected $_long; } From 88c5d3c0b58eadd839aa3945ad3dc86de7894a17 Mon Sep 17 00:00:00 2001 From: Denis Date: Fri, 21 May 2021 11:52:54 +0300 Subject: [PATCH 51/99] Fix PhpGedcom\Writer\Indi\Famc wrong function invocation --- library/PhpGedcom/Writer/Indi/Famc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/PhpGedcom/Writer/Indi/Famc.php b/library/PhpGedcom/Writer/Indi/Famc.php index 9d67421b..e44805cf 100644 --- a/library/PhpGedcom/Writer/Indi/Famc.php +++ b/library/PhpGedcom/Writer/Indi/Famc.php @@ -26,7 +26,7 @@ public static function convert(\PhpGedcom\Record\Indi\Famc &$famc, $level = 0) { $output = ''; // NAME - $_famc = $famc->getFams(); + $_famc = $famc->getFamc(); if (empty($_fams)) { return $output; } From 557bf00eb31c69e96b12a8dce8c2aaf2e5b6c0a4 Mon Sep 17 00:00:00 2001 From: Denis Date: Fri, 21 May 2021 12:42:48 +0300 Subject: [PATCH 52/99] Fix even writer date export --- library/PhpGedcom/Writer/Indi/Even.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/PhpGedcom/Writer/Indi/Even.php b/library/PhpGedcom/Writer/Indi/Even.php index 0221d77d..93cb23d4 100644 --- a/library/PhpGedcom/Writer/Indi/Even.php +++ b/library/PhpGedcom/Writer/Indi/Even.php @@ -44,7 +44,7 @@ public static function convert(\PhpGedcom\Record\Indi\Even &$even, $level = 0) // $date; $date = $even->getDate(); if (!empty($date)) { - $output .= $level.' DATE '.$date."\n"; + $output .= $level.' DATE '.$date->getDate()."\n"; } // Plac From 960fc2cc2a031ea95155652bb3665752d6225140 Mon Sep 17 00:00:00 2001 From: Denis Date: Fri, 21 May 2021 13:21:06 +0300 Subject: [PATCH 53/99] Fix indi even processing --- library/PhpGedcom/Writer/Indi.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/library/PhpGedcom/Writer/Indi.php b/library/PhpGedcom/Writer/Indi.php index 9e3d1c0b..f29920ea 100644 --- a/library/PhpGedcom/Writer/Indi.php +++ b/library/PhpGedcom/Writer/Indi.php @@ -59,9 +59,11 @@ public static function convert(\PhpGedcom\Record\Indi &$indi) // $even $even = $indi->getAllEven(); if (!empty($even) && count($even) > 0) { - foreach ($even as $item) { - $_convert = \PhpGedcom\Writer\Indi\Even::convert($item, $level); - $output .= $_convert; + foreach ($even as $items) { + foreach ($items as $item) { + $_convert = \PhpGedcom\Writer\Indi\Even::convert($item, $level); + $output .= $_convert; + } } } From 0df1c8b052f7b07fe8e52e973479c8268a797644 Mon Sep 17 00:00:00 2001 From: Denis Date: Fri, 21 May 2021 15:25:36 +0300 Subject: [PATCH 54/99] Add special event processing for some event types --- library/PhpGedcom/Writer/Indi/Even.php | 40 +++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/library/PhpGedcom/Writer/Indi/Even.php b/library/PhpGedcom/Writer/Indi/Even.php index 93cb23d4..30ed9a3d 100644 --- a/library/PhpGedcom/Writer/Indi/Even.php +++ b/library/PhpGedcom/Writer/Indi/Even.php @@ -16,6 +16,36 @@ class Even { + + /** + * Array of special events. + */ + const SPECIAL_EVENTS = [ + 'ADOP', + 'ATTR', + 'BAPM', + 'BARM', + 'BASM', + 'BLES', + 'BURI', + 'CENS', + 'CHR', + 'CHRA', + 'CONF', + 'CREM', + 'DEAT', + 'EMIG', + 'FCOM', + 'GRAD', + 'IMMI', + 'NATU', + 'ORDN', + 'PROB', + 'BIRT', + 'WILL', + 'RETI', + ]; + /** * @param \PhpGedcom\Record\Indi\Even $even * @param int $level @@ -26,18 +56,20 @@ public static function convert(\PhpGedcom\Record\Indi\Even &$even, $level = 0) { $output = ''; + $type = $even->getType(); + $tag = in_array($type, self::SPECIAL_EVENTS, TRUE) ? $type : 'EVEN'; + // $_attr; $attr = $even->getAttr(); if (!empty($attr)) { - $output .= $level.' EVEN '.$attr."\n"; + $output .= $level.' '.$tag.' '.$attr."\n"; } else { - $output = $level." EVEN\n"; + $output = $level.' '.$tag."\n"; } $level++; // $type; - $type = $even->getType(); - if (!empty($type)) { + if (!empty($type) && $tag === 'EVEN') { $output .= $level.' TYPE '.$type."\n"; } From 0a0330447606d3eceaa025e558449e11ba69a485 Mon Sep 17 00:00:00 2001 From: Denis Date: Fri, 21 May 2021 15:27:12 +0300 Subject: [PATCH 55/99] Add special event processing for some event types --- library/PhpGedcom/Writer/Indi/Even.php | 46 +++++++++++++------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/library/PhpGedcom/Writer/Indi/Even.php b/library/PhpGedcom/Writer/Indi/Even.php index 30ed9a3d..bf8e10d0 100644 --- a/library/PhpGedcom/Writer/Indi/Even.php +++ b/library/PhpGedcom/Writer/Indi/Even.php @@ -21,29 +21,29 @@ class Even * Array of special events. */ const SPECIAL_EVENTS = [ - 'ADOP', - 'ATTR', - 'BAPM', - 'BARM', - 'BASM', - 'BLES', - 'BURI', - 'CENS', - 'CHR', - 'CHRA', - 'CONF', - 'CREM', - 'DEAT', - 'EMIG', - 'FCOM', - 'GRAD', - 'IMMI', - 'NATU', - 'ORDN', - 'PROB', - 'BIRT', - 'WILL', - 'RETI', + 'ADOP', + 'ATTR', + 'BAPM', + 'BARM', + 'BASM', + 'BLES', + 'BURI', + 'CENS', + 'CHR', + 'CHRA', + 'CONF', + 'CREM', + 'DEAT', + 'EMIG', + 'FCOM', + 'GRAD', + 'IMMI', + 'NATU', + 'ORDN', + 'PROB', + 'BIRT', + 'WILL', + 'RETI', ]; /** From 90ef6b5238ad5930ef084e273c2b784f2c4e51ed Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sat, 22 May 2021 23:46:42 +0100 Subject: [PATCH 56/99] CONTRIBUTE.md --- CONTRIBUTE.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 CONTRIBUTE.md diff --git a/CONTRIBUTE.md b/CONTRIBUTE.md new file mode 100644 index 00000000..b4281951 --- /dev/null +++ b/CONTRIBUTE.md @@ -0,0 +1,11 @@ +# Contributing + +Contributions are **welcome** and will be fully **credited**. We accept contributions via Pull Requests on [Github](https://github.com/spatie/laravel-medialibrary). + +## Pull Requests + +- **[PSR-4 Coding Standard.]** The easiest way to apply the conventions is to install [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer). +- **Document any change in behaviour.** Make sure the `README.md` and any other relevant documentation are kept up-to-date. +- **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. \ No newline at end of file From 1d3ae743dcc9fb998c6e192ef29c8f5b3cff458c Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sun, 23 May 2021 05:47:40 +0100 Subject: [PATCH 57/99] CONTRIBUTE.md --- CONTRIBUTE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTE.md b/CONTRIBUTE.md index b4281951..d47f9636 100644 --- a/CONTRIBUTE.md +++ b/CONTRIBUTE.md @@ -1,6 +1,6 @@ # Contributing -Contributions are **welcome** and will be fully **credited**. We accept contributions via Pull Requests on [Github](https://github.com/spatie/laravel-medialibrary). +Contributions are **welcome** and will be fully **credited**. We accept contributions via Pull Requests on [Github](https://github.com/familytree365/php-gedcom). ## Pull Requests From 63882da57dae52c0698bd46c0a6294d38be97928 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Thu, 27 May 2021 05:09:04 +0100 Subject: [PATCH 58/99] Package name. --- README.md | 14 +++++++------- composer.json | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 0d4779ff..037c98a9 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # php-gedcom - ![Latest Stable Version](https://img.shields.io/github/release/genealogiawebsite/php-gedcom.svg) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/genealogiawebsite/php-gedcom/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/genealogiawebsite/php-gedcom/?branch=master) -[![Build Status](https://scrutinizer-ci.com/g/genealogiawebsite/php-gedcom/badges/build.png?b=master)](https://scrutinizer-ci.com/g/genealogiawebsite/php-gedcom/build-status/master) -[![Code Intelligence Status](https://scrutinizer-ci.com/g/genealogiawebsite/php-gedcom/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence) + ![Latest Stable Version](https://img.shields.io/github/release/familytree365/php-gedcom.svg) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/familytree365/php-gedcom/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/familytree365/php-gedcom/?branch=master) +[![Build Status](https://scrutinizer-ci.com/g/familytree365/php-gedcom/badges/build.png?b=master)](https://scrutinizer-ci.com/g/familytree365/php-gedcom/build-status/master) +[![Code Intelligence Status](https://scrutinizer-ci.com/g/familytree365/php-gedcom/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence) [![StyleCI](https://github.styleci.io/repos/262784020/shield?branch=master)](https://github.styleci.io/repos/262784020) -[![CodeFactor](https://www.codefactor.io/repository/github/genealogiawebsite/php-gedcom/badge/master)](https://www.codefactor.io/repository/github/genealogiawebsite/php-gedcom/overview/master) +[![CodeFactor](https://www.codefactor.io/repository/github/familytree365/php-gedcom/badge/master)](https://www.codefactor.io/repository/github/familytree365/php-gedcom/overview/master) [![codebeat badge](https://codebeat.co/badges/911f9e33-212a-4dfa-a860-751cdbbacff7)](https://codebeat.co/projects/github-com-modularphp-gedcom-php-gedcom-master) -[![Build Status](https://travis-ci.org/genealogiawebsite/php-gedcom.svg?branch=master)](https://travis-ci.org/genealogiawebsite/php-gedcom) +[![Build Status](https://travis-ci.org/familytree365/php-gedcom.svg?branch=master)](https://travis-ci.org/familytree365/php-gedcom) @@ -25,7 +25,7 @@ To install php-gedcom in your project using composer, simply add the following r { "require": { - "genealogiawebsite/php-gedcom": "1.0.*" + "familytree365/php-gedcom": "1.0.*" } } diff --git a/composer.json b/composer.json index dd5ad06a..01dd3b64 100644 --- a/composer.json +++ b/composer.json @@ -1,9 +1,9 @@ { - "name": "genealogiawebsite/php-gedcom", + "name": "familytree365/php-gedcom", "description": "A GEDCOM file parser (read + write) for PHP 7.3+", "type": "library", "keywords": ["gedcom","parser"], - "homepage": "http://github.com/genealogiawebsite/php-gedcom", + "homepage": "http://github.com/familytree365/php-gedcom", "license": "MIT", "require": { "php": ">=7.3" From 4bd21d32513bece7d44a478313e63ce354fc8fca Mon Sep 17 00:00:00 2001 From: Denis Date: Sat, 29 May 2021 13:19:43 +0300 Subject: [PATCH 59/99] Fix multiple typos in diff Writer classes --- library/PhpGedcom/Writer/Head/Char.php | 2 +- library/PhpGedcom/Writer/Indi/Famc.php | 4 ++-- library/PhpGedcom/Writer/Subm.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/library/PhpGedcom/Writer/Head/Char.php b/library/PhpGedcom/Writer/Head/Char.php index 15bdc888..ac7d4831 100644 --- a/library/PhpGedcom/Writer/Head/Char.php +++ b/library/PhpGedcom/Writer/Head/Char.php @@ -37,7 +37,7 @@ public static function convert(\PhpGedcom\Record\Head\Char &$char, $level) // level up $level++; // VERS - $vers = $char->getVersion(); + $vers = $char->getVers(); if ($vers) { $output .= $level.' VERS '.$vers."\n"; } diff --git a/library/PhpGedcom/Writer/Indi/Famc.php b/library/PhpGedcom/Writer/Indi/Famc.php index e44805cf..44f0e39f 100644 --- a/library/PhpGedcom/Writer/Indi/Famc.php +++ b/library/PhpGedcom/Writer/Indi/Famc.php @@ -27,7 +27,7 @@ public static function convert(\PhpGedcom\Record\Indi\Famc &$famc, $level = 0) $output = ''; // NAME $_famc = $famc->getFamc(); - if (empty($_fams)) { + if (empty($_famc)) { return $output; } $output .= $level.' FAMC @'.$_famc."@\n"; @@ -41,7 +41,7 @@ public static function convert(\PhpGedcom\Record\Indi\Famc &$famc, $level = 0) } // note - $note = $famc->getSour(); + $note = $famc->getNote(); if (!empty($note) && count($note) > 0) { foreach ($note as $item) { $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); diff --git a/library/PhpGedcom/Writer/Subm.php b/library/PhpGedcom/Writer/Subm.php index 8a3e0d9b..358141f4 100644 --- a/library/PhpGedcom/Writer/Subm.php +++ b/library/PhpGedcom/Writer/Subm.php @@ -26,7 +26,7 @@ public static function convert(\PhpGedcom\Record\Subm &$subm) { $level = 0; $output = ''; - $_subm = $subm->getSubn(); + $_subm = $subm->getSubm(); if (empty($_subm)) { return $output; } else { From 70a22297c02dfe93aaef66c98b69bcb24f9364ba Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Wed, 14 Jul 2021 15:27:52 +0000 Subject: [PATCH 60/99] Apply fixes from StyleCI --- library/PhpGedcom/Writer/Indi/Even.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/library/PhpGedcom/Writer/Indi/Even.php b/library/PhpGedcom/Writer/Indi/Even.php index bf8e10d0..fd3a1ca2 100644 --- a/library/PhpGedcom/Writer/Indi/Even.php +++ b/library/PhpGedcom/Writer/Indi/Even.php @@ -16,10 +16,9 @@ class Even { - - /** - * Array of special events. - */ + /** + * Array of special events. + */ const SPECIAL_EVENTS = [ 'ADOP', 'ATTR', @@ -57,7 +56,7 @@ public static function convert(\PhpGedcom\Record\Indi\Even &$even, $level = 0) $output = ''; $type = $even->getType(); - $tag = in_array($type, self::SPECIAL_EVENTS, TRUE) ? $type : 'EVEN'; + $tag = in_array($type, self::SPECIAL_EVENTS, true) ? $type : 'EVEN'; // $_attr; $attr = $even->getAttr(); From 70faf16d02f58dbff8f1c85233e3e49dac00a8aa Mon Sep 17 00:00:00 2001 From: xeanu Date: Thu, 15 Jul 2021 20:14:58 +0700 Subject: [PATCH 61/99] update --- src/Gedcom.php | 275 ++++++++++++ src/Parser.php | 275 ++++++++++++ src/Parser/Addr.php | 58 +++ src/Parser/Caln.php | 57 +++ src/Parser/Chan.php | 60 +++ src/Parser/Component.php | 22 + src/Parser/Date.php | 36 ++ src/Parser/Fam.php | 136 ++++++ src/Parser/Fam/Anul.php | 19 + src/Parser/Fam/Cens.php | 19 + src/Parser/Fam/Div.php | 19 + src/Parser/Fam/Divf.php | 19 + src/Parser/Fam/Enga.php | 19 + src/Parser/Fam/Even.php | 103 +++++ src/Parser/Fam/Even/Husb.php | 51 +++ src/Parser/Fam/Even/Wife.php | 51 +++ src/Parser/Fam/Marb.php | 19 + src/Parser/Fam/Marc.php | 19 + src/Parser/Fam/Marl.php | 19 + src/Parser/Fam/Marr.php | 19 + src/Parser/Fam/Mars.php | 19 + src/Parser/Fam/Slgs.php | 71 +++ src/Parser/Fam/Slgs/Stat.php | 59 +++ src/Parser/Head.php | 106 +++++ src/Parser/Head/Char.php | 57 +++ src/Parser/Head/Date.php | 57 +++ src/Parser/Head/Gedc.php | 54 +++ src/Parser/Head/Plac.php | 51 +++ src/Parser/Head/Sour.php | 68 +++ src/Parser/Head/Sour/Corp.php | 60 +++ src/Parser/Head/Sour/Data.php | 60 +++ src/Parser/Indi.php | 188 ++++++++ src/Parser/Indi/Adop.php | 34 ++ src/Parser/Indi/Asso.php | 67 +++ src/Parser/Indi/Attr.php | 100 +++++ src/Parser/Indi/Bapl.php | 19 + src/Parser/Indi/Bapm.php | 19 + src/Parser/Indi/Barm.php | 19 + src/Parser/Indi/Basm.php | 19 + src/Parser/Indi/Birt.php | 26 ++ src/Parser/Indi/Bles.php | 19 + src/Parser/Indi/Buri.php | 19 + src/Parser/Indi/Cast.php | 19 + src/Parser/Indi/Cens.php | 19 + src/Parser/Indi/Chr.php | 26 ++ src/Parser/Indi/Chra.php | 19 + src/Parser/Indi/Conf.php | 19 + src/Parser/Indi/Conl.php | 19 + src/Parser/Indi/Crem.php | 19 + src/Parser/Indi/Deat.php | 19 + src/Parser/Indi/Dscr.php | 19 + src/Parser/Indi/Educ.php | 19 + src/Parser/Indi/Emig.php | 19 + src/Parser/Indi/Endl.php | 19 + src/Parser/Indi/Even.php | 125 ++++++ src/Parser/Indi/Even/Plac.php | 65 +++ src/Parser/Indi/Famc.php | 67 +++ src/Parser/Indi/Fams.php | 64 +++ src/Parser/Indi/Fcom.php | 19 + src/Parser/Indi/Grad.php | 19 + src/Parser/Indi/Idno.php | 19 + src/Parser/Indi/Immi.php | 19 + src/Parser/Indi/Lds.php | 83 ++++ src/Parser/Indi/Name.php | 95 ++++ src/Parser/Indi/Name/Fone.php | 77 ++++ src/Parser/Indi/Name/Romn.php | 79 ++++ src/Parser/Indi/Nati.php | 19 + src/Parser/Indi/Natu.php | 19 + src/Parser/Indi/Nchi.php | 19 + src/Parser/Indi/Nmr.php | 19 + src/Parser/Indi/Occu.php | 19 + src/Parser/Indi/Ordn.php | 19 + src/Parser/Indi/Prob.php | 19 + src/Parser/Indi/Prop.php | 19 + src/Parser/Indi/Reli.php | 19 + src/Parser/Indi/Resi.php | 19 + src/Parser/Indi/Reti.php | 19 + src/Parser/Indi/Slgc.php | 24 + src/Parser/Indi/Ssn.php | 19 + src/Parser/Indi/Titl.php | 19 + src/Parser/Indi/Will.php | 19 + src/Parser/Note.php | 87 ++++ src/Parser/NoteRef.php | 68 +++ src/Parser/Obje.php | 85 ++++ src/Parser/ObjeRef.php | 61 +++ src/Parser/ObjeRef/File.php | 56 +++ src/Parser/ObjeRef/File/Form.php | 59 +++ src/Parser/Phon.php | 54 +++ src/Parser/Plac.php | 76 ++++ src/Parser/Plac/Fone.php | 59 +++ src/Parser/Plac/Map.php | 54 +++ src/Parser/Plac/Romn.php | 59 +++ src/Parser/Refn.php | 57 +++ src/Parser/Repo.php | 93 ++++ src/Parser/RepoRef.php | 65 +++ src/Parser/Sour.php | 100 +++++ src/Parser/Sour/Data.php | 66 +++ src/Parser/Sour/Data/Even.php | 54 +++ src/Parser/Sour/Repo.php | 57 +++ src/Parser/Sour/Repo/Caln.php | 56 +++ src/Parser/SourRef.php | 82 ++++ src/Parser/SourRef/Data.php | 53 +++ src/Parser/SourRef/Even.php | 57 +++ src/Parser/Subm.php | 104 +++++ src/Parser/Subn.php | 89 ++++ src/Record.php | 107 +++++ src/Record/Addr.php | 198 +++++++++ src/Record/Caln.php | 73 +++ src/Record/Chan.php | 98 ++++ src/Record/Data.php | 73 +++ src/Record/Date.php | 133 ++++++ src/Record/Fam.php | 96 ++++ src/Record/Fam/Anul.php | 19 + src/Record/Fam/Cens.php | 19 + src/Record/Fam/Div.php | 19 + src/Record/Fam/Enga.php | 19 + src/Record/Fam/Even.php | 70 +++ src/Record/Fam/Even/Husb.php | 20 + src/Record/Fam/Even/Wife.php | 20 + src/Record/Fam/Marb.php | 19 + src/Record/Fam/Marc.php | 19 + src/Record/Fam/Marl.php | 19 + src/Record/Fam/Marr.php | 19 + src/Record/Fam/Mars.php | 19 + src/Record/Fam/Slgs.php | 40 ++ src/Record/Fam/Slgs/Stat.php | 29 ++ src/Record/Head.php | 323 ++++++++++++++ src/Record/Head/Char.php | 21 + src/Record/Head/Date.php | 21 + src/Record/Head/Gedc.php | 54 +++ src/Record/Head/Plac.php | 20 + src/Record/Head/Sour.php | 92 ++++ src/Record/Head/Sour/Corp.php | 28 ++ src/Record/Head/Sour/Data.php | 22 + src/Record/Indi.php | 741 +++++++++++++++++++++++++++++++ src/Record/Indi/Adop.php | 21 + src/Record/Indi/Asso.php | 38 ++ src/Record/Indi/Attr.php | 46 ++ src/Record/Indi/Bapl.php | 19 + src/Record/Indi/Bapm.php | 19 + src/Record/Indi/Barm.php | 19 + src/Record/Indi/Basm.php | 19 + src/Record/Indi/Birt.php | 46 ++ src/Record/Indi/Bles.php | 19 + src/Record/Indi/Buri.php | 19 + src/Record/Indi/Cast.php | 19 + src/Record/Indi/Cens.php | 19 + src/Record/Indi/Chr.php | 20 + src/Record/Indi/Chra.php | 19 + src/Record/Indi/Conf.php | 19 + src/Record/Indi/Conl.php | 19 + src/Record/Indi/Crem.php | 19 + src/Record/Indi/Deat.php | 19 + src/Record/Indi/Dscr.php | 19 + src/Record/Indi/Educ.php | 19 + src/Record/Indi/Emig.php | 19 + src/Record/Indi/Endl.php | 19 + src/Record/Indi/Even.php | 353 +++++++++++++++ src/Record/Indi/Even/Plac.php | 123 +++++ src/Record/Indi/Famc.php | 30 ++ src/Record/Indi/Fams.php | 29 ++ src/Record/Indi/Fcom.php | 19 + src/Record/Indi/Grad.php | 19 + src/Record/Indi/Idno.php | 19 + src/Record/Indi/Immi.php | 19 + src/Record/Indi/Lds.php | 40 ++ src/Record/Indi/Name.php | 52 +++ src/Record/Indi/Name/Fone.php | 77 ++++ src/Record/Indi/Name/Romn.php | 77 ++++ src/Record/Indi/Nati.php | 19 + src/Record/Indi/Natu.php | 19 + src/Record/Indi/Nchi.php | 19 + src/Record/Indi/Nmr.php | 19 + src/Record/Indi/Note.php | 19 + src/Record/Indi/Occu.php | 19 + src/Record/Indi/Ordn.php | 19 + src/Record/Indi/Prob.php | 19 + src/Record/Indi/Prop.php | 19 + src/Record/Indi/Reli.php | 19 + src/Record/Indi/Resi.php | 19 + src/Record/Indi/Reti.php | 19 + src/Record/Indi/Slgc.php | 20 + src/Record/Indi/Ssn.php | 19 + src/Record/Indi/Titl.php | 19 + src/Record/Indi/Will.php | 19 + src/Record/Note.php | 38 ++ src/Record/NoteRef.php | 39 ++ src/Record/Noteable.php | 20 + src/Record/Obje.php | 50 +++ src/Record/ObjeRef.php | 36 ++ src/Record/ObjeRef/File.php | 34 ++ src/Record/ObjeRef/File/Form.php | 40 ++ src/Record/Objectable.php | 20 + src/Record/Phon.php | 48 ++ src/Record/Plac.php | 55 +++ src/Record/Plac/Fone.php | 33 ++ src/Record/Plac/Map.php | 33 ++ src/Record/Plac/Romn.php | 33 ++ src/Record/Refn.php | 73 +++ src/Record/Repo.php | 303 +++++++++++++ src/Record/RepoRef.php | 29 ++ src/Record/Sour.php | 348 +++++++++++++++ src/Record/Sour/Data.php | 33 ++ src/Record/Sour/Data/Even.php | 21 + src/Record/Sour/Repo.php | 41 ++ src/Record/Sour/Repo/Caln.php | 27 ++ src/Record/SourRef.php | 30 ++ src/Record/SourRef/Data.php | 27 ++ src/Record/SourRef/Even.php | 21 + src/Record/Sourceable.php | 20 + src/Record/Subm.php | 360 +++++++++++++++ src/Record/Subn.php | 257 +++++++++++ src/Writer.php | 128 ++++++ src/Writer/Addr.php | 47 ++ src/Writer/Caln.php | 46 ++ src/Writer/Chan.php | 51 +++ src/Writer/Fam.php | 153 +++++++ src/Writer/Fam/Even.php | 134 ++++++ src/Writer/Fam/Even/Husb.php | 41 ++ src/Writer/Fam/Even/Wife.php | 41 ++ src/Writer/Fam/Slgs.php | 76 ++++ src/Writer/Head.php | 127 ++++++ src/Writer/Head/Char.php | 47 ++ src/Writer/Head/Date.php | 46 ++ src/Writer/Head/Gedc.php | 46 ++ src/Writer/Head/Plac.php | 40 ++ src/Writer/Head/Sour.php | 67 +++ src/Writer/Head/Sour/Corp.php | 59 +++ src/Writer/Head/Sour/Data.php | 53 +++ src/Writer/Indi.php | 245 ++++++++++ src/Writer/Indi/Asso.php | 62 +++ src/Writer/Indi/Attr.php | 31 ++ src/Writer/Indi/Even.php | 126 ++++++ src/Writer/Indi/Even/Plac.php | 65 +++ src/Writer/Indi/Famc.php | 54 +++ src/Writer/Indi/Fams.php | 48 ++ src/Writer/Indi/Name.php | 87 ++++ src/Writer/Note.php | 80 ++++ src/Writer/NoteRef.php | 47 ++ src/Writer/Obje.php | 104 +++++ src/Writer/ObjeRef.php | 67 +++ src/Writer/Phon.php | 32 ++ src/Writer/Refn.php | 44 ++ src/Writer/Repo.php | 96 ++++ src/Writer/RepoRef.php | 57 +++ src/Writer/Sour.php | 123 +++++ src/Writer/Sour/Data.php | 70 +++ src/Writer/Sour/Data/Even.php | 46 ++ src/Writer/SourRef.php | 72 +++ src/Writer/SourRef/Even.php | 47 ++ src/Writer/Subm.php | 111 +++++ src/Writer/Subn.php | 81 ++++ 252 files changed, 14565 insertions(+) create mode 100644 src/Gedcom.php create mode 100644 src/Parser.php create mode 100644 src/Parser/Addr.php create mode 100644 src/Parser/Caln.php create mode 100644 src/Parser/Chan.php create mode 100644 src/Parser/Component.php create mode 100644 src/Parser/Date.php create mode 100644 src/Parser/Fam.php create mode 100644 src/Parser/Fam/Anul.php create mode 100644 src/Parser/Fam/Cens.php create mode 100644 src/Parser/Fam/Div.php create mode 100644 src/Parser/Fam/Divf.php create mode 100644 src/Parser/Fam/Enga.php create mode 100644 src/Parser/Fam/Even.php create mode 100644 src/Parser/Fam/Even/Husb.php create mode 100644 src/Parser/Fam/Even/Wife.php create mode 100644 src/Parser/Fam/Marb.php create mode 100644 src/Parser/Fam/Marc.php create mode 100644 src/Parser/Fam/Marl.php create mode 100644 src/Parser/Fam/Marr.php create mode 100644 src/Parser/Fam/Mars.php create mode 100644 src/Parser/Fam/Slgs.php create mode 100644 src/Parser/Fam/Slgs/Stat.php create mode 100644 src/Parser/Head.php create mode 100644 src/Parser/Head/Char.php create mode 100644 src/Parser/Head/Date.php create mode 100644 src/Parser/Head/Gedc.php create mode 100644 src/Parser/Head/Plac.php create mode 100644 src/Parser/Head/Sour.php create mode 100644 src/Parser/Head/Sour/Corp.php create mode 100644 src/Parser/Head/Sour/Data.php create mode 100644 src/Parser/Indi.php create mode 100644 src/Parser/Indi/Adop.php create mode 100644 src/Parser/Indi/Asso.php create mode 100644 src/Parser/Indi/Attr.php create mode 100644 src/Parser/Indi/Bapl.php create mode 100644 src/Parser/Indi/Bapm.php create mode 100644 src/Parser/Indi/Barm.php create mode 100644 src/Parser/Indi/Basm.php create mode 100644 src/Parser/Indi/Birt.php create mode 100644 src/Parser/Indi/Bles.php create mode 100644 src/Parser/Indi/Buri.php create mode 100644 src/Parser/Indi/Cast.php create mode 100644 src/Parser/Indi/Cens.php create mode 100644 src/Parser/Indi/Chr.php create mode 100644 src/Parser/Indi/Chra.php create mode 100644 src/Parser/Indi/Conf.php create mode 100644 src/Parser/Indi/Conl.php create mode 100644 src/Parser/Indi/Crem.php create mode 100644 src/Parser/Indi/Deat.php create mode 100644 src/Parser/Indi/Dscr.php create mode 100644 src/Parser/Indi/Educ.php create mode 100644 src/Parser/Indi/Emig.php create mode 100644 src/Parser/Indi/Endl.php create mode 100644 src/Parser/Indi/Even.php create mode 100644 src/Parser/Indi/Even/Plac.php create mode 100644 src/Parser/Indi/Famc.php create mode 100644 src/Parser/Indi/Fams.php create mode 100644 src/Parser/Indi/Fcom.php create mode 100644 src/Parser/Indi/Grad.php create mode 100644 src/Parser/Indi/Idno.php create mode 100644 src/Parser/Indi/Immi.php create mode 100644 src/Parser/Indi/Lds.php create mode 100644 src/Parser/Indi/Name.php create mode 100644 src/Parser/Indi/Name/Fone.php create mode 100644 src/Parser/Indi/Name/Romn.php create mode 100644 src/Parser/Indi/Nati.php create mode 100644 src/Parser/Indi/Natu.php create mode 100644 src/Parser/Indi/Nchi.php create mode 100644 src/Parser/Indi/Nmr.php create mode 100644 src/Parser/Indi/Occu.php create mode 100644 src/Parser/Indi/Ordn.php create mode 100644 src/Parser/Indi/Prob.php create mode 100644 src/Parser/Indi/Prop.php create mode 100644 src/Parser/Indi/Reli.php create mode 100644 src/Parser/Indi/Resi.php create mode 100644 src/Parser/Indi/Reti.php create mode 100644 src/Parser/Indi/Slgc.php create mode 100644 src/Parser/Indi/Ssn.php create mode 100644 src/Parser/Indi/Titl.php create mode 100644 src/Parser/Indi/Will.php create mode 100644 src/Parser/Note.php create mode 100644 src/Parser/NoteRef.php create mode 100644 src/Parser/Obje.php create mode 100644 src/Parser/ObjeRef.php create mode 100644 src/Parser/ObjeRef/File.php create mode 100644 src/Parser/ObjeRef/File/Form.php create mode 100644 src/Parser/Phon.php create mode 100644 src/Parser/Plac.php create mode 100644 src/Parser/Plac/Fone.php create mode 100644 src/Parser/Plac/Map.php create mode 100644 src/Parser/Plac/Romn.php create mode 100644 src/Parser/Refn.php create mode 100644 src/Parser/Repo.php create mode 100644 src/Parser/RepoRef.php create mode 100644 src/Parser/Sour.php create mode 100644 src/Parser/Sour/Data.php create mode 100644 src/Parser/Sour/Data/Even.php create mode 100644 src/Parser/Sour/Repo.php create mode 100644 src/Parser/Sour/Repo/Caln.php create mode 100644 src/Parser/SourRef.php create mode 100644 src/Parser/SourRef/Data.php create mode 100644 src/Parser/SourRef/Even.php create mode 100644 src/Parser/Subm.php create mode 100644 src/Parser/Subn.php create mode 100644 src/Record.php create mode 100644 src/Record/Addr.php create mode 100644 src/Record/Caln.php create mode 100644 src/Record/Chan.php create mode 100644 src/Record/Data.php create mode 100644 src/Record/Date.php create mode 100644 src/Record/Fam.php create mode 100644 src/Record/Fam/Anul.php create mode 100644 src/Record/Fam/Cens.php create mode 100644 src/Record/Fam/Div.php create mode 100644 src/Record/Fam/Enga.php create mode 100644 src/Record/Fam/Even.php create mode 100644 src/Record/Fam/Even/Husb.php create mode 100644 src/Record/Fam/Even/Wife.php create mode 100644 src/Record/Fam/Marb.php create mode 100644 src/Record/Fam/Marc.php create mode 100644 src/Record/Fam/Marl.php create mode 100644 src/Record/Fam/Marr.php create mode 100644 src/Record/Fam/Mars.php create mode 100644 src/Record/Fam/Slgs.php create mode 100644 src/Record/Fam/Slgs/Stat.php create mode 100644 src/Record/Head.php create mode 100644 src/Record/Head/Char.php create mode 100644 src/Record/Head/Date.php create mode 100644 src/Record/Head/Gedc.php create mode 100644 src/Record/Head/Plac.php create mode 100644 src/Record/Head/Sour.php create mode 100644 src/Record/Head/Sour/Corp.php create mode 100644 src/Record/Head/Sour/Data.php create mode 100644 src/Record/Indi.php create mode 100644 src/Record/Indi/Adop.php create mode 100644 src/Record/Indi/Asso.php create mode 100644 src/Record/Indi/Attr.php create mode 100644 src/Record/Indi/Bapl.php create mode 100644 src/Record/Indi/Bapm.php create mode 100644 src/Record/Indi/Barm.php create mode 100644 src/Record/Indi/Basm.php create mode 100644 src/Record/Indi/Birt.php create mode 100644 src/Record/Indi/Bles.php create mode 100644 src/Record/Indi/Buri.php create mode 100644 src/Record/Indi/Cast.php create mode 100644 src/Record/Indi/Cens.php create mode 100644 src/Record/Indi/Chr.php create mode 100644 src/Record/Indi/Chra.php create mode 100644 src/Record/Indi/Conf.php create mode 100644 src/Record/Indi/Conl.php create mode 100644 src/Record/Indi/Crem.php create mode 100644 src/Record/Indi/Deat.php create mode 100644 src/Record/Indi/Dscr.php create mode 100644 src/Record/Indi/Educ.php create mode 100644 src/Record/Indi/Emig.php create mode 100644 src/Record/Indi/Endl.php create mode 100644 src/Record/Indi/Even.php create mode 100644 src/Record/Indi/Even/Plac.php create mode 100644 src/Record/Indi/Famc.php create mode 100644 src/Record/Indi/Fams.php create mode 100644 src/Record/Indi/Fcom.php create mode 100644 src/Record/Indi/Grad.php create mode 100644 src/Record/Indi/Idno.php create mode 100644 src/Record/Indi/Immi.php create mode 100644 src/Record/Indi/Lds.php create mode 100644 src/Record/Indi/Name.php create mode 100644 src/Record/Indi/Name/Fone.php create mode 100644 src/Record/Indi/Name/Romn.php create mode 100644 src/Record/Indi/Nati.php create mode 100644 src/Record/Indi/Natu.php create mode 100644 src/Record/Indi/Nchi.php create mode 100644 src/Record/Indi/Nmr.php create mode 100644 src/Record/Indi/Note.php create mode 100644 src/Record/Indi/Occu.php create mode 100644 src/Record/Indi/Ordn.php create mode 100644 src/Record/Indi/Prob.php create mode 100644 src/Record/Indi/Prop.php create mode 100644 src/Record/Indi/Reli.php create mode 100644 src/Record/Indi/Resi.php create mode 100644 src/Record/Indi/Reti.php create mode 100644 src/Record/Indi/Slgc.php create mode 100644 src/Record/Indi/Ssn.php create mode 100644 src/Record/Indi/Titl.php create mode 100644 src/Record/Indi/Will.php create mode 100644 src/Record/Note.php create mode 100644 src/Record/NoteRef.php create mode 100644 src/Record/Noteable.php create mode 100644 src/Record/Obje.php create mode 100644 src/Record/ObjeRef.php create mode 100644 src/Record/ObjeRef/File.php create mode 100644 src/Record/ObjeRef/File/Form.php create mode 100644 src/Record/Objectable.php create mode 100644 src/Record/Phon.php create mode 100644 src/Record/Plac.php create mode 100644 src/Record/Plac/Fone.php create mode 100644 src/Record/Plac/Map.php create mode 100644 src/Record/Plac/Romn.php create mode 100644 src/Record/Refn.php create mode 100644 src/Record/Repo.php create mode 100644 src/Record/RepoRef.php create mode 100644 src/Record/Sour.php create mode 100644 src/Record/Sour/Data.php create mode 100644 src/Record/Sour/Data/Even.php create mode 100644 src/Record/Sour/Repo.php create mode 100644 src/Record/Sour/Repo/Caln.php create mode 100644 src/Record/SourRef.php create mode 100644 src/Record/SourRef/Data.php create mode 100644 src/Record/SourRef/Even.php create mode 100644 src/Record/Sourceable.php create mode 100644 src/Record/Subm.php create mode 100644 src/Record/Subn.php create mode 100644 src/Writer.php create mode 100644 src/Writer/Addr.php create mode 100644 src/Writer/Caln.php create mode 100644 src/Writer/Chan.php create mode 100644 src/Writer/Fam.php create mode 100644 src/Writer/Fam/Even.php create mode 100644 src/Writer/Fam/Even/Husb.php create mode 100644 src/Writer/Fam/Even/Wife.php create mode 100644 src/Writer/Fam/Slgs.php create mode 100644 src/Writer/Head.php create mode 100644 src/Writer/Head/Char.php create mode 100644 src/Writer/Head/Date.php create mode 100644 src/Writer/Head/Gedc.php create mode 100644 src/Writer/Head/Plac.php create mode 100644 src/Writer/Head/Sour.php create mode 100644 src/Writer/Head/Sour/Corp.php create mode 100644 src/Writer/Head/Sour/Data.php create mode 100644 src/Writer/Indi.php create mode 100644 src/Writer/Indi/Asso.php create mode 100644 src/Writer/Indi/Attr.php create mode 100644 src/Writer/Indi/Even.php create mode 100644 src/Writer/Indi/Even/Plac.php create mode 100644 src/Writer/Indi/Famc.php create mode 100644 src/Writer/Indi/Fams.php create mode 100644 src/Writer/Indi/Name.php create mode 100644 src/Writer/Note.php create mode 100644 src/Writer/NoteRef.php create mode 100644 src/Writer/Obje.php create mode 100644 src/Writer/ObjeRef.php create mode 100644 src/Writer/Phon.php create mode 100644 src/Writer/Refn.php create mode 100644 src/Writer/Repo.php create mode 100644 src/Writer/RepoRef.php create mode 100644 src/Writer/Sour.php create mode 100644 src/Writer/Sour/Data.php create mode 100644 src/Writer/Sour/Data/Even.php create mode 100644 src/Writer/SourRef.php create mode 100644 src/Writer/SourRef/Even.php create mode 100644 src/Writer/Subm.php create mode 100644 src/Writer/Subn.php diff --git a/src/Gedcom.php b/src/Gedcom.php new file mode 100644 index 00000000..d12fc885 --- /dev/null +++ b/src/Gedcom.php @@ -0,0 +1,275 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Gedcom; + +/** + * Class Gedcom. + */ +class Gedcom +{ + /** + * Stores the header information of the GEDCOM file. + * + * @var \Record\Head + */ + protected $head; + + /** + * Stores the submission information for the GEDCOM file. + * + * @var \Record\Subn + */ + protected $subn; + + /** + * Stores sources cited throughout the GEDCOM file. + * + * @var \Record\Sour[] + */ + protected $sour = []; + + /** + * Stores all the individuals contained within the GEDCOM file. + * + * @var \Record\Indi[] + */ + protected $indi = []; + + /** + * Stores all the individuals contained within the GEDCOM file. + * + * @var array + */ + protected $uid2indi = []; + + /** + * Stores all the families contained within the GEDCOM file. + * + * @var \Record\Fam[] + */ + protected $fam = []; + + /** + * Stores all the notes contained within the GEDCOM file that are not inline. + * + * @var \Record\Note[] + */ + protected $note = []; + + /** + * Stores all repositories that are contained within the GEDCOM file and referenced by sources. + * + * @var \Record\Repo[] + */ + protected $repo = []; + + /** + * Stores all the media objects that are contained within the GEDCOM file. + * + * @var \Record\Obje[] + */ + protected $obje = []; + + /** + * Stores information about all the submitters to the GEDCOM file. + * + * @var \Record\Subm[] + */ + protected $subm = []; + + /** + * 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; + if ($indi->getUid()) { + $this->uid2indi[$indi->getUid()] = $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 \Record\Subm[] + */ + public function getSubm() + { + return $this->subm; + } + + /** + * Gets the collection of individuals stored in the GEDCOM file. + * + * @return \Record\Indi[] + */ + public function getIndi() + { + return $this->indi; + } + + /** + * Gets the collection of families stored in the GEDCOM file. + * + * @return \Record\Fam[] + */ + public function getFam() + { + return $this->fam; + } + + /** + * Gets the collection of repositories stored in the GEDCOM file. + * + * @return \Record\Repo[] + */ + public function getRepo() + { + return $this->repo; + } + + /** + * Gets the collection of sources stored in the GEDCOM file. + * + * @return \Record\Sour[] + */ + public function getSour() + { + return $this->sour; + } + + /** + * Gets the collection of note stored in the GEDCOM file. + * + * @return \Record\Note[] + */ + public function getNote() + { + return $this->note; + } + + /** + * Gets the collection of objects stored in the GEDCOM file. + * + * @return \Record\Obje[] + */ + public function getObje() + { + return $this->obje; + } +} diff --git a/src/Parser.php b/src/Parser.php new file mode 100644 index 00000000..3f8c8779 --- /dev/null +++ b/src/Parser.php @@ -0,0 +1,275 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Gedcom; + +class Parser +{ + protected $_file = null; + + protected $_gedcom = null; + + protected $_errorLog = []; + + protected $_linesParsed = 0; + + protected $_line = ''; + + protected $_lineRecord = null; + + protected $_linePieces = 0; + + protected $_returnedLine = ''; + + public function __construct(Gedcom $gedcom = null) + { + if (!is_null($gedcom)) { + $this->_gedcom = $gedcom; + } else { + $this->_gedcom = new 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)) { + if ($this->_linePieces == $pieces) { + return $this->_lineRecord; + } + } + + if (empty($this->_line)) { + return false; + } + + $line = trim($this->_line); + + $this->_lineRecord = explode(' ', $line, $pieces); + $this->_linePieces = $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): + if (isset($record[1])) { + $identifier = $this->normalizeIdentifier($record[1]); + } + + if (isset($record[1]) && trim($record[1]) == 'HEAD') { + \Parser\Head::parse($this); + } elseif (isset($record[2]) && trim($record[2]) == 'SUBN') { + \Parser\Subn::parse($this); + } elseif (isset($record[2]) && trim($record[2]) == 'SUBM') { + \Parser\Subm::parse($this); + } elseif (isset($record[2]) && $record[2] == 'SOUR') { + \Parser\Sour::parse($this); + } elseif (isset($record[2]) && $record[2] == 'INDI') { + \Parser\Indi::parse($this); + } elseif (isset($record[2]) && $record[2] == 'FAM') { + \Parser\Fam::parse($this); + } elseif (isset($record[2]) && substr(trim($record[2]), 0, 4) == 'NOTE') { + \Parser\Note::parse($this); + } elseif (isset($record[2]) && $record[2] == 'REPO') { + \Parser\Repo::parse($this); + } elseif (isset($record[2]) && $record[2] == 'OBJE') { + \Parser\Obje::parse($this); + } elseif (isset($record[1]) && 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/src/Parser/Addr.php b/src/Parser/Addr.php new file mode 100644 index 00000000..9ca44cb8 --- /dev/null +++ b/src/Parser/Addr.php @@ -0,0 +1,58 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +class Addr extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + $line = isset($record[2]) ? trim($record[2]) : ''; + + $addr = new \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/src/Parser/Caln.php b/src/Parser/Caln.php new file mode 100644 index 00000000..8721c4a1 --- /dev/null +++ b/src/Parser/Caln.php @@ -0,0 +1,57 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +class Caln extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $identifier = $parser->normalizeIdentifier($record[2]); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $caln = new \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/src/Parser/Chan.php b/src/Parser/Chan.php new file mode 100644 index 00000000..9f7dbbe8 --- /dev/null +++ b/src/Parser/Chan.php @@ -0,0 +1,60 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +class Chan extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + + $parser->forward(); + + $chan = new \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 = \Parser\NoteRef::parse($parser); + if ($note) { + $chan->addNote($note); + } + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $chan; + } +} diff --git a/src/Parser/Component.php b/src/Parser/Component.php new file mode 100644 index 00000000..b30b1a0c --- /dev/null +++ b/src/Parser/Component.php @@ -0,0 +1,22 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +abstract class Component +{ + public static function parse(\Gedcom\Parser $parser) + { + } +} diff --git a/src/Parser/Date.php b/src/Parser/Date.php new file mode 100644 index 00000000..82a5ed71 --- /dev/null +++ b/src/Parser/Date.php @@ -0,0 +1,36 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +class Date extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[1])) { + $dat = new \Record\Date(); + if (!empty($record[2])) { + $dat->setDate($record[2]); + } + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + return $dat; + } +} diff --git a/src/Parser/Fam.php b/src/Parser/Fam.php new file mode 100644 index 00000000..0b1eab82 --- /dev/null +++ b/src/Parser/Fam.php @@ -0,0 +1,136 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +class Fam extends \Parser\Component +{ + protected static $_eventTypes = [ + 'ANUL', + 'CENS', + 'DIV', + 'DIVF', + 'ENGA', + 'MARR', + 'MARB', + 'MARC', + 'MARL', + 'MARS', + ]; + + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[1])) { + $identifier = $parser->normalizeIdentifier($record[1]); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $fam = new \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 'RESN': + $fam->setResn(trim($record[2])); + 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 = '\\Gedcom\\Parser\\Fam\\'.$className; + + $even = $class::parse($parser); + $fam->addEven($even); + break; + 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 'SLGS': + $slgs = \Parser\Fam\Slgs::parse($parser); + $fam->addSlgs($slgs); + break; + case 'REFN': + $ref = \Parser\Refn::parse($parser); + $fam->addRefn($ref); + break; + case 'RIN': + $fam->setRin(trim($record[2])); + break; + case 'CHAN': + $chan = \Parser\Chan::parse($parser); + $fam->setChan($chan); + break; + case 'NOTE': + $note = \Parser\NoteRef::parse($parser); + if ($note) { + $fam->addNote($note); + } + break; + case 'SOUR': + $sour = \Parser\SourRef::parse($parser); + $fam->addSour($sour); + break; + case 'OBJE': + $obje = \Parser\ObjeRef::parse($parser); + $fam->addObje($obje); + break; + + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $fam; + } +} diff --git a/src/Parser/Fam/Anul.php b/src/Parser/Fam/Anul.php new file mode 100644 index 00000000..48e107f9 --- /dev/null +++ b/src/Parser/Fam/Anul.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Fam; + +class Anul extends \Parser\Fam\Even +{ +} diff --git a/src/Parser/Fam/Cens.php b/src/Parser/Fam/Cens.php new file mode 100644 index 00000000..9a9b0fef --- /dev/null +++ b/src/Parser/Fam/Cens.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Fam; + +class Cens extends \Parser\Fam\Even +{ +} diff --git a/src/Parser/Fam/Div.php b/src/Parser/Fam/Div.php new file mode 100644 index 00000000..83ce27ac --- /dev/null +++ b/src/Parser/Fam/Div.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Fam; + +class Div extends \Parser\Fam\Even +{ +} diff --git a/src/Parser/Fam/Divf.php b/src/Parser/Fam/Divf.php new file mode 100644 index 00000000..6c3fa1b1 --- /dev/null +++ b/src/Parser/Fam/Divf.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Fam; + +class Divf extends \Parser\Fam\Even +{ +} diff --git a/src/Parser/Fam/Enga.php b/src/Parser/Fam/Enga.php new file mode 100644 index 00000000..90ff7b5d --- /dev/null +++ b/src/Parser/Fam/Enga.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Fam; + +class Enga extends \Parser\Fam\Even +{ +} diff --git a/src/Parser/Fam/Even.php b/src/Parser/Fam/Even.php new file mode 100644 index 00000000..f7d629c9 --- /dev/null +++ b/src/Parser/Fam/Even.php @@ -0,0 +1,103 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Fam; + +class Even extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + + $even = new \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': + $dat = \Parser\Date::parse($parser); + $even->setDate($dat); + //$even->setDate(trim($record[2])); + break; + case 'PLAC': + $plac = \Parser\Plac::parse($parser); + $even->setPlac($plac); + break; + case 'ADDR': + $addr = \Parser\Addr::parse($parser); + $even->setAddr($addr); + break; + case 'PHON': + $phone = \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 = \Parser\Fam\Even\Husb::parse($parser); + $even->setHusb($husb); + break; + case 'WIFE': + $wife = \Parser\Fam\Even\Wife::parse($parser); + $even->setWife($wife); + break; + case 'SOUR': + $sour = \Parser\SourRef::parse($parser); + $even->addSour($sour); + break; + case 'OBJE': + $obje = \Parser\ObjeRef::parse($parser); + $even->addObje($obje); + break; + case 'NOTE': + $note = \Parser\NoteRef::parse($parser); + if ($note) { + $even->addNote($note); + } + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $even; + } +} diff --git a/src/Parser/Fam/Even/Husb.php b/src/Parser/Fam/Even/Husb.php new file mode 100644 index 00000000..954e4005 --- /dev/null +++ b/src/Parser/Fam/Even/Husb.php @@ -0,0 +1,51 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Fam\Even; + +class Husb extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + + $husband = new \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/src/Parser/Fam/Even/Wife.php b/src/Parser/Fam/Even/Wife.php new file mode 100644 index 00000000..ea8b03a8 --- /dev/null +++ b/src/Parser/Fam/Even/Wife.php @@ -0,0 +1,51 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Fam\Even; + +class Wife extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + + $wife = new \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/src/Parser/Fam/Marb.php b/src/Parser/Fam/Marb.php new file mode 100644 index 00000000..f1f5acd2 --- /dev/null +++ b/src/Parser/Fam/Marb.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Fam; + +class Marb extends \Parser\Fam\Even +{ +} diff --git a/src/Parser/Fam/Marc.php b/src/Parser/Fam/Marc.php new file mode 100644 index 00000000..f3f920b6 --- /dev/null +++ b/src/Parser/Fam/Marc.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Fam; + +class Marc extends \Parser\Fam\Even +{ +} diff --git a/src/Parser/Fam/Marl.php b/src/Parser/Fam/Marl.php new file mode 100644 index 00000000..0c1bd560 --- /dev/null +++ b/src/Parser/Fam/Marl.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Fam; + +class Marl extends \Parser\Fam\Even +{ +} diff --git a/src/Parser/Fam/Marr.php b/src/Parser/Fam/Marr.php new file mode 100644 index 00000000..a090efc9 --- /dev/null +++ b/src/Parser/Fam/Marr.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Fam; + +class Marr extends \Parser\Fam\Even +{ +} diff --git a/src/Parser/Fam/Mars.php b/src/Parser/Fam/Mars.php new file mode 100644 index 00000000..459e1ebf --- /dev/null +++ b/src/Parser/Fam/Mars.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Fam; + +class Mars extends \Parser\Fam\Even +{ +} diff --git a/src/Parser/Fam/Slgs.php b/src/Parser/Fam/Slgs.php new file mode 100644 index 00000000..eea2a825 --- /dev/null +++ b/src/Parser/Fam/Slgs.php @@ -0,0 +1,71 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Fam; + +class Slgs extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + + $slgs = new \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': + $stat = \Parser\Fam\Slgs\Stat::parse($parser); + $slgs->setStat($stat); + 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 = \Parser\SourRef::parse($parser); + $slgs->addSour($sour); + break; + case 'NOTE': + $note = \Parser\NoteRef::parse($parser); + if ($note) { + $slgs->addNote($note); + } + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $slgs; + } +} diff --git a/src/Parser/Fam/Slgs/Stat.php b/src/Parser/Fam/Slgs/Stat.php new file mode 100644 index 00000000..58dcce31 --- /dev/null +++ b/src/Parser/Fam/Slgs/Stat.php @@ -0,0 +1,59 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Fam\Slgs; + +class Stat extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $_stat = $record[2]; + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $stat = new \Record\Fam\Slgs\Stat(); + $stat->setStat($_stat); + + $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': + $stat->setDate(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $stat; + } +} diff --git a/src/Parser/Head.php b/src/Parser/Head.php new file mode 100644 index 00000000..4488de39 --- /dev/null +++ b/src/Parser/Head.php @@ -0,0 +1,106 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +class Head extends \Parser\Component +{ + /** + * @param \Gedcom\Parser $parser + * + * @return \Record\Head + */ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[1])) { + $identifier = $parser->normalizeIdentifier($record[1]); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $head = new \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 = \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 = \Parser\Head\Date::parse($parser); + $head->setDate($date); + break; + case 'GEDC': + $gedc = \Parser\Head\Gedc::parse($parser); + $head->setGedc($gedc); + break; + case 'CHAR': + $char = \Parser\Head\Char::parse($parser); + $head->setChar($char); + break; + case 'PLAC': + $plac = \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/src/Parser/Head/Char.php b/src/Parser/Head/Char.php new file mode 100644 index 00000000..985ea1f9 --- /dev/null +++ b/src/Parser/Head/Char.php @@ -0,0 +1,57 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Head; + +class Char extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $char = new \Record\Head\Char(); + $char->setChar(trim($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $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/src/Parser/Head/Date.php b/src/Parser/Head/Date.php new file mode 100644 index 00000000..350888a8 --- /dev/null +++ b/src/Parser/Head/Date.php @@ -0,0 +1,57 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Head; + +class Date extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $date = new \Record\Head\Date(); + $date->setDate(trim($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $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/src/Parser/Head/Gedc.php b/src/Parser/Head/Gedc.php new file mode 100644 index 00000000..b5c1865f --- /dev/null +++ b/src/Parser/Head/Gedc.php @@ -0,0 +1,54 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Head; + +class Gedc extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + + $gedc = new \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->setVersion(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/src/Parser/Head/Plac.php b/src/Parser/Head/Plac.php new file mode 100644 index 00000000..c476cb02 --- /dev/null +++ b/src/Parser/Head/Plac.php @@ -0,0 +1,51 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Head; + +class Plac extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + + $plac = new \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/src/Parser/Head/Sour.php b/src/Parser/Head/Sour.php new file mode 100644 index 00000000..5e877d3d --- /dev/null +++ b/src/Parser/Head/Sour.php @@ -0,0 +1,68 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Head; + +class Sour extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $source = new \Record\Head\Sour(); + $source->setSour(trim($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $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 = \Parser\Head\Sour\Corp::parse($parser); + $source->setCorp($corp); + break; + case 'DATA': + $data = \Parser\Head\Sour\Data::parse($parser); + $source->setData($data); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $source; + } +} diff --git a/src/Parser/Head/Sour/Corp.php b/src/Parser/Head/Sour/Corp.php new file mode 100644 index 00000000..729f541c --- /dev/null +++ b/src/Parser/Head/Sour/Corp.php @@ -0,0 +1,60 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Head\Sour; + +class Corp extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $corp = new \Record\Head\Sour\Corp(); + $corp->setCorp(trim($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $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(\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/src/Parser/Head/Sour/Data.php b/src/Parser/Head/Sour/Data.php new file mode 100644 index 00000000..7e9ec14f --- /dev/null +++ b/src/Parser/Head/Sour/Data.php @@ -0,0 +1,60 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Head\Sour; + +class Data extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $data = new \Record\Head\Sour\Data(); + $data->setData(trim($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $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/src/Parser/Indi.php b/src/Parser/Indi.php new file mode 100644 index 00000000..bdc79c30 --- /dev/null +++ b/src/Parser/Indi.php @@ -0,0 +1,188 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +class Indi extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[1])) { + $identifier = $parser->normalizeIdentifier($record[1]); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $indi = new \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 '_UID': + $indi->setUid(trim($record[2])); + break; + case 'RESN': + $indi->setResn(trim($record[2])); + break; + case 'NAME': + $name = \Parser\Indi\Name::parse($parser); + $indi->addName($name); + break; + case 'SEX': + $indi->setSex(isset($record[2]) ? trim($record[2]) : ''); + 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 = '\\Gedcom\\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 = '\\Gedcom\\Parser\\Indi\\'.$className; + + $att = $class::parse($parser); + $indi->addAttr($att); + break; + case 'BAPL': + case 'CONL': + case 'ENDL': + case 'SLGC': + $className = ucfirst(strtolower($recordType)); + $class = '\\Gedcom\\Parser\\Indi\\'.$className; + + $lds = $class::parse($parser); + $indi->{'add'.$recordType}[] = $lds; + break; + case 'FAMC': + $famc = \Parser\Indi\Famc::parse($parser); + if ($famc) { + $indi->addFamc($famc); + } + break; + case 'FAMS': + $fams = \Parser\Indi\Fams::parse($parser); + if ($fams) { + $indi->addFams($fams); + } + break; + case 'SUBM': + $indi->addSubm($parser->normalizeIdentifier($record[2])); + break; + case 'ASSO': + $asso = \Parser\Indi\Asso::parse($parser); + $indi->addAsso($asso); + break; + case 'ALIA': + $indi->addAlia($parser->normalizeIdentifier($record[2])); + break; + case 'ANCI': + $indi->addAnci($parser->normalizeIdentifier($record[2])); + break; + case 'DESI': + $indi->addDesi($parser->normalizeIdentifier($record[2])); + break; + case 'RFN': + $indi->setRfn(trim($record[2])); + break; + case 'AFN': + $indi->setAfn(trim($record[2])); + break; + case 'REFN': + $ref = \Parser\Refn::parse($parser); + $indi->addRefn($ref); + break; + case 'RIN': + $indi->setRin(trim($record[2])); + break; + case 'CHAN': + $chan = \Parser\Chan::parse($parser); + $indi->setChan($chan); + break; + case 'NOTE': + $note = \Parser\NoteRef::parse($parser); + if ($note) { + $indi->addNote($note); + } + break; + case 'SOUR': + $sour = \Parser\SourRef::parse($parser); + $indi->addSour($sour); + break; + case 'OBJE': + $obje = \Parser\ObjeRef::parse($parser); + $indi->addObje($obje); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $indi; + } +} diff --git a/src/Parser/Indi/Adop.php b/src/Parser/Indi/Adop.php new file mode 100644 index 00000000..5bb84ebf --- /dev/null +++ b/src/Parser/Indi/Adop.php @@ -0,0 +1,34 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Adop extends \Parser\Indi\Even +{ + public static function parseAdop($parser, $even) + { + $record = $parser->getCurrentLineRecord(); + if (isset($record[1])) { + $even->setAdop(trim($record[2])); + } + } + + public static function parseFamc($parser, $even) + { + $record = $parser->getCurrentLineRecord(); + if (isset($record[1])) { + $even->setFamc(trim($record[2])); + } + } +} diff --git a/src/Parser/Indi/Asso.php b/src/Parser/Indi/Asso.php new file mode 100644 index 00000000..4b4f3d5d --- /dev/null +++ b/src/Parser/Indi/Asso.php @@ -0,0 +1,67 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Asso extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $asso = new \Record\Indi\Asso(); + $asso->setIndi($parser->normalizeIdentifier($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $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 = \Parser\SourRef::parse($parser); + $asso->addSour($sour); + break; + case 'NOTE': + $note = \Parser\NoteRef::parse($parser); + if ($note) { + $asso->addNote($note); + } + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $asso; + } +} diff --git a/src/Parser/Indi/Attr.php b/src/Parser/Indi/Attr.php new file mode 100644 index 00000000..ff1f3f6c --- /dev/null +++ b/src/Parser/Indi/Attr.php @@ -0,0 +1,100 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +abstract class Attr extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[1])) { + $className = '\\Gedcom\\Record\\Indi\\'.ucfirst(strtolower(trim($record[1]))); + $attr = new $className(); + + $attr->setType(trim($record[1])); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + 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 = \Parser\Indi\Even\Plac::parse($parser); + $attr->setPlac($plac); + break; + case 'ADDR': + $attr->setAddr(\Parser\Addr::parse($parser)); + break; + case 'PHON': + $phone = \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 = \Parser\SourRef::parse($parser); + $attr->addSour($sour); + break; + case 'OBJE': + $obje = \Parser\ObjeRef::parse($parser); + $attr->addObje($obje); + break; + case 'NOTE': + $note = \Parser\NoteRef::parse($parser); + if ($note) { + $attr->addNote($note); + } + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $attr; + } +} diff --git a/src/Parser/Indi/Bapl.php b/src/Parser/Indi/Bapl.php new file mode 100644 index 00000000..2cc8296b --- /dev/null +++ b/src/Parser/Indi/Bapl.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Bapl extends Lds +{ +} diff --git a/src/Parser/Indi/Bapm.php b/src/Parser/Indi/Bapm.php new file mode 100644 index 00000000..b27edd7a --- /dev/null +++ b/src/Parser/Indi/Bapm.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Bapm extends \Parser\Indi\Even +{ +} diff --git a/src/Parser/Indi/Barm.php b/src/Parser/Indi/Barm.php new file mode 100644 index 00000000..e7b1736b --- /dev/null +++ b/src/Parser/Indi/Barm.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Barm extends \Parser\Indi\Even +{ +} diff --git a/src/Parser/Indi/Basm.php b/src/Parser/Indi/Basm.php new file mode 100644 index 00000000..3265d3bb --- /dev/null +++ b/src/Parser/Indi/Basm.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Basm extends \Parser\Indi\Even +{ +} diff --git a/src/Parser/Indi/Birt.php b/src/Parser/Indi/Birt.php new file mode 100644 index 00000000..26dab437 --- /dev/null +++ b/src/Parser/Indi/Birt.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Birt extends \Parser\Indi\Even +{ + public static function parseFamc($parser, $even) + { + $record = $parser->getCurrentLineRecord(); + if (isset($record[2])) { + $even->setFamc(trim($record[2])); + } + } +} diff --git a/src/Parser/Indi/Bles.php b/src/Parser/Indi/Bles.php new file mode 100644 index 00000000..d3c09c55 --- /dev/null +++ b/src/Parser/Indi/Bles.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Bles extends \Parser\Indi\Even +{ +} diff --git a/src/Parser/Indi/Buri.php b/src/Parser/Indi/Buri.php new file mode 100644 index 00000000..5d2fadd7 --- /dev/null +++ b/src/Parser/Indi/Buri.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Buri extends \Parser\Indi\Even +{ +} diff --git a/src/Parser/Indi/Cast.php b/src/Parser/Indi/Cast.php new file mode 100644 index 00000000..38452c93 --- /dev/null +++ b/src/Parser/Indi/Cast.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Cast extends \Parser\Indi\Attr +{ +} diff --git a/src/Parser/Indi/Cens.php b/src/Parser/Indi/Cens.php new file mode 100644 index 00000000..9ea80446 --- /dev/null +++ b/src/Parser/Indi/Cens.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Cens extends \Parser\Indi\Even +{ +} diff --git a/src/Parser/Indi/Chr.php b/src/Parser/Indi/Chr.php new file mode 100644 index 00000000..af028600 --- /dev/null +++ b/src/Parser/Indi/Chr.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Chr extends \Parser\Indi\Even +{ + public static function parseFamc($parser, $even) + { + $record = $parser->getCurrentLineRecord(); + if (isset($record[2])) { + $even->setFamc(trim($record[2])); + } + } +} diff --git a/src/Parser/Indi/Chra.php b/src/Parser/Indi/Chra.php new file mode 100644 index 00000000..cae82714 --- /dev/null +++ b/src/Parser/Indi/Chra.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Chra extends \Parser\Indi\Even +{ +} diff --git a/src/Parser/Indi/Conf.php b/src/Parser/Indi/Conf.php new file mode 100644 index 00000000..9ebc7849 --- /dev/null +++ b/src/Parser/Indi/Conf.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Conf extends \Parser\Indi\Even +{ +} diff --git a/src/Parser/Indi/Conl.php b/src/Parser/Indi/Conl.php new file mode 100644 index 00000000..952e976a --- /dev/null +++ b/src/Parser/Indi/Conl.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Conl extends Lds +{ +} diff --git a/src/Parser/Indi/Crem.php b/src/Parser/Indi/Crem.php new file mode 100644 index 00000000..44c5ca58 --- /dev/null +++ b/src/Parser/Indi/Crem.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Crem extends \Parser\Indi\Even +{ +} diff --git a/src/Parser/Indi/Deat.php b/src/Parser/Indi/Deat.php new file mode 100644 index 00000000..a1da3de8 --- /dev/null +++ b/src/Parser/Indi/Deat.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Deat extends \Parser\Indi\Even +{ +} diff --git a/src/Parser/Indi/Dscr.php b/src/Parser/Indi/Dscr.php new file mode 100644 index 00000000..90b7bbff --- /dev/null +++ b/src/Parser/Indi/Dscr.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Dscr extends \Parser\Indi\Attr +{ +} diff --git a/src/Parser/Indi/Educ.php b/src/Parser/Indi/Educ.php new file mode 100644 index 00000000..f90d7784 --- /dev/null +++ b/src/Parser/Indi/Educ.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Educ extends \Parser\Indi\Attr +{ +} diff --git a/src/Parser/Indi/Emig.php b/src/Parser/Indi/Emig.php new file mode 100644 index 00000000..2fb99fe6 --- /dev/null +++ b/src/Parser/Indi/Emig.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Emig extends \Parser\Indi\Even +{ +} diff --git a/src/Parser/Indi/Endl.php b/src/Parser/Indi/Endl.php new file mode 100644 index 00000000..2d0fbd22 --- /dev/null +++ b/src/Parser/Indi/Endl.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Endl extends Lds +{ +} diff --git a/src/Parser/Indi/Even.php b/src/Parser/Indi/Even.php new file mode 100644 index 00000000..55ccfaa1 --- /dev/null +++ b/src/Parser/Indi/Even.php @@ -0,0 +1,125 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +use Parser\Chan; + +class Even extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (empty($record[1])) { + $parser->skipToNextLevel($depth); + + return null; + } + + $even = null; + + if (strtoupper(trim($record[1])) != 'EVEN') { + $className = '\\Gedcom\\Record\\Indi\\'.ucfirst(strtolower(trim($record[1]))); + $even = new $className(); + } else { + $even = new \Record\Indi\Even(); + } + + if (isset($record[1]) && strtoupper(trim($record[1])) != 'EVEN') { + $even->setType(trim($record[1])); + } + + // ensures we capture any data following the EVEN type + if (isset($record[2]) && !empty($record[2])) { + $even->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': + $even->setType(trim($record[2])); + break; + case 'DATE': + $dat = \Parser\Date::parse($parser); + $even->setDate($dat); + //$even->setDate(trim($record[2])) + break; + case 'PLAC': + $plac = \Parser\Plac::parse($parser); + $even->setPlac($plac); + break; + case 'ADDR': + $even->setAddr(\Parser\Addr::parse($parser)); + break; + case 'PHON': + $phone = \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 'SOUR': + $sour = \Parser\SourRef::parse($parser); + $even->addSour($sour); + break; + case 'OBJE': + $obje = \Parser\ObjeRef::parse($parser); + $even->addObje($obje); + break; + case 'NOTE': + $note = \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/src/Parser/Indi/Even/Plac.php b/src/Parser/Indi/Even/Plac.php new file mode 100644 index 00000000..4e519a8b --- /dev/null +++ b/src/Parser/Indi/Even/Plac.php @@ -0,0 +1,65 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi\Even; + +class Plac extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + + $plac = new \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 = \Parser\NoteRef::parse($parser); + if ($note) { + $plac->addNote($note); + } + break; + case 'SOUR': + $sour = \Parser\SourRef::parse($parser); + $plac->addSour($sour); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $plac; + } +} diff --git a/src/Parser/Indi/Famc.php b/src/Parser/Indi/Famc.php new file mode 100644 index 00000000..1c22e039 --- /dev/null +++ b/src/Parser/Indi/Famc.php @@ -0,0 +1,67 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Famc extends \Parser\Component +{ + public static function parse(\Gedcom\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 \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 = \Parser\NoteRef::parse($parser); + if ($note) { + $fam->addNote($note); + } + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $fam; + } +} diff --git a/src/Parser/Indi/Fams.php b/src/Parser/Indi/Fams.php new file mode 100644 index 00000000..815be836 --- /dev/null +++ b/src/Parser/Indi/Fams.php @@ -0,0 +1,64 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Fams extends \Parser\Component +{ + public static function parse(\Gedcom\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 \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 = \Parser\NoteRef::parse($parser); + if ($note) { + $fam->addNote($note); + } + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $fam; + } +} diff --git a/src/Parser/Indi/Fcom.php b/src/Parser/Indi/Fcom.php new file mode 100644 index 00000000..00acd2cb --- /dev/null +++ b/src/Parser/Indi/Fcom.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Fcom extends \Parser\Indi\Even +{ +} diff --git a/src/Parser/Indi/Grad.php b/src/Parser/Indi/Grad.php new file mode 100644 index 00000000..a053890e --- /dev/null +++ b/src/Parser/Indi/Grad.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Grad extends \Parser\Indi\Even +{ +} diff --git a/src/Parser/Indi/Idno.php b/src/Parser/Indi/Idno.php new file mode 100644 index 00000000..87bb3de7 --- /dev/null +++ b/src/Parser/Indi/Idno.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Idno extends \Parser\Indi\Attr +{ +} diff --git a/src/Parser/Indi/Immi.php b/src/Parser/Indi/Immi.php new file mode 100644 index 00000000..818dfdde --- /dev/null +++ b/src/Parser/Indi/Immi.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Immi extends \Parser\Indi\Even +{ +} diff --git a/src/Parser/Indi/Lds.php b/src/Parser/Indi/Lds.php new file mode 100644 index 00000000..0a405702 --- /dev/null +++ b/src/Parser/Indi/Lds.php @@ -0,0 +1,83 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +abstract class Lds extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[1])) { + $className = '\\Gedcom\\Record\\Indi\\'.ucfirst(strtolower(trim($record[1]))); + $lds = new $className(); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $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 = \Parser\SourRef::parse($parser); + $lds->addSour($sour); + break; + case 'NOTE': + $note = \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/src/Parser/Indi/Name.php b/src/Parser/Indi/Name.php new file mode 100644 index 00000000..5d22c880 --- /dev/null +++ b/src/Parser/Indi/Name.php @@ -0,0 +1,95 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Name extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $name = new \Record\Indi\Name(); + $name->setName(trim($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $parser->forward(); + + while (!$parser->eof()) { + $record = $parser->getCurrentLineRecord(); + $recordType = strtoupper(trim($record[1])); + $currentDepth = (int) $record[0]; + + if ($currentDepth <= $depth) { + $parser->back(); + break; + } + + if (!isset($record[2])) { + $record[2] = ''; + } + + switch ($recordType) { + case 'TYPE': + $name->setType(trim($record[2])); + break; + 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 = \Parser\SourRef::parse($parser); + $name->addSour($sour); + break; + case 'NOTE': + $note = \Parser\NoteRef::parse($parser); + if ($note) { + $name->addNote($note); + } + break; + case 'FONE': + $name->setFone(\Parser\Indi\Name\Fone::parse($parser)); + break; + case 'ROMN': + $name->setRomn(\Parser\Indi\Name\Romn::parse($parser)); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $name; + } +} diff --git a/src/Parser/Indi/Name/Fone.php b/src/Parser/Indi/Name/Fone.php new file mode 100644 index 00000000..798dc1ff --- /dev/null +++ b/src/Parser/Indi/Name/Fone.php @@ -0,0 +1,77 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi\Name; + +class Fone extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $fone = new \Record\Indi\Name\Fone(); + $fone->setFone(trim($record[2])); + } else { + return null; + } + + $parser->forward(); + + while (!$parser->eof()) { + $record = $parser->getCurrentLineRecord(); + $recordType = strtoupper(trim($record[1])); + $currentDepth = (int) $record[0]; + + if ($currentDepth <= $depth) { + $parser->back(); + break; + } + + if (!isset($record[2])) { + $record[2] = ''; + } + + switch ($recordType) { + case 'TYPE': + $fone->setType(trim($record[2])); + break; + case 'NPFX': + $fone->setNpfx(trim($record[2])); + break; + case 'GIVN': + $fone->setGivn(trim($record[2])); + break; + case 'NICK': + $fone->setNick(trim($record[2])); + break; + case 'SPFX': + $fone->setSpfx(trim($record[2])); + break; + case 'SURN': + $fone->setSurn(trim($record[2])); + break; + case 'NSFX': + $fone->setNsfx(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $fone; + } +} diff --git a/src/Parser/Indi/Name/Romn.php b/src/Parser/Indi/Name/Romn.php new file mode 100644 index 00000000..23cf1888 --- /dev/null +++ b/src/Parser/Indi/Name/Romn.php @@ -0,0 +1,79 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi\Name; + +class Romn extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $romn = new \Record\Indi\Name\Romn(); + $romn->setRomn(trim($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $parser->forward(); + + while (!$parser->eof()) { + $record = $parser->getCurrentLineRecord(); + $recordType = strtoupper(trim($record[1])); + $currentDepth = (int) $record[0]; + + if ($currentDepth <= $depth) { + $parser->back(); + break; + } + + if (!isset($record[2])) { + $record[2] = ''; + } + + switch ($recordType) { + case 'TYPE': + $romn->setRomn(trim($record[2])); + break; + case 'NPFX': + $romn->setNpfx(trim($record[2])); + break; + case 'GIVN': + $romn->setGivn(trim($record[2])); + break; + case 'NICK': + $romn->setNick(trim($record[2])); + break; + case 'SPFX': + $romn->setSpfx(trim($record[2])); + break; + case 'SURN': + $romn->setSurn(trim($record[2])); + break; + case 'NSFX': + $romn->setNsfx(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $romn; + } +} diff --git a/src/Parser/Indi/Nati.php b/src/Parser/Indi/Nati.php new file mode 100644 index 00000000..a297e36e --- /dev/null +++ b/src/Parser/Indi/Nati.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Nati extends \Parser\Indi\Attr +{ +} diff --git a/src/Parser/Indi/Natu.php b/src/Parser/Indi/Natu.php new file mode 100644 index 00000000..c2d6008a --- /dev/null +++ b/src/Parser/Indi/Natu.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Natu extends \Parser\Indi\Even +{ +} diff --git a/src/Parser/Indi/Nchi.php b/src/Parser/Indi/Nchi.php new file mode 100644 index 00000000..ec827298 --- /dev/null +++ b/src/Parser/Indi/Nchi.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Nchi extends \Parser\Indi\Attr +{ +} diff --git a/src/Parser/Indi/Nmr.php b/src/Parser/Indi/Nmr.php new file mode 100644 index 00000000..f741e864 --- /dev/null +++ b/src/Parser/Indi/Nmr.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Nmr extends \Parser\Indi\Attr +{ +} diff --git a/src/Parser/Indi/Occu.php b/src/Parser/Indi/Occu.php new file mode 100644 index 00000000..fba0a51d --- /dev/null +++ b/src/Parser/Indi/Occu.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Occu extends \Parser\Indi\Attr +{ +} diff --git a/src/Parser/Indi/Ordn.php b/src/Parser/Indi/Ordn.php new file mode 100644 index 00000000..3f5f3e49 --- /dev/null +++ b/src/Parser/Indi/Ordn.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Ordn extends \Parser\Indi\Even +{ +} diff --git a/src/Parser/Indi/Prob.php b/src/Parser/Indi/Prob.php new file mode 100644 index 00000000..7204d8cd --- /dev/null +++ b/src/Parser/Indi/Prob.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Prob extends \Parser\Indi\Even +{ +} diff --git a/src/Parser/Indi/Prop.php b/src/Parser/Indi/Prop.php new file mode 100644 index 00000000..8098532b --- /dev/null +++ b/src/Parser/Indi/Prop.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Prop extends \Parser\Indi\Attr +{ +} diff --git a/src/Parser/Indi/Reli.php b/src/Parser/Indi/Reli.php new file mode 100644 index 00000000..e1c0e68a --- /dev/null +++ b/src/Parser/Indi/Reli.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Reli extends \Parser\Indi\Attr +{ +} diff --git a/src/Parser/Indi/Resi.php b/src/Parser/Indi/Resi.php new file mode 100644 index 00000000..e679d9a7 --- /dev/null +++ b/src/Parser/Indi/Resi.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Resi extends \Parser\Indi\Attr +{ +} diff --git a/src/Parser/Indi/Reti.php b/src/Parser/Indi/Reti.php new file mode 100644 index 00000000..e75ccb5a --- /dev/null +++ b/src/Parser/Indi/Reti.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Reti extends \Parser\Indi\Even +{ +} diff --git a/src/Parser/Indi/Slgc.php b/src/Parser/Indi/Slgc.php new file mode 100644 index 00000000..dfa3d409 --- /dev/null +++ b/src/Parser/Indi/Slgc.php @@ -0,0 +1,24 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Slgc extends Lds +{ + public static function parseFamc($parser, $slgc) + { + $record = $parser->getCurrentLineRecord(); + $slgc->setFamc($parser->normalizeIdentifier($record[2])); + } +} diff --git a/src/Parser/Indi/Ssn.php b/src/Parser/Indi/Ssn.php new file mode 100644 index 00000000..42fcc0c2 --- /dev/null +++ b/src/Parser/Indi/Ssn.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Ssn extends \Parser\Indi\Attr +{ +} diff --git a/src/Parser/Indi/Titl.php b/src/Parser/Indi/Titl.php new file mode 100644 index 00000000..00a0ca88 --- /dev/null +++ b/src/Parser/Indi/Titl.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Titl extends \Parser\Indi\Attr +{ +} diff --git a/src/Parser/Indi/Will.php b/src/Parser/Indi/Will.php new file mode 100644 index 00000000..60ce052c --- /dev/null +++ b/src/Parser/Indi/Will.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Indi; + +class Will extends \Parser\Indi\Even +{ +} diff --git a/src/Parser/Note.php b/src/Parser/Note.php new file mode 100644 index 00000000..477546e0 --- /dev/null +++ b/src/Parser/Note.php @@ -0,0 +1,87 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +class Note extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(4); + $depth = (int) $record[0]; + if (isset($record[1])) { + $identifier = $parser->normalizeIdentifier($record[1]); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $note = new \Record\Note(); + $note->setId($identifier); + + if (isset($record[3])) { + $note->setNote($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 '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 = \Parser\Refn::parse($parser); + $note->addRefn($refn); + break; + case 'RIN': + $note->setRin(trim($record[2])); + break; + case 'SOUR': + $sour = \Parser\SourRef::parse($parser); + $note->addSour($sour); + break; + case 'CHAN': + $chan = \Parser\Chan::parse($parser); + $note->setChan($chan); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + $parser->getGedcom()->addNote($note); + + return $note; + } +} diff --git a/src/Parser/NoteRef.php b/src/Parser/NoteRef.php new file mode 100644 index 00000000..921ff9fc --- /dev/null +++ b/src/Parser/NoteRef.php @@ -0,0 +1,68 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +class NoteRef extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + + $note = new \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 = \Parser\SourRef::parse($parser); + $note->addSour($sour); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $note; + } +} diff --git a/src/Parser/Obje.php b/src/Parser/Obje.php new file mode 100644 index 00000000..5f14e4be --- /dev/null +++ b/src/Parser/Obje.php @@ -0,0 +1,85 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +class Obje extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[1])) { + $identifier = $parser->normalizeIdentifier($record[1]); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $obje = new \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 'FILE': + $obje->setFile(trim($record[2])); + break; + case 'REFN': + $refn = \Parser\Refn::parse($parser); + $obje->addRefn($refn); + break; + case 'RIN': + $obje->setRin(trim($record[2])); + break; + + case 'NOTE': + $note = \Parser\NoteRef::parse($parser); + if ($note) { + $obje->addNote($note); + } + break; + case 'SOUR': + $chan = \Parser\Chan::parse($parser); + $obje->setChan($chan); + break; + + case 'CHAN': + $chan = \Parser\Chan::parse($parser); + $obje->setChan($chan); + break; + + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $obje; + } +} diff --git a/src/Parser/ObjeRef.php b/src/Parser/ObjeRef.php new file mode 100644 index 00000000..de9785f8 --- /dev/null +++ b/src/Parser/ObjeRef.php @@ -0,0 +1,61 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +class ObjeRef extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + + $obje = new \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(\Parser\ObjeRef\File::parse($parser)); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $obje; + } +} diff --git a/src/Parser/ObjeRef/File.php b/src/Parser/ObjeRef/File.php new file mode 100644 index 00000000..bcdccebd --- /dev/null +++ b/src/Parser/ObjeRef/File.php @@ -0,0 +1,56 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\ObjeRef; + +class File extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $file = new \Record\ObjeRef\File(); + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $file->setFile($record[2]); + } else { + return null; + } + $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': + $file->setDate(\Parser\ObjeRef\File\Form::parse($parser)); + break; + case 'TITL': + $file->setTitl(trim($record[2])); + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $file; + } +} diff --git a/src/Parser/ObjeRef/File/Form.php b/src/Parser/ObjeRef/File/Form.php new file mode 100644 index 00000000..111dfaee --- /dev/null +++ b/src/Parser/ObjeRef/File/Form.php @@ -0,0 +1,59 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\ObjeRef\File; + +class Form extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $form = new \Record\ObjeRef\File\Form(); + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $form->setForm($record[2]); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + $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 'MEDI': + $form->setMedi(trim($record[2])); + break; + case 'TYPE': + $form->setType(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $form; + } +} diff --git a/src/Parser/Phon.php b/src/Parser/Phon.php new file mode 100644 index 00000000..e6222694 --- /dev/null +++ b/src/Parser/Phon.php @@ -0,0 +1,54 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +class Phon extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $phone = new \Record\Phon(); + $phone->setPhon(trim($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $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/src/Parser/Plac.php b/src/Parser/Plac.php new file mode 100644 index 00000000..e9f7ab8d --- /dev/null +++ b/src/Parser/Plac.php @@ -0,0 +1,76 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +class Plac extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $_plac = trim($record[2]); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $plac = new \Record\Plac(); + $plac->setPlac($_plac); + + $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': + $plac->setForm(trim($record[2])); + break; + case 'FONE': + $fone = \Parser\Plac\Fone::parse($parser); + $plac->setFone($fone); + break; + case 'ROMN': + $romn = \Parser\Plac\Romn::parse($parser); + $plac->setRomn($romn); + break; + case 'NOTE': + if ($note = \Parser\NoteRef::parse($parser)) { + $plac->addNote($note); + } + break; + case 'MAP': + $map = \Parser\Plac\Map::parse($parser); + $plac->setMap($map); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $plac; + } +} diff --git a/src/Parser/Plac/Fone.php b/src/Parser/Plac/Fone.php new file mode 100644 index 00000000..128614a3 --- /dev/null +++ b/src/Parser/Plac/Fone.php @@ -0,0 +1,59 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Plac; + +class Fone extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $_fone = trim($record[2]); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $fone = new \Record\Plac\Fone(); + $fone->setPlac($_fone); + + $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 'TYPE': + $fone->setType(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $fone; + } +} diff --git a/src/Parser/Plac/Map.php b/src/Parser/Plac/Map.php new file mode 100644 index 00000000..9497f2ad --- /dev/null +++ b/src/Parser/Plac/Map.php @@ -0,0 +1,54 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Plac; + +class Map extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + + $map = new \Record\Plac\Map(); + + $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 'LATI': + $map->setLati(trim($record[2])); + break; + case 'LONG': + $map->setLong(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $map; + } +} diff --git a/src/Parser/Plac/Romn.php b/src/Parser/Plac/Romn.php new file mode 100644 index 00000000..96aead0f --- /dev/null +++ b/src/Parser/Plac/Romn.php @@ -0,0 +1,59 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Plac; + +class Romn extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $_romn = trim($record[2]); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $romn = new \Record\Plac\Romn(); + $romn->setPlac($_romn); + + $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 'TYPE': + $romn->setType(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $romn; + } +} diff --git a/src/Parser/Refn.php b/src/Parser/Refn.php new file mode 100644 index 00000000..2162d29a --- /dev/null +++ b/src/Parser/Refn.php @@ -0,0 +1,57 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +class Refn extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $refn = new \Record\Refn(); + $refn->setRefn(trim($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $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/src/Parser/Repo.php b/src/Parser/Repo.php new file mode 100644 index 00000000..4e8b0745 --- /dev/null +++ b/src/Parser/Repo.php @@ -0,0 +1,93 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +class Repo extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[1])) { + $identifier = $parser->normalizeIdentifier($record[1]); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $repo = new \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 = \Parser\Addr::parse($parser); + $repo->setAddr($addr); + break; + case 'PHON': + $repo->addPhon(trim($record[2])); + break; + case 'EMAIL': + $repo->addEmail(trim($record[2])); + break; + case 'FAX': + $repo->addFax(trim($record[2])); + break; + case 'WWW': + $repo->addWww(trim($record[2])); + break; + case 'NOTE': + if ($note = \Parser\NoteRef::parse($parser)) { + $repo->addNote($note); + } + break; + case 'REFN': + $refn = \Parser\Refn::parse($parser); + $repo->addRefn($refn); + break; + case 'RIN': + $repo->setRin(trim($record[2])); + break; + case 'CHAN': + $chan = \Parser\Chan::parse($parser); + $repo->setChan($chan); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $repo; + } +} diff --git a/src/Parser/RepoRef.php b/src/Parser/RepoRef.php new file mode 100644 index 00000000..ec291449 --- /dev/null +++ b/src/Parser/RepoRef.php @@ -0,0 +1,65 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +class RepoRef extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $identifier = $parser->normalizeIdentifier($record[2]); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $repo = new \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(\Parser\Caln::parse($parser)); + break; + case 'NOTE': + $note = \Parser\NoteRef::parse($parser); + if ($note) { + $repo->addNote($note); + } + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $repo; + } +} diff --git a/src/Parser/Sour.php b/src/Parser/Sour.php new file mode 100644 index 00000000..dce63247 --- /dev/null +++ b/src/Parser/Sour.php @@ -0,0 +1,100 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +class Sour extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[1])) { + $identifier = $parser->normalizeIdentifier($record[1]); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $sour = new \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 'DATA': + $sour->setData(\Parser\Sour\Data::parse($parser)); + break; + case 'AUTH': + $sour->setAuth($parser->parseMultilineRecord()); + break; + case 'TITL': + $sour->setTitl($parser->parseMultilineRecord()); + break; + case 'ABBR': + $sour->setAbbr(trim($record[2])); + break; + case 'PUBL': + $sour->setPubl($parser->parseMultilineRecord()); + break; + case 'TEXT': + $sour->setText($parser->parseMultilineRecord()); + break; + case 'REPO': + $sour->setRepo(\Parser\Sour\Repo::parse($parser)); + break; + case 'REFN': + $refn = \Parser\Refn::parse($parser); + $sour->addRefn($refn); + break; + case 'RIN': + $sour->setRin(trim($record[2])); + break; + case 'CHAN': + $chan = \Parser\Chan::parse($parser); + $sour->setChan($chan); + break; + case 'NOTE': + $note = \Parser\NoteRef::parse($parser); + if ($note) { + $sour->addNote($note); + } + break; + case 'OBJE': + $obje = \Parser\ObjeRef::parse($parser); + $sour->addObje($obje); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $sour; + } +} diff --git a/src/Parser/Sour/Data.php b/src/Parser/Sour/Data.php new file mode 100644 index 00000000..174c09ec --- /dev/null +++ b/src/Parser/Sour/Data.php @@ -0,0 +1,66 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Sour; + +class Data extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + + $data = new \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(\Parser\Sour\Data\Even::parse($parser)); + break; + case 'DATE': // not in 5.5.1 + $data->setDate(trim($record[2])); + break; + case 'AGNC': + $data->setAgnc(trim($record[2])); + break; + case 'NOTE': + $note = \Parser\NoteRef::parse($parser); + if ($note) { + $data->addNote($note); + } + break; + case 'TEXT': // not in 5.5.1 + $data->setText($parser->parseMultiLineRecord()); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $data; + } +} diff --git a/src/Parser/Sour/Data/Even.php b/src/Parser/Sour/Data/Even.php new file mode 100644 index 00000000..c15273be --- /dev/null +++ b/src/Parser/Sour/Data/Even.php @@ -0,0 +1,54 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Sour\Data; + +class Even extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + + $even = new \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/src/Parser/Sour/Repo.php b/src/Parser/Sour/Repo.php new file mode 100644 index 00000000..3bad0431 --- /dev/null +++ b/src/Parser/Sour/Repo.php @@ -0,0 +1,57 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Sour; + +class Repo extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $repo = new \Record\Sour\Repo(); + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $_repo = $parser->normalizeIdentifier($record[2]); + $repo->setRepo($_repo); + } + + $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': + $repo->addNote(\Parser\NoteRef::parse($parser)); + break; + case 'CALN': + $repo->addCaln(\Parser\Sour\Repo\Caln::parse($parser)); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $repo; + } +} diff --git a/src/Parser/Sour/Repo/Caln.php b/src/Parser/Sour/Repo/Caln.php new file mode 100644 index 00000000..7abbd60a --- /dev/null +++ b/src/Parser/Sour/Repo/Caln.php @@ -0,0 +1,56 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\Sour\Repo; + +class Caln extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $caln = new \Record\Sour\Repo\Caln(); + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $_caln = $record[2]; + $caln->setCaln($_caln); + } else { + return null; + } + + $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 'MEDI': + $caln->setMedi(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $caln; + } +} diff --git a/src/Parser/SourRef.php b/src/Parser/SourRef.php new file mode 100644 index 00000000..ded2f93b --- /dev/null +++ b/src/Parser/SourRef.php @@ -0,0 +1,82 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +class SourRef extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $sour = new \Record\SourRef(); + $sour->setSour($parser->normalizeIdentifier($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $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 'PAGE': + $sour->setPage(trim($record[2])); + break; + case 'EVEN': + $even = \Parser\SourRef\Even::parse($parser); + $sour->setEven($even); + break; + case 'DATA': + $sour->setData(\Parser\SourRef\Data::parse($parser)); + break; + case 'TEXT': + $sour->setText($parser->parseMultiLineRecord()); + break; + case 'OBJE': + $obje = \Parser\ObjeRef::parse($parser); + if ($obje) { + $sour->addNote($obje); + } + break; + case 'NOTE': + $note = \Parser\NoteRef::parse($parser); + if ($note) { + $sour->addNote($note); + } + break; + case 'QUAY': + $sour->setQuay(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $sour; + } +} diff --git a/src/Parser/SourRef/Data.php b/src/Parser/SourRef/Data.php new file mode 100644 index 00000000..c9666eee --- /dev/null +++ b/src/Parser/SourRef/Data.php @@ -0,0 +1,53 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\SourRef; + +class Data extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $data = new \Record\SourRef\Data(); + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + + $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 'TEXT': + $data->setText($parser->parseMultiLineRecord()); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $data; + } +} diff --git a/src/Parser/SourRef/Even.php b/src/Parser/SourRef/Even.php new file mode 100644 index 00000000..7fa8b217 --- /dev/null +++ b/src/Parser/SourRef/Even.php @@ -0,0 +1,57 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser\SourRef; + +class Even extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[2])) { + $even = new \Record\SourRef\Even(); + $even->setEven(trim($record[2])); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $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/src/Parser/Subm.php b/src/Parser/Subm.php new file mode 100644 index 00000000..b8ed53e5 --- /dev/null +++ b/src/Parser/Subm.php @@ -0,0 +1,104 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +class Subm extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[1])) { + $identifier = $parser->normalizeIdentifier($record[1]); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $subm = new \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 = \Parser\Addr::parse($parser); + $subm->setAddr($addr); + break; + case 'PHON': + $phone = isset($record[2]) ? trim($record[2]) : ''; + $subm->addPhon($phone); + break; + case 'EMAIL': + $email = isset($record[2]) ? trim($record[2]) : ''; + $subm->addEmail($email); + break; + case 'FAX': + $fax = isset($record[2]) ? trim($record[2]) : ''; + $subm->addFax($fax); + break; + case 'WWW': + $www = isset($record[2]) ? trim($record[2]) : ''; + $subm->addWww($www); + break; + case 'NOTE': + $note = \Parser\NoteRef::parse($parser); + if ($note) { + $subm->addNote($note); + } + break; + case 'OBJE': + $obje = \Parser\ObjeRef::parse($parser); + $subm->addObje($obje); + break; + case 'CHAN': + $chan = \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/src/Parser/Subn.php b/src/Parser/Subn.php new file mode 100644 index 00000000..feb6f5fd --- /dev/null +++ b/src/Parser/Subn.php @@ -0,0 +1,89 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Parser; + +class Subn extends \Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + if (isset($record[1])) { + $identifier = $parser->normalizeIdentifier($record[1]); + } else { + $parser->skipToNextLevel($depth); + + return null; + } + + $subn = new \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; + case 'NOTE': + $note = \Parser\NoteRef::parse($parser); + if ($note) { + $subn->addNote($note); + } + break; + case 'CHAN': + $chan = \Parser\Chan::parse($parser); + $subn->setChan($chan); + break; + default: + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + } + + $parser->forward(); + } + + return $subn; + } +} diff --git a/src/Record.php b/src/Record.php new file mode 100644 index 00000000..1ae4ea31 --- /dev/null +++ b/src/Record.php @@ -0,0 +1,107 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Gedcom; + +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)) { + throw new \Exception('Incorrect arguments to '.$method); + } + + if (!isset($args[0])) { + // Argument can be empty since we trim it's value + return; + } + + 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)) { + throw new \Exception('Incorrect arguments to '.$method); + } + + if (!isset($args[0])) { + // Argument can be empty since we trim it's value + return; + } + + if (is_object($args[0])) { + // Type safety? + } + + $this->{'_'.$arr} = $args[0]; + + return $this; + } elseif (substr($method, 0, 3) == 'get') { + $arr = strtolower(substr($method, 3)); + + // hotfix getData + if ('data' == $arr) { + if (!property_exists($this, '_text')) { + throw new \Exception('Unknown '.get_class($this).'::'.$arr); + } + + return $this->{'_text'}; + } + + 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/src/Record/Addr.php b/src/Record/Addr.php new file mode 100644 index 00000000..f8a3cd02 --- /dev/null +++ b/src/Record/Addr.php @@ -0,0 +1,198 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +use Record; + +/** + * Class Addr. + */ +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/src/Record/Caln.php b/src/Record/Caln.php new file mode 100644 index 00000000..bf917a1f --- /dev/null +++ b/src/Record/Caln.php @@ -0,0 +1,73 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +use Record; + +/** + * Class Caln. + */ +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/src/Record/Chan.php b/src/Record/Chan.php new file mode 100644 index 00000000..a6e5f7a9 --- /dev/null +++ b/src/Record/Chan.php @@ -0,0 +1,98 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +use Record; + +/** + * Class Chan. + */ +class Chan extends Record +{ + /** + * @var string + */ + protected $date; + + /** + * @var string + */ + protected $time; + + /** + * @var array + */ + protected $note = []; + + /** + * @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($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/src/Record/Data.php b/src/Record/Data.php new file mode 100644 index 00000000..dc404be7 --- /dev/null +++ b/src/Record/Data.php @@ -0,0 +1,73 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +use Record; + +/** + * Class Data. + */ +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/src/Record/Date.php b/src/Record/Date.php new file mode 100644 index 00000000..d7bc22ca --- /dev/null +++ b/src/Record/Date.php @@ -0,0 +1,133 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +use Record; + +/** + * Class Date. + */ +class Date extends Record +{ + /** + * @var string + */ + protected $date = null; + + /** + * @var array + */ + private $months = [ + 'JAN' => 1, 'FEB' => 2, 'MAR' => 3, 'APR' => 4, 'MAY' => 5, 'JUN' => 6, + 'JUL' => 7, 'AUG' => 8, 'SEP' => 9, 'OCT' => 10, 'NOV' => 11, 'DEC' => 12, + ]; + + /** + * @param string $date Date array + * + * @return Date + */ + public function setDate($date) + { + $this->date = $date; + + return $this; + } + + /** + * @return null|string + */ + public function getDate() + { + return $this->date; + } + + /** + * Return month part of date. + * + * @return int|null + */ + public function getMonth() + { + $record = explode(' ', $this->date); + if (count($record) > 0) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + foreach ($record as $part) { + if (isset($this->months[trim($part)])) { + return $this->months[trim($part)]; + } + } + } + + return null; + } + + /** + * Return year part of date. + * + * @return int|null + */ + public function getYear() + { + $record = explode(' ', $this->date); + if (count($record) > 0) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + if (count($record) > 0) { + return (int) end($record); + } + } + + return null; + } + + /** + * Return day part of date. + * + * @return int|null + */ + public function getDay() + { + $record = explode(' ', $this->date); + if (!empty($record[0])) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + if (count($record) > 0) { + $day = (int) reset($record); + if ($day >= 1 && $day <= 31) { + return $day; + } + } + } + + return null; + } + + /** + * Check if the first part is a prefix (eg 'BEF', 'ABT',). + * + * @param string $datePart Date part to be checked + * + * @return bool + */ + private function isPrefix($datePart) + { + return in_array($datePart, ['FROM', 'TO', 'BEF', 'AFT', 'BET', 'AND', 'ABT', 'EST', 'CAL', 'INT']); + } +} diff --git a/src/Record/Fam.php b/src/Record/Fam.php new file mode 100644 index 00000000..4ce76663 --- /dev/null +++ b/src/Record/Fam.php @@ -0,0 +1,96 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +class Fam extends \Gedcom\Record implements Noteable, Sourceable, Objectable +{ + protected $_id = null; + + protected $_resn = null; + + protected $_even = []; + + protected $_husb = null; + + protected $_wife = null; + + protected $_chil = []; + + protected $_nchi = null; + + protected $_subm = []; + + protected $_slgs = []; + + protected $_refn = []; + + protected $_rin = null; + + protected $_chan = null; + + protected $_note = []; + + protected $_sour = []; + + protected $_obje = []; + + public function addEven($even) + { + $this->_even[$even->getType()] = $even; + } + + /** + * @return array + */ + public function getAllEven() + { + return $this->_even; + } + + /** + * @return void|\Record\Fam\Even + */ + public function getEven($key = '') + { + if (isset($this->_even[strtoupper($key)])) { + return $this->_even[strtoupper($key)]; + } + } + + public function addSlgs($slgs = []) + { + $this->_slgs[] = $slgs; + } + + public function addRefn($refn = []) + { + $this->_refn[] = $refn; + } + + public function addNote($note = []) + { + $this->_note[] = $note; + } + + public function addSour($sour = []) + { + $this->_sour[] = $sour; + } + + public function addObje($obje = []) + { + $this->_obje[] = $obje; + } +} diff --git a/src/Record/Fam/Anul.php b/src/Record/Fam/Anul.php new file mode 100644 index 00000000..9a63e87a --- /dev/null +++ b/src/Record/Fam/Anul.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Fam; + +class Anul extends \Record\Fam\Even +{ +} diff --git a/src/Record/Fam/Cens.php b/src/Record/Fam/Cens.php new file mode 100644 index 00000000..901df6e7 --- /dev/null +++ b/src/Record/Fam/Cens.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Fam; + +class Cens extends \Record\Fam\Even +{ +} diff --git a/src/Record/Fam/Div.php b/src/Record/Fam/Div.php new file mode 100644 index 00000000..9c27b220 --- /dev/null +++ b/src/Record/Fam/Div.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Fam; + +class Div extends \Record\Fam\Even +{ +} diff --git a/src/Record/Fam/Enga.php b/src/Record/Fam/Enga.php new file mode 100644 index 00000000..b760da25 --- /dev/null +++ b/src/Record/Fam/Enga.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Fam; + +class Enga extends \Record\Fam\Even +{ +} diff --git a/src/Record/Fam/Even.php b/src/Record/Fam/Even.php new file mode 100644 index 00000000..6108783a --- /dev/null +++ b/src/Record/Fam/Even.php @@ -0,0 +1,70 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Fam; + +use Record\Noteable; +use Record\Objectable; +use Record\Sourceable; + +/** + * Event record. + * + * @method mixed getType() + * @method \Record\Date getDate() + * @method string getPlac() + */ +class Even extends \Gedcom\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 = []; + + protected $_agnc = null; + + protected $_husb = null; + protected $_wife = null; + + protected $_obje = []; + + protected $_sour = []; + + protected $_note = []; + + public function addPhon($phon = []) + { + $this->_phon[] = $phon; + } + + public function addObje($obje = []) + { + $this->_obje[] = $obje; + } + + public function addSour($sour = []) + { + $this->_sour[] = $sour; + } + + public function addNote($note = []) + { + $this->_note[] = $note; + } +} diff --git a/src/Record/Fam/Even/Husb.php b/src/Record/Fam/Even/Husb.php new file mode 100644 index 00000000..be5b4659 --- /dev/null +++ b/src/Record/Fam/Even/Husb.php @@ -0,0 +1,20 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Fam\Even; + +class Husb extends \Gedcom\Record +{ + protected $_age = null; +} diff --git a/src/Record/Fam/Even/Wife.php b/src/Record/Fam/Even/Wife.php new file mode 100644 index 00000000..b0e19e02 --- /dev/null +++ b/src/Record/Fam/Even/Wife.php @@ -0,0 +1,20 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Fam\Even; + +class Wife extends \Gedcom\Record +{ + protected $_age = null; +} diff --git a/src/Record/Fam/Marb.php b/src/Record/Fam/Marb.php new file mode 100644 index 00000000..0f904925 --- /dev/null +++ b/src/Record/Fam/Marb.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Fam; + +class Marb extends \Record\Fam\Even +{ +} diff --git a/src/Record/Fam/Marc.php b/src/Record/Fam/Marc.php new file mode 100644 index 00000000..819a37b2 --- /dev/null +++ b/src/Record/Fam/Marc.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Fam; + +class Marc extends \Record\Fam\Even +{ +} diff --git a/src/Record/Fam/Marl.php b/src/Record/Fam/Marl.php new file mode 100644 index 00000000..9ee65c39 --- /dev/null +++ b/src/Record/Fam/Marl.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Fam; + +class Marl extends \Record\Fam\Even +{ +} diff --git a/src/Record/Fam/Marr.php b/src/Record/Fam/Marr.php new file mode 100644 index 00000000..c8bd791d --- /dev/null +++ b/src/Record/Fam/Marr.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Fam; + +class Marr extends \Record\Fam\Even +{ +} diff --git a/src/Record/Fam/Mars.php b/src/Record/Fam/Mars.php new file mode 100644 index 00000000..483ff47b --- /dev/null +++ b/src/Record/Fam/Mars.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Fam; + +class Mars extends \Record\Fam\Even +{ +} diff --git a/src/Record/Fam/Slgs.php b/src/Record/Fam/Slgs.php new file mode 100644 index 00000000..a4d9ad8d --- /dev/null +++ b/src/Record/Fam/Slgs.php @@ -0,0 +1,40 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Fam; + +use Record\Noteable; +use Record\Sourceable; + +class Slgs extends \Gedcom\Record implements Sourceable, Noteable +{ + protected $_stat; + protected $_date; + protected $_plac; + protected $_temp; + + protected $_sour = []; + + protected $_note = []; + + public function addSour($sour = []) + { + $this->_sour[] = $sour; + } + + public function addNote($note = []) + { + $this->_note[] = $note; + } +} diff --git a/src/Record/Fam/Slgs/Stat.php b/src/Record/Fam/Slgs/Stat.php new file mode 100644 index 00000000..f91ebf42 --- /dev/null +++ b/src/Record/Fam/Slgs/Stat.php @@ -0,0 +1,29 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +use 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 \Record\Head\Sour $sour + * + * @return Head + */ + public function setSour($sour = []) + { + $this->sour = $sour; + + return $this; + } + + /** + * @return \Record\Head\Sour + */ + public function getSour() + { + return $this->sour; + } + + /** + * @param \Record\Head\Date $date + * + * @return Head + */ + public function setDate($date = []) + { + $this->date = $date; + + return $this; + } + + /** + * @return \Record\Head\Date + */ + public function getDate() + { + return $this->date; + } + + /** + * @param \Record\Head\Gedc $gedc + * + * @return Head + */ + public function setGedc($gedc = []) + { + $this->gedc = $gedc; + + return $this; + } + + /** + * @return \Record\Head\Gedc + */ + public function getGedc() + { + return $this->gedc; + } + + /** + * @param \Record\Head\Char $char + * + * @return Head + */ + public function setChar($char = []) + { + $this->char = $char; + + return $this; + } + + /** + * @return \Record\Head\Char + */ + public function getChar() + { + return $this->char; + } + + /** + * @param \Record\Head\Plac $plac + * + * @return Head + */ + public function setPlac($plac = []) + { + $this->plac = $plac; + + return $this; + } + + /** + * @return \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/src/Record/Head/Char.php b/src/Record/Head/Char.php new file mode 100644 index 00000000..4b359ae3 --- /dev/null +++ b/src/Record/Head/Char.php @@ -0,0 +1,21 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Head; + +class Char extends \Gedcom\Record +{ + protected $_char = null; + protected $_vers = null; +} diff --git a/src/Record/Head/Date.php b/src/Record/Head/Date.php new file mode 100644 index 00000000..37f99bd6 --- /dev/null +++ b/src/Record/Head/Date.php @@ -0,0 +1,21 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Head; + +class Date extends \Gedcom\Record +{ + protected $_date = null; + protected $_time = null; +} diff --git a/src/Record/Head/Gedc.php b/src/Record/Head/Gedc.php new file mode 100644 index 00000000..ba69fc4e --- /dev/null +++ b/src/Record/Head/Gedc.php @@ -0,0 +1,54 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Head; + +class Gedc extends \Gedcom\Record +{ + protected $_vers = null; + + protected $_form = null; + + /** + * @return Gedc/version + */ + public function getVersion() + { + return $this->_vers; + } + + /** + * @param Gedc/version + */ + public function setVersion($vers = []) + { + $this->_vers = $vers; + } + + /** + * @return Gedc/form + */ + public function getForm() + { + return $this->_form; + } + + /** + * @param Gedc/version + */ + public function setForm($form = []) + { + $this->_form = $form; + } +} diff --git a/src/Record/Head/Plac.php b/src/Record/Head/Plac.php new file mode 100644 index 00000000..8beacea9 --- /dev/null +++ b/src/Record/Head/Plac.php @@ -0,0 +1,20 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Head; + +class Plac extends \Gedcom\Record +{ + protected $_form = null; +} diff --git a/src/Record/Head/Sour.php b/src/Record/Head/Sour.php new file mode 100644 index 00000000..e33d4548 --- /dev/null +++ b/src/Record/Head/Sour.php @@ -0,0 +1,92 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Head; + +class Sour extends \Gedcom\Record +{ + protected $_sour = null; + + protected $_vers = null; + + protected $_name = null; + + protected $_corp = null; + + protected $_data = null; + + /** + * @param Sour\Corp $corp + */ + public function setCorp($corp = []) + { + $this->_corp = $corp; + } + + /** + * @return Sour\Corp + */ + public function getCorp() + { + return $this->_corp; + } + + /** + * @param \Record\Head\Sour\Data $data + */ + public function setData($data = []) + { + $this->_data = $data; + } + + /** + * @return \Record\Head\Sour\Data + */ + public function getData() + { + return $this->_data; + } + + /** + * @return Sour\Name + */ + public function getName() + { + return $this->_name; + } + + /** + * @param Sour\Name + */ + public function setName($name = []) + { + $this->_name = $name; + } + + /** + * @return Sour\Version + */ + public function getVersion() + { + return $this->_vers; + } + + /** + * @param Sour\Version + */ + public function setVersion($version = []) + { + $this->_vers = $version; + } +} diff --git a/src/Record/Head/Sour/Corp.php b/src/Record/Head/Sour/Corp.php new file mode 100644 index 00000000..3ef1384b --- /dev/null +++ b/src/Record/Head/Sour/Corp.php @@ -0,0 +1,28 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Head\Sour; + +class Corp extends \Gedcom\Record +{ + protected $_corp = null; + protected $_addr = null; + + protected $_phon = []; + + public function addPhon($phon = []) + { + $this->_phon[] = $phon; + } +} diff --git a/src/Record/Head/Sour/Data.php b/src/Record/Head/Sour/Data.php new file mode 100644 index 00000000..ba28269c --- /dev/null +++ b/src/Record/Head/Sour/Data.php @@ -0,0 +1,22 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Head\Sour; + +class Data extends \Gedcom\Record +{ + protected $_data = null; + protected $_date = null; + protected $_copr = null; +} diff --git a/src/Record/Indi.php b/src/Record/Indi.php new file mode 100644 index 00000000..03e3b3ae --- /dev/null +++ b/src/Record/Indi.php @@ -0,0 +1,741 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +use Record; + + +/** + * Class Indi. + */ +class Indi extends Record implements Noteable, Objectable, Sourceable +{ + /** + * @var string + */ + protected $id; + + /** + * @var string + */ + protected $uid; + + /** + * @var string + */ + protected $resn; + /** + * @var Indi\Name[] + */ + protected $name = []; + /** + * @var string + */ + protected $sex; + + /** + * @var Indi\Even[] + */ + protected $even = []; + /** + * @var Indi\Attr[] + */ + protected $attr = []; + /** + * @var Indi\Bapl + */ + protected $bapl = []; + + /** + * @var Indi\Conl + */ + protected $conl = []; + + /** + * @var Indi\Endl + */ + protected $endl = []; + + /** + * @var Indi\Slgc + */ + protected $slgc = []; + + /** + * @var Indi\Famc[] + */ + protected $famc = []; + /** + * @var Indi\Fams[] + */ + protected $fams = []; + /** + * @var string[] + */ + protected $subm = []; + /** + * @var string[] + */ + protected $alia = []; + /** + * @var string[] + */ + protected $anci = []; + /** + * @var string[] + */ + protected $desi = []; + /** + * @var string + */ + protected $rfn; + /** + * @var string + */ + protected $afn; + /** + * @var Refn[] + */ + protected $refn = []; + /** + * @var string + */ + protected $rin; + + /** + * @var string + */ + protected $chan; + + /** + * @var Indi\Note[] + */ + protected $note = []; + + /** + * @var Obje[] + */ + protected $obje = []; + + /** + * @var Sour[] + */ + protected $sour = []; + + /** + * @var Indi\Asso[] + */ + protected $asso = []; + + /** + * @param string $id + * + * @return Indi + */ + public function setId($id = '') + { + $this->id = $id; + + return $this; + } + + /** + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * @param string $uid + * + * @return Indi + */ + public function setUid($uid = '') + { + $this->uid = $uid; + + return $this; + } + + /** + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * @param Indi\Name $name + * + * @return Indi + */ + public function addName($name = []) + { + $this->name[] = $name; + + return $this; + } + + /** + * @return Indi\Name[] + */ + public function getName() + { + return $this->name; + } + + /** + * @param Indi\Attr $attr + * + * @return Indi + */ + public function addAttr($attr = []) + { + $attrName = $attr->getType(); + + if (!array_key_exists($attrName, $this->attr)) { + $this->attr[$attrName] = []; + } + + $this->attr[$attrName][] = $attr; + + return $this; + } + + /** + * @return Indi\Attr[] + */ + public function getAllAttr() + { + return $this->attr; + } + + /** + * @return Indi\Attr[] + */ + public function getAttr($key = '') + { + if (isset($this->attr[strtoupper($key)])) { + return $this->attr[strtoupper($key)]; + } + } + + /** + * @param Indi\Even $even + * + * @return Indi + */ + public function addEven($even = []) + { + $evenName = $even->getType(); + + if (!array_key_exists($evenName, $this->even)) { + $this->even[$evenName] = []; + } + + $this->even[$evenName][] = $even; + + return $this; + } + + /** + * @return array + */ + public function getAllEven() + { + return $this->even; + } + + /** + * @return array + */ + public function getEven($key = '') + { + if (isset($this->even[strtoupper($key)])) { + return $this->even[strtoupper($key)]; + } + } + + /** + * @param Indi\Asso $asso + * + * @return Indi + */ + public function addAsso($asso = []) + { + $this->asso[] = $asso; + + return $this; + } + + /** + * @return array + */ + public function getAsso() + { + return $this->asso; + } + + /** + * @param Refn $ref + * + * @return Indi + */ + public function addRefn($ref = []) + { + $this->refn[] = $ref; + + return $this; + } + + /** + * @return Refn[] + */ + public function getRefn() + { + return $this->refn; + } + + /** + * @param \Record\NoteRef $note + * + * @return Indi + */ + public function addNote($note = []) + { + $this->note[] = $note; + + return $this; + } + + /** + * @return array + */ + public function getNote() + { + return $this->note; + } + + /** + * @param ObjeRef $obje + * + * @return Indi + */ + public function addObje($obje = []) + { + $this->obje[] = $obje; + + return $this; + } + + /** + * @return array + */ + public function getObje() + { + return $this->obje; + } + + /** + * @param SourRef $sour + * + * @return Indi + */ + public function addSour($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($famc = []) + { + $this->famc[] = $famc; + + return $this; + } + + /** + * @return array + */ + public function getFamc() + { + return $this->famc; + } + + /** + * @param Indi\Fams $fams + * + * @return Indi + */ + public function addFams($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 string[] + */ + public function getAnci() + { + return $this->anci; + } + + /** + * @param string $subm + * + * @return Indi + */ + public function addDesi($subm = '') + { + $this->desi[] = $subm; + + return $this; + } + + /** + * @return string[] + */ + public function getDesi() + { + return $this->desi; + } + + /** + * @param string $subm + * + * @return Indi + */ + public function addSubm($subm = '') + { + $this->subm[] = $subm; + + return $this; + } + + /** + * @return string[] + */ + 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 = null) + { + $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($bapl = []) + { + $this->bapl = $bapl; + + return $this; + } + + /** + * @param Indi\Bapl $bapl + * + * @return Indi + */ + public function addBapl($bapl = null) + { + $this->bapl[] = $bapl; + + return $this; + } + + /** + * @return Indi\Bapl + */ + public function getBapl() + { + return $this->bapl; + } + + /** + * @param Indi\Conl $conl + * + * @return Indi + */ + public function setConl($conl = []) + { + $this->conl = $conl; + + return $this; + } + + /** + * @param Indi\Conl $conl + * + * @return Indi + */ + public function addConl($conl) + { + $this->conl[] = $conl; + + return $this; + } + + /** + * @return Indi\Conl + */ + public function getConl() + { + return $this->conl; + } + + /** + * @param Indi\Endl $endl + * + * @return Indi + */ + public function setEndl($endl = []) + { + $this->endl = $endl; + + return $this; + } + + /** + * @param Indi\Endl $endl + * + * @return Indi + */ + public function addEndl($endl) + { + $this->endl[] = $endl; + + return $this; + } + + /** + * @return Indi\Endl + */ + public function getEndl() + { + return $this->endl; + } + + /** + * @param Indi\Slgc $slgc + * + * @return Indi + */ + public function setSlgc($slgc = []) + { + $this->slgc = $slgc; + + return $this; + } + + /** + * @param Indi\Slgc $slgc + * + * @return Indi + */ + public function addSlgc($slgc) + { + $this->slgc[] = $slgc; + + return $this; + } + + /** + * @return Indi\Slgc + */ + public function getSlgc() + { + return $this->slgc; + } +} diff --git a/src/Record/Indi/Adop.php b/src/Record/Indi/Adop.php new file mode 100644 index 00000000..19f5174a --- /dev/null +++ b/src/Record/Indi/Adop.php @@ -0,0 +1,21 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Adop extends \Record\Indi\Even +{ + protected $_adop = null; + protected $_famc = null; +} diff --git a/src/Record/Indi/Asso.php b/src/Record/Indi/Asso.php new file mode 100644 index 00000000..e214417c --- /dev/null +++ b/src/Record/Indi/Asso.php @@ -0,0 +1,38 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +use Record\Noteable; +use Record\Sourceable; + +class Asso extends \Gedcom\Record implements Sourceable, Noteable +{ + protected $_indi = null; + protected $_rela = null; + + protected $_note = []; + + protected $_sour = []; + + public function addNote($note = []) + { + $this->_note[] = $note; + } + + public function addSour($sour = []) + { + $this->_sour[] = $sour; + } +} diff --git a/src/Record/Indi/Attr.php b/src/Record/Indi/Attr.php new file mode 100644 index 00000000..bff0e4a3 --- /dev/null +++ b/src/Record/Indi/Attr.php @@ -0,0 +1,46 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +use Record\Noteable; +use Record\Objectable; +use Record\Sourceable; + +class Attr extends \Record\Indi\Even implements Sourceable, Noteable, Objectable +{ + protected $type = null; + protected $_attr = null; + + protected $sour = []; + + protected $note = []; + + protected $obje = []; + + public function addSour($sour = []) + { + $this->sour[] = $sour; + } + + public function addNote($note = []) + { + $this->note[] = $note; + } + + public function addObje($obje = []) + { + $this->obje[] = $obje; + } +} diff --git a/src/Record/Indi/Bapl.php b/src/Record/Indi/Bapl.php new file mode 100644 index 00000000..1578996d --- /dev/null +++ b/src/Record/Indi/Bapl.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Bapl extends Lds +{ +} diff --git a/src/Record/Indi/Bapm.php b/src/Record/Indi/Bapm.php new file mode 100644 index 00000000..304f8d5e --- /dev/null +++ b/src/Record/Indi/Bapm.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Bapm extends \Record\Indi\Even +{ +} diff --git a/src/Record/Indi/Barm.php b/src/Record/Indi/Barm.php new file mode 100644 index 00000000..ae67d986 --- /dev/null +++ b/src/Record/Indi/Barm.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Barm extends \Record\Indi\Even +{ +} diff --git a/src/Record/Indi/Basm.php b/src/Record/Indi/Basm.php new file mode 100644 index 00000000..ac0728b0 --- /dev/null +++ b/src/Record/Indi/Basm.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Basm extends \Record\Indi\Even +{ +} diff --git a/src/Record/Indi/Birt.php b/src/Record/Indi/Birt.php new file mode 100644 index 00000000..44dd7277 --- /dev/null +++ b/src/Record/Indi/Birt.php @@ -0,0 +1,46 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +/** + * Class Birt. + */ +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/src/Record/Indi/Bles.php b/src/Record/Indi/Bles.php new file mode 100644 index 00000000..566b6b9a --- /dev/null +++ b/src/Record/Indi/Bles.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Bles extends \Record\Indi\Even +{ +} diff --git a/src/Record/Indi/Buri.php b/src/Record/Indi/Buri.php new file mode 100644 index 00000000..33c991bc --- /dev/null +++ b/src/Record/Indi/Buri.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Buri extends \Record\Indi\Even +{ +} diff --git a/src/Record/Indi/Cast.php b/src/Record/Indi/Cast.php new file mode 100644 index 00000000..db5a03c2 --- /dev/null +++ b/src/Record/Indi/Cast.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Cast extends \Record\Indi\Attr +{ +} diff --git a/src/Record/Indi/Cens.php b/src/Record/Indi/Cens.php new file mode 100644 index 00000000..806c435e --- /dev/null +++ b/src/Record/Indi/Cens.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Cens extends \Record\Indi\Even +{ +} diff --git a/src/Record/Indi/Chr.php b/src/Record/Indi/Chr.php new file mode 100644 index 00000000..4708b283 --- /dev/null +++ b/src/Record/Indi/Chr.php @@ -0,0 +1,20 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Chr extends \Record\Indi\Even +{ + protected $_famc = null; +} diff --git a/src/Record/Indi/Chra.php b/src/Record/Indi/Chra.php new file mode 100644 index 00000000..4d65bd87 --- /dev/null +++ b/src/Record/Indi/Chra.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Chra extends \Record\Indi\Even +{ +} diff --git a/src/Record/Indi/Conf.php b/src/Record/Indi/Conf.php new file mode 100644 index 00000000..688891d3 --- /dev/null +++ b/src/Record/Indi/Conf.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Conf extends \Record\Indi\Even +{ +} diff --git a/src/Record/Indi/Conl.php b/src/Record/Indi/Conl.php new file mode 100644 index 00000000..e6efc210 --- /dev/null +++ b/src/Record/Indi/Conl.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Conl extends Lds +{ +} diff --git a/src/Record/Indi/Crem.php b/src/Record/Indi/Crem.php new file mode 100644 index 00000000..5012a7a5 --- /dev/null +++ b/src/Record/Indi/Crem.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Crem extends \Record\Indi\Even +{ +} diff --git a/src/Record/Indi/Deat.php b/src/Record/Indi/Deat.php new file mode 100644 index 00000000..926ae56c --- /dev/null +++ b/src/Record/Indi/Deat.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Deat extends \Record\Indi\Even +{ +} diff --git a/src/Record/Indi/Dscr.php b/src/Record/Indi/Dscr.php new file mode 100644 index 00000000..0f5496b9 --- /dev/null +++ b/src/Record/Indi/Dscr.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Dscr extends \Record\Indi\Attr +{ +} diff --git a/src/Record/Indi/Educ.php b/src/Record/Indi/Educ.php new file mode 100644 index 00000000..66c24c5e --- /dev/null +++ b/src/Record/Indi/Educ.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Educ extends \Record\Indi\Attr +{ +} diff --git a/src/Record/Indi/Emig.php b/src/Record/Indi/Emig.php new file mode 100644 index 00000000..0076f4cb --- /dev/null +++ b/src/Record/Indi/Emig.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Emig extends \Record\Indi\Even +{ +} diff --git a/src/Record/Indi/Endl.php b/src/Record/Indi/Endl.php new file mode 100644 index 00000000..63152d8c --- /dev/null +++ b/src/Record/Indi/Endl.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Endl extends Lds +{ +} diff --git a/src/Record/Indi/Even.php b/src/Record/Indi/Even.php new file mode 100644 index 00000000..ed7bd1d1 --- /dev/null +++ b/src/Record/Indi/Even.php @@ -0,0 +1,353 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +use Record; + +/** + * Class Even. + */ +class Even extends Record implements Record\Objectable, Record\Sourceable, Record\Noteable +{ + /** + * @var string + */ + protected $type; + + /** + * @var string + */ + protected $_attr; + + /** + * @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 = []; + + /** + * @var string + */ + protected $agnc; + + /** + * @var array + */ + public $ref = []; + + /** + * @var array + */ + protected $obje = []; + + /** + * @var array + */ + protected $sour = []; + + /** + * @var array + */ + protected $note = []; + + /** + * @var Record\Chan + */ + protected $chan; + + /** + * @return array + */ + public function getPhon() + { + return $this->phon; + } + + /** + * @param Record\Phon $phon + * + * @return Even + */ + public function addPhon($phon = []) + { + $this->phon[] = $phon; + + return $this; + } + + /** + * @return array + */ + public function getObje() + { + return $this->obje; + } + + /** + * @param Record\ObjeRef $obje + * + * @return Even + */ + public function addObje($obje = []) + { + $this->obje[] = $obje; + + return $this; + } + + /** + * @return array + */ + public function getSour() + { + return $this->sour; + } + + /** + * @param Record\SourRef $sour + * + * @return Even + */ + public function addSour($sour = []) + { + $this->sour[] = $sour; + + return $this; + } + + /** + * @return array + */ + public function getNote() + { + return $this->note; + } + + /** + * @param Record\NoteRef $note + * + * @return Even + */ + public function addNote($note = []) + { + $this->note[] = $note; + + return $this; + } + + /** + * @param \Record\Addr $addr + * + * @return Even + */ + public function setAddr($addr = []) + { + $this->addr = $addr; + + return $this; + } + + /** + * @return \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 \Record\Indi\Even\Plac $plac + * + * @return Even + */ + public function setPlac($plac = []) + { + $this->plac = $plac; + + return $this; + } + + /** + * @return \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/src/Record/Indi/Even/Plac.php b/src/Record/Indi/Even/Plac.php new file mode 100644 index 00000000..6d6f73c9 --- /dev/null +++ b/src/Record/Indi/Even/Plac.php @@ -0,0 +1,123 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi\Even; + +use Record; + +/** + * Class Plac. + */ +class Plac extends Record implements Record\Noteable, Record\Sourceable +{ + /** + * @var string + */ + protected $plac; + + /** + * @var string + */ + protected $form; + + /** + * @var array + */ + protected $note = []; + + /** + * @var array + */ + protected $sour = []; + + /** + * @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($note = []) + { + $this->note[] = $note; + + return $this; + } + + /** + * @return array + */ + public function getSour() + { + return $this->sour; + } + + /** + * @param Record\SourRef $sour + * + * @return Plac + */ + public function addSour($sour = []) + { + $this->sour[] = $sour; + + return $this; + } +} diff --git a/src/Record/Indi/Famc.php b/src/Record/Indi/Famc.php new file mode 100644 index 00000000..7e6578f1 --- /dev/null +++ b/src/Record/Indi/Famc.php @@ -0,0 +1,30 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +use Record\Noteable; + +class Famc extends \Gedcom\Record implements Noteable +{ + protected $_famc = null; + protected $_pedi = null; + + protected $_note = []; + + public function addNote($note = []) + { + $this->_note[] = $note; + } +} diff --git a/src/Record/Indi/Fams.php b/src/Record/Indi/Fams.php new file mode 100644 index 00000000..e6b494ad --- /dev/null +++ b/src/Record/Indi/Fams.php @@ -0,0 +1,29 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +use Record\Noteable; + +class Fams extends \Gedcom\Record implements Noteable +{ + protected $_fams = null; + + protected $_note = []; + + public function addNote($note = []) + { + $this->_note[] = $note; + } +} diff --git a/src/Record/Indi/Fcom.php b/src/Record/Indi/Fcom.php new file mode 100644 index 00000000..5141b87e --- /dev/null +++ b/src/Record/Indi/Fcom.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Fcom extends \Record\Indi\Even +{ +} diff --git a/src/Record/Indi/Grad.php b/src/Record/Indi/Grad.php new file mode 100644 index 00000000..0d3d359e --- /dev/null +++ b/src/Record/Indi/Grad.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Grad extends \Record\Indi\Even +{ +} diff --git a/src/Record/Indi/Idno.php b/src/Record/Indi/Idno.php new file mode 100644 index 00000000..2dcbb594 --- /dev/null +++ b/src/Record/Indi/Idno.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Idno extends \Record\Indi\Attr +{ +} diff --git a/src/Record/Indi/Immi.php b/src/Record/Indi/Immi.php new file mode 100644 index 00000000..d565238f --- /dev/null +++ b/src/Record/Indi/Immi.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Immi extends \Record\Indi\Even +{ +} diff --git a/src/Record/Indi/Lds.php b/src/Record/Indi/Lds.php new file mode 100644 index 00000000..e344452d --- /dev/null +++ b/src/Record/Indi/Lds.php @@ -0,0 +1,40 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +use Record\Noteable; +use Record\Sourceable; + +abstract class Lds extends \Gedcom\Record implements Sourceable, Noteable +{ + protected $_stat; + protected $_date; + protected $_plac; + protected $_temp; + + protected $_sour = []; + + protected $_note = []; + + public function addSour($sour = []) + { + $this->_sour[] = $sour; + } + + public function addNote($note = []) + { + $this->_note[] = $note; + } +} diff --git a/src/Record/Indi/Name.php b/src/Record/Indi/Name.php new file mode 100644 index 00000000..2d7e7747 --- /dev/null +++ b/src/Record/Indi/Name.php @@ -0,0 +1,52 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +/** + * @method string getName() + * @method string getNpfx() + * @method string getGivn() + * @method string getNick() + * @method string getSpfx() + * @method string getSurn() + * @method string getNsfx() + */ +class Name extends \Gedcom\Record implements \Record\Sourceable +{ + protected $_name = null; + protected $_npfx = null; + protected $_givn = null; + protected $_nick = null; + protected $_spfx = null; + protected $_surn = null; + protected $_nsfx = null; + protected $_fone = null; // PhpGedcom/ + protected $_romn = null; + protected $_type = null; + + protected $_note = []; + + protected $_sour = []; + + public function addSour($sour = []) + { + $this->_sour[] = $sour; + } + + public function addNote($note = []) + { + $this->_note[] = $note; + } +} diff --git a/src/Record/Indi/Name/Fone.php b/src/Record/Indi/Name/Fone.php new file mode 100644 index 00000000..e7d0ed9b --- /dev/null +++ b/src/Record/Indi/Name/Fone.php @@ -0,0 +1,77 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi\Name; + +use Record; + +/** + * Class Refn. + */ +class Fone extends Record +{ + /** + * @var string phonetic_variation + */ + protected $fone; + + /** + * @var string phonetic_type + */ + protected $type; + /** + * string name_piece_prefix. + */ + protected $_npfx = null; + /** + * string name_piece_given. + */ + protected $_givn = null; + /** + * string name_piece_nickname. + */ + protected $_nick = null; + /** + * strign name_piece_surname_prefix. + */ + protected $_spfx = null; + /** + * string name_piece_surname. + */ + protected $_surn = null; + /** + * string name_piece_suffix. + */ + protected $_nsfx = null; + + /** + * PhpRecord\NoteRef. + */ + protected $_note = []; + + /** + * PhpRecord\SourRef. + */ + protected $_sour = []; + + public function addSour($sour = []) + { + $this->_sour[] = $sour; + } + + public function addNote($note = []) + { + $this->_note[] = $note; + } +} diff --git a/src/Record/Indi/Name/Romn.php b/src/Record/Indi/Name/Romn.php new file mode 100644 index 00000000..27de4d73 --- /dev/null +++ b/src/Record/Indi/Name/Romn.php @@ -0,0 +1,77 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi\Name; + +use Record; + +/** + * Class Refn. + */ +class Romn extends Record +{ + /** + * @var string romanized_variation + */ + protected $romn; + + /** + * @var string romanized_type + */ + protected $type; + /** + * string name_piece_prefix. + */ + protected $_npfx = null; + /** + * string name_piece_given. + */ + protected $_givn = null; + /** + * string name_piece_nickname. + */ + protected $_nick = null; + /** + * strign name_piece_surname_prefix. + */ + protected $_spfx = null; + /** + * string name_piece_surname. + */ + protected $_surn = null; + /** + * string name_piece_suffix. + */ + protected $_nsfx = null; + + /** + * PhpRecord\NoteRef. + */ + protected $_note = []; + + /** + * PhpRecord\SourRef. + */ + protected $_sour = []; + + public function addSour($sour = []) + { + $this->_sour[] = $sour; + } + + public function addNote($note = []) + { + $this->_note[] = $note; + } +} diff --git a/src/Record/Indi/Nati.php b/src/Record/Indi/Nati.php new file mode 100644 index 00000000..77ac6dec --- /dev/null +++ b/src/Record/Indi/Nati.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Nati extends \Record\Indi\Attr +{ +} diff --git a/src/Record/Indi/Natu.php b/src/Record/Indi/Natu.php new file mode 100644 index 00000000..938e2bee --- /dev/null +++ b/src/Record/Indi/Natu.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Natu extends \Record\Indi\Even +{ +} diff --git a/src/Record/Indi/Nchi.php b/src/Record/Indi/Nchi.php new file mode 100644 index 00000000..687821c1 --- /dev/null +++ b/src/Record/Indi/Nchi.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Nchi extends \Record\Indi\Attr +{ +} diff --git a/src/Record/Indi/Nmr.php b/src/Record/Indi/Nmr.php new file mode 100644 index 00000000..d73235eb --- /dev/null +++ b/src/Record/Indi/Nmr.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Nmr extends \Record\Indi\Attr +{ +} diff --git a/src/Record/Indi/Note.php b/src/Record/Indi/Note.php new file mode 100644 index 00000000..b79e322d --- /dev/null +++ b/src/Record/Indi/Note.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Note extends \Record\NoteRefAbstract +{ +} diff --git a/src/Record/Indi/Occu.php b/src/Record/Indi/Occu.php new file mode 100644 index 00000000..0307f344 --- /dev/null +++ b/src/Record/Indi/Occu.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Occu extends \Record\Indi\Attr +{ +} diff --git a/src/Record/Indi/Ordn.php b/src/Record/Indi/Ordn.php new file mode 100644 index 00000000..dc1e0f4a --- /dev/null +++ b/src/Record/Indi/Ordn.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Ordn extends \Record\Indi\Even +{ +} diff --git a/src/Record/Indi/Prob.php b/src/Record/Indi/Prob.php new file mode 100644 index 00000000..a0b4e457 --- /dev/null +++ b/src/Record/Indi/Prob.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Prob extends \Record\Indi\Even +{ +} diff --git a/src/Record/Indi/Prop.php b/src/Record/Indi/Prop.php new file mode 100644 index 00000000..c4fdc192 --- /dev/null +++ b/src/Record/Indi/Prop.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Prop extends \Record\Indi\Attr +{ +} diff --git a/src/Record/Indi/Reli.php b/src/Record/Indi/Reli.php new file mode 100644 index 00000000..55aaaa7a --- /dev/null +++ b/src/Record/Indi/Reli.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Reli extends \Record\Indi\Attr +{ +} diff --git a/src/Record/Indi/Resi.php b/src/Record/Indi/Resi.php new file mode 100644 index 00000000..945b71e5 --- /dev/null +++ b/src/Record/Indi/Resi.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Resi extends \Record\Indi\Attr +{ +} diff --git a/src/Record/Indi/Reti.php b/src/Record/Indi/Reti.php new file mode 100644 index 00000000..2a7f2a10 --- /dev/null +++ b/src/Record/Indi/Reti.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Reti extends \Record\Indi\Even +{ +} diff --git a/src/Record/Indi/Slgc.php b/src/Record/Indi/Slgc.php new file mode 100644 index 00000000..964f5c8a --- /dev/null +++ b/src/Record/Indi/Slgc.php @@ -0,0 +1,20 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Slgc extends Lds +{ + protected $_famc = null; +} diff --git a/src/Record/Indi/Ssn.php b/src/Record/Indi/Ssn.php new file mode 100644 index 00000000..2e157d97 --- /dev/null +++ b/src/Record/Indi/Ssn.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Ssn extends \Record\Indi\Attr +{ +} diff --git a/src/Record/Indi/Titl.php b/src/Record/Indi/Titl.php new file mode 100644 index 00000000..43326743 --- /dev/null +++ b/src/Record/Indi/Titl.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Titl extends \Record\Indi\Attr +{ +} diff --git a/src/Record/Indi/Will.php b/src/Record/Indi/Will.php new file mode 100644 index 00000000..848b2f2c --- /dev/null +++ b/src/Record/Indi/Will.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Indi; + +class Will extends \Record\Indi\Even +{ +} diff --git a/src/Record/Note.php b/src/Record/Note.php new file mode 100644 index 00000000..78cae0d5 --- /dev/null +++ b/src/Record/Note.php @@ -0,0 +1,38 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +class Note extends \Gedcom\Record implements Sourceable +{ + protected $_id = null; + protected $_note = null; + + protected $_even = null; + protected $_refn = []; + protected $_rin = null; + + protected $_sour = []; + protected $_chan = null; + + public function addRefn($refn = []) + { + $this->_refn[] = $refn; + } + + public function addSour($sour = []) + { + $this->_sour[] = $sour; + } +} diff --git a/src/Record/NoteRef.php b/src/Record/NoteRef.php new file mode 100644 index 00000000..754db9bf --- /dev/null +++ b/src/Record/NoteRef.php @@ -0,0 +1,39 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +class NoteRef extends \Gedcom\Record implements Sourceable +{ + protected $_isRef = false; + + protected $_note = ''; + + protected $_sour = []; + + public function setIsReference($isReference = true) + { + $this->_isRef = $isReference; + } + + public function getIsReference() + { + return $this->_isRef; + } + + public function addSour($sour = []) + { + $this->_sour[] = $sour; + } +} diff --git a/src/Record/Noteable.php b/src/Record/Noteable.php new file mode 100644 index 00000000..fef38ed1 --- /dev/null +++ b/src/Record/Noteable.php @@ -0,0 +1,20 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +interface Noteable +{ + public function addNote($note = []); +} diff --git a/src/Record/Obje.php b/src/Record/Obje.php new file mode 100644 index 00000000..c91152bc --- /dev/null +++ b/src/Record/Obje.php @@ -0,0 +1,50 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +class Obje extends \Gedcom\Record implements Noteable +{ + protected $_id = null; + + protected $_file = []; + protected $_rin = null; + protected $_chan = null; + + protected $_refn = []; + + protected $_note = []; + + protected $_sour = []; + + public function addRefn($refn = []) + { + $this->_refn[] = $refn; + } + + public function addNote($note = []) + { + $this->_note[] = $note; + } + + public function addFile($file) + { + $this->_file[] = $file; + } + + public function addSour($sour) + { + $this->_sour[] = $sour; + } +} diff --git a/src/Record/ObjeRef.php b/src/Record/ObjeRef.php new file mode 100644 index 00000000..86c7d742 --- /dev/null +++ b/src/Record/ObjeRef.php @@ -0,0 +1,36 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +class ObjeRef extends \Gedcom\Record +{ + protected $_isRef = false; + + protected $_obje = null; + + protected $_titl = null; + + protected $_file = null; + + public function setIsReference($isReference = true) + { + $this->_isRef = $isReference; + } + + public function getIsReference() + { + return $this->_isRef; + } +} diff --git a/src/Record/ObjeRef/File.php b/src/Record/ObjeRef/File.php new file mode 100644 index 00000000..015b05c5 --- /dev/null +++ b/src/Record/ObjeRef/File.php @@ -0,0 +1,34 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\ObjeRef; + +use Record; + +/** + * Class Refn. + */ +class File extends Record +{ + /** + * @var string multimedia_file_refn + */ + protected $_file; + + /** + * @var PhpRecord\ObjeRef\File\Form + */ + protected $_form; + protected $_titl; +} diff --git a/src/Record/ObjeRef/File/Form.php b/src/Record/ObjeRef/File/Form.php new file mode 100644 index 00000000..7b20c468 --- /dev/null +++ b/src/Record/ObjeRef/File/Form.php @@ -0,0 +1,40 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\ObjeRef\File; + +use Record; + +/** + * Class Refn. + */ +class Form extends Record +{ + /** + * @var string multimedia_format + */ + protected $form; + + /** + * @var string source_media_type + * for only obje + */ + protected $type; + + /** + * @var string source_media_type + * for only objeref + */ + protected $medi; +} diff --git a/src/Record/Objectable.php b/src/Record/Objectable.php new file mode 100644 index 00000000..6e1e09f9 --- /dev/null +++ b/src/Record/Objectable.php @@ -0,0 +1,20 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +interface Objectable +{ + public function addObje($obje = []); +} diff --git a/src/Record/Phon.php b/src/Record/Phon.php new file mode 100644 index 00000000..a1aa98a7 --- /dev/null +++ b/src/Record/Phon.php @@ -0,0 +1,48 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +use Record; + +/** + * Class Phon. + */ +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/src/Record/Plac.php b/src/Record/Plac.php new file mode 100644 index 00000000..9c2835a9 --- /dev/null +++ b/src/Record/Plac.php @@ -0,0 +1,55 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +class Plac extends \Gedcom\Record implements Noteable +{ + /** + * string plac. + */ + protected $_plac = null; + /** + * string place_hierarchy. + */ + protected $_form = null; + /** + * array PhpRecord\Plac\Fone. + */ + protected $_fone = null; + /** + * array PhpRecord\Plac\Romn. + */ + protected $_romn = null; + /** + * PhpRecord\Plac\Map. + */ + protected $_map = null; + /** + * array PhpRecord\NoteRef. + */ + protected $_note = null; + + /** + * @param PhpRecord\NoteRef $note + * + * @return Plac + */ + public function addNote($note = null) + { + $this->_note[] = $note; + + return $this; + } +} diff --git a/src/Record/Plac/Fone.php b/src/Record/Plac/Fone.php new file mode 100644 index 00000000..0e3c98e6 --- /dev/null +++ b/src/Record/Plac/Fone.php @@ -0,0 +1,33 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Plac; + +use Record; + +/** + * Class Refn. + */ +class Fone extends Record +{ + /** + * @var string phonetic_variation + */ + protected $_fone; + + /** + * @var string phonetic_type + */ + protected $_type; +} diff --git a/src/Record/Plac/Map.php b/src/Record/Plac/Map.php new file mode 100644 index 00000000..41827d75 --- /dev/null +++ b/src/Record/Plac/Map.php @@ -0,0 +1,33 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Plac; + +use Record; + +/** + * Class Refn. + */ +class Map extends Record +{ + /** + * @var string place_latitude + */ + protected $lati; + + /** + * @var string place_longitude + */ + protected $long; +} diff --git a/src/Record/Plac/Romn.php b/src/Record/Plac/Romn.php new file mode 100644 index 00000000..650c547e --- /dev/null +++ b/src/Record/Plac/Romn.php @@ -0,0 +1,33 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Plac; + +use Record; + +/** + * Class Refn. + */ +class Romn extends Record +{ + /** + * @var string romanized_variation + */ + protected $romn; + + /** + * @var string romanized_type + */ + protected $type; +} diff --git a/src/Record/Refn.php b/src/Record/Refn.php new file mode 100644 index 00000000..eff75f15 --- /dev/null +++ b/src/Record/Refn.php @@ -0,0 +1,73 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +use Record; + +/** + * Class Refn. + */ +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/src/Record/Repo.php b/src/Record/Repo.php new file mode 100644 index 00000000..31294b32 --- /dev/null +++ b/src/Record/Repo.php @@ -0,0 +1,303 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +use Record; + +/** + * Class Repo. + */ +class Repo extends Record implements Noteable +{ + /** + * @var string + */ + protected $repo; + + /** + * @var string + */ + protected $name; + + /** + * @var Addr + */ + protected $addr; + + /** + * @var array + */ + protected $phon = []; + /** + * @var array + */ + protected $email = []; + /** + * @var array + */ + protected $fax = []; + /** + * @var array + */ + protected $www = []; + /** + * @var string + */ + protected $rin; + + /** + * @var Chan + */ + protected $chan; + + /** + * @var array + */ + protected $refn = []; + + /** + * @var array + */ + protected $note = []; + + /** + * @param null + * + * @return Repo + */ + public function addPhon($phon = null) + { + $this->phon[] = $phon; + + return $this; + } + + /** + * @return array + */ + public function getPhon() + { + return $this->phon; + } + + /** + * @param null + * + * @return Repo + */ + public function addEmail($email = null) + { + $this->email[] = $email; + + return $this; + } + + /** + * @return array + */ + public function getEmail() + { + return $this->email; + } + + /** + * @param null + * + * @return Repo + */ + public function addFax($fax = null) + { + $this->fax[] = $fax; + + return $this; + } + + /** + * @return array + */ + public function getFax() + { + return $this->fax; + } + + /** + * @param null + * + * @return Repo + */ + public function addWww($www = null) + { + $this->www[] = $www; + + return $this; + } + + /** + * @return array + */ + public function getWww() + { + return $this->www; + } + + /** + * @param null|\Record\Refn $refn + * + * @return Repo + */ + public function addRefn($refn = null) + { + if (empty($refn)) { + $refn = new \Record\Refn(); + } + $this->refn[] = $refn; + + return $this; + } + + /** + * @return array + */ + public function getRefn() + { + return $this->refn; + } + + /** + * @param null|\Record\NoteRef $note + * + * @return Repo + */ + public function addNote($note = null) + { + if (empty($node)) { + $note = new \Record\NoteRef(); + } + $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 null|\Record\Addr $addr + * + * @return Repo + */ + public function setAddr($addr = null) + { + if (empty($addr)) { + $addr = new \Record\Addr(); + } + $this->addr = $addr; + + return $this; + } + + /** + * @return \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 \Record\Chan $chan + * + * @return Repo + */ + public function setChan($chan = []) + { + $this->chan = $chan; + + return $this; + } + + /** + * @return \Record\Chan + */ + public function getChan() + { + return $this->chan; + } +} diff --git a/src/Record/RepoRef.php b/src/Record/RepoRef.php new file mode 100644 index 00000000..4dd20fba --- /dev/null +++ b/src/Record/RepoRef.php @@ -0,0 +1,29 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +class RepoRef extends \Gedcom\Record implements Noteable +{ + protected $_repo = null; + + protected $_caln = []; + + protected $_note = []; + + public function addNote($note = []) + { + $this->_note[] = $note; + } +} diff --git a/src/Record/Sour.php b/src/Record/Sour.php new file mode 100644 index 00000000..88a17730 --- /dev/null +++ b/src/Record/Sour.php @@ -0,0 +1,348 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +use Record; + +/** + * Class Sour. + */ +class Sour extends Record implements Noteable, Objectable +{ + /** + * @var string + */ + protected $sour; + + /** + * @var Data + */ + protected $data; + + /** + * @var string + */ + protected $auth; + + /** + * @var string + */ + protected $titl; + + /** + * @var string + */ + protected $abbr; + + /** + * @var string + */ + protected $publ; + + /** + * @var string + */ + protected $text; + + /** + * @var Repo + */ + protected $repo; + + /** + * @var array + */ + protected $refn = []; + + /** + * @var string + */ + protected $rin; + + /** + * @var Chan + */ + protected $chan; + + /** + * @var array + */ + protected $note = []; + + /** + * @var array + */ + protected $obje = []; + + /** + * @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 \Record\Repo $repo + * + * @return Sour + */ + public function setRepo($repo) + { + $this->repo = $repo; + + return $this; + } + + /** + * @return \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 \Record\Chan $chan + * + * @return Sour + */ + public function setChan($chan = []) + { + $this->chan = $chan; + + return $this; + } + + /** + * @return \Record\Chan + */ + public function getChan() + { + return $this->chan; + } + + /** + * @param Refn $refn + * + * @return Sour + */ + public function addRefn($refn = []) + { + $this->refn[] = $refn; + + return $this; + } + + /** + * @return array + */ + public function getRefn() + { + return $this->refn; + } + + /** + * @param NoteRef $note + * + * @return Sour + */ + public function addNote($note = []) + { + $this->note[] = $note; + + return $this; + } + + /** + * @return array + */ + public function getNote() + { + return $this->note; + } + + /** + * @param ObjeRef $obje + * + * @return Sour + */ + public function addObje($obje = []) + { + $this->obje[] = $obje; + + return $this; + } + + /** + * @return array + */ + public function getObje() + { + return $this->obje; + } +} diff --git a/src/Record/Sour/Data.php b/src/Record/Sour/Data.php new file mode 100644 index 00000000..3d7683b3 --- /dev/null +++ b/src/Record/Sour/Data.php @@ -0,0 +1,33 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Sour; + +use Record\Noteable; + +class Data extends \Gedcom\Record implements Noteable +{ + protected $_even = []; + protected $_agnc = null; + protected $_date = null; + + protected $_text = null; + + protected $_note = []; + + public function addNote($note = []) + { + $this->_note[] = $note; + } +} diff --git a/src/Record/Sour/Data/Even.php b/src/Record/Sour/Data/Even.php new file mode 100644 index 00000000..4ea9d845 --- /dev/null +++ b/src/Record/Sour/Data/Even.php @@ -0,0 +1,21 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Sour\Data; + +class Even extends \Gedcom\Record +{ + protected $_date = null; + protected $_plac = null; +} diff --git a/src/Record/Sour/Repo.php b/src/Record/Sour/Repo.php new file mode 100644 index 00000000..773cd43e --- /dev/null +++ b/src/Record/Sour/Repo.php @@ -0,0 +1,41 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Sour; + +use Record\Noteable; + +class Repo extends \Gedcom\Record implements Noteable +{ + protected $_repo = null; + /** + * array PhpRecord\Sour\Repo\Caln. + */ + protected $_caln = []; + + /** + * array PhpRecord\NoteRef. + */ + protected $_note = []; + + public function addNote($note = []) + { + $this->_note[] = $note; + } + + public function addCaln($caln = []) + { + $this->_caln[] = $caln; + } +} diff --git a/src/Record/Sour/Repo/Caln.php b/src/Record/Sour/Repo/Caln.php new file mode 100644 index 00000000..b1e2e5e3 --- /dev/null +++ b/src/Record/Sour/Repo/Caln.php @@ -0,0 +1,27 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\Sour\Repo; + +class Caln extends \Gedcom\Record +{ + /** + * string source_call_number. + */ + protected $_caln = null; + /** + * string source_media_type. + */ + protected $_medi = null; +} diff --git a/src/Record/SourRef.php b/src/Record/SourRef.php new file mode 100644 index 00000000..b6befc68 --- /dev/null +++ b/src/Record/SourRef.php @@ -0,0 +1,30 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +class SourRef extends \Gedcom\Record +{ + protected $_isRef = false; + + protected $_sour = null; + protected $_page = null; + protected $_even = null; + protected $_data = null; + protected $_quay = null; + protected $_text = null; + + protected $_obje = []; + protected $_note = []; +} diff --git a/src/Record/SourRef/Data.php b/src/Record/SourRef/Data.php new file mode 100644 index 00000000..61dc51f1 --- /dev/null +++ b/src/Record/SourRef/Data.php @@ -0,0 +1,27 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\SourRef; + +class Data extends \Gedcom\Record +{ + /** + * string entry_recording_date. + */ + protected $_date = null; + /** + * string text_from_source. + */ + protected $_text = null; +} diff --git a/src/Record/SourRef/Even.php b/src/Record/SourRef/Even.php new file mode 100644 index 00000000..8120bee5 --- /dev/null +++ b/src/Record/SourRef/Even.php @@ -0,0 +1,21 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record\SourRef; + +class Even extends \Gedcom\Record +{ + protected $_even = null; + protected $_role = null; +} diff --git a/src/Record/Sourceable.php b/src/Record/Sourceable.php new file mode 100644 index 00000000..e2ee9ad8 --- /dev/null +++ b/src/Record/Sourceable.php @@ -0,0 +1,20 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +interface Sourceable +{ + public function addSour($sour = []); +} diff --git a/src/Record/Subm.php b/src/Record/Subm.php new file mode 100644 index 00000000..feb36c67 --- /dev/null +++ b/src/Record/Subm.php @@ -0,0 +1,360 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +use Record; + +/** + * Class Subm. + */ +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 = []; + + /** + * @var array + */ + protected $phon = []; + + /** + * @var array + */ + protected $email = []; + + /** + * @var array + */ + protected $fax = []; + + /** + * @var array + */ + protected $www = []; + + /** + * @var array + */ + protected $obje = []; + + /** + * @var array + */ + protected $note = []; + + /** + * @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 Record\Phon $phon + * + * @return Subm + */ + public function addPhon($phon = []) + { + $this->phon[] = $phon; + + return $this; + } + + /** + * @return array + */ + public function getEmail() + { + return $this->email; + } + + /** + * @param Record\Phon $phon + * + * @return Subm + */ + public function addEmail($email) + { + $this->email[] = $email; + + return $this; + } + + /** + * @return array + */ + public function getFax() + { + return $this->fax; + } + + /** + * @param Record\Phon $phon + * + * @return Subm + */ + public function addFax($fax) + { + $this->fax[] = $fax; + + return $this; + } + + /** + * @return array + */ + public function getWww() + { + return $this->www; + } + + /** + * @param Record\Phon $phon + * + * @return Subm + */ + public function addWww($www) + { + $this->www[] = $www; + + return $this; + } + + /** + * @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 \Record\Chan $chan + * + * @return Subm + */ + public function setChan($chan = []) + { + $this->chan = $chan; + + return $this; + } + + /** + * @return \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; + } + + /** + * @return Addr + */ + public function getAddr() + { + return $this->addr; + } + + /** + * @param Addr $addr + * + * @return Subm + */ + public function setAddr($addr = []) + { + $this->addr = $addr; + + return $this; + } + + /** + * @return array + */ + public function getObje() + { + return $this->obje; + } + + /** + * @param Record\ObjeRef $obje + * + * @return Subm + */ + public function addObje($obje = []) + { + $this->obje[] = $obje; + + return $this; + } + + /** + * @return array + */ + public function getNote() + { + return $this->note; + } + + /** + * @param Record\Note $note + * + * @return Subm + */ + public function addNote($note = []) + { + $this->note[] = $note; + + return $this; + } +} diff --git a/src/Record/Subn.php b/src/Record/Subn.php new file mode 100644 index 00000000..beb91484 --- /dev/null +++ b/src/Record/Subn.php @@ -0,0 +1,257 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Record; + +use Record; + +/** + * Class Subn. + */ +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; + + /** + * @var array + */ + protected $_note = []; + + /** + * @var \Record\Chan + */ + protected $_chan = null; + + public function setChan($chan) + { + $this->_chan = $chan; + + return $this; + } + + public function getChan() + { + return $this->_chan; + } + + public function addNote($note) + { + $this->_note[] = $note; + + return $this; + } + + public function getNote() + { + return $this->_note; + } + + /** + * @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/src/Writer.php b/src/Writer.php new file mode 100644 index 00000000..7e6ca21f --- /dev/null +++ b/src/Writer.php @@ -0,0 +1,128 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Gedcom; + +use Gedcom\Writer\Fam; +use Gedcom\Writer\Head; +use Gedcom\Writer\Indi; +use Gedcom\Writer\Note; +use Gedcom\Writer\Obje; +use Gedcom\Writer\Repo; +use Gedcom\Writer\Sour; +use Gedcom\Writer\Subm; +use Gedcom\Writer\Subn; + +class Writer +{ + const GEDCOM55 = 'gedcom5.5'; + + protected $_output = null; + + /** + * @param \Gedcom\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(); + $subn = $gedcom->getSubn(); + $subms = $gedcom->getSubm(); // array() + $sours = $gedcom->getSour(); // array() + $indis = $gedcom->getIndi(); // array() + $fams = $gedcom->getFam(); // array() + $notes = $gedcom->getNote(); // array() + $repos = $gedcom->getRepo(); // array() + $objes = $gedcom->getObje(); // array() + + $output = '0 FORMAT '.$format."\n"; + + // head + if ($head) { + $output = Head::convert($head, $format); + } + + // subn + if ($subn) { + $output .= Subn::convert($subn); + } + + // subms + if (!empty($subms) && count($subms) > 0) { + foreach ($subms as $item) { + if ($item) { + $output .= Subm::convert($item); + } + } + } + + // sours + if (!empty($sours) && count($sours) > 0) { + foreach ($sours as $item) { + if ($item) { + $output .= Sour::convert($item); + } + } + } + + // indis + if (!empty($indis) && count($indis) > 0) { + foreach ($indis as $item) { + if ($item) { + $output .= Indi::convert($item); + } + } + } + + // fams + if (!empty($fams) && count($fams) > 0) { + foreach ($fams as $item) { + if ($item) { + $output .= Fam::convert($item); + } + } + } + // notes + if (!empty($notes) && count($notes) > 0) { + foreach ($notes as $item) { + if ($item) { + $output .= Note::convert($item); + } + } + } + + // repos + if (!empty($repos) && count($repos) > 0) { + foreach ($repos as $item) { + if ($item) { + $output .= Repo::convert($item); + } + } + } + // Objes + if (!empty($objes) && count($objes) > 0) { + foreach ($objes as $item) { + if ($item) { + $output .= Obje::convert($item); + } + } + } + // EOF + $output .= "0 TRLR\n"; + + return $output; + } +} diff --git a/src/Writer/Addr.php b/src/Writer/Addr.php new file mode 100644 index 00000000..cce90182 --- /dev/null +++ b/src/Writer/Addr.php @@ -0,0 +1,47 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer; + +class Addr +{ + /** + * @param \Record\Addr $addr + * @param string $format + * @param int $level + * + * @return string + */ + public static function convert(\Record\Addr &$addr, $format = self::GEDCOM55, $level = 1) + { + $addrs = explode("\n", $addr->getAddr()); + + $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->getAdr2()."\n". + ($level + 1).' CITY '.$addr->getCity()."\n". + ($level + 1).' STAE '.$addr->getStae()."\n". + ($level + 1).' POST '.$addr->getPost()."\n". + ($level + 1).' CTRY '.$addr->getCtry()."\n"; + + return $output; + } +} diff --git a/src/Writer/Caln.php b/src/Writer/Caln.php new file mode 100644 index 00000000..4f526c3b --- /dev/null +++ b/src/Writer/Caln.php @@ -0,0 +1,46 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer; + +class Caln +{ + /** + * @param \Record\Caln $note + * @param int $level + * + * @return string + */ + public static function convert(\Record\Caln &$caln, $level) + { + $output = ''; + $_caln = $caln->getCaln(); + if (empty($_caln)) { + return $output; + } else { + $output .= $level.' CALN '.$_caln."\n"; + } + + // level up + $level++; + + // medi + $medi = $caln->getMedi(); + if (!empty($medi)) { + $output .= $level.' MEDI '.$medi."\n"; + } + + return $output; + } +} diff --git a/src/Writer/Chan.php b/src/Writer/Chan.php new file mode 100644 index 00000000..d825e76e --- /dev/null +++ b/src/Writer/Chan.php @@ -0,0 +1,51 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer; + +class Chan +{ + /** + * @param \Record\Chan $note + * @param int $level + * + * @return string + */ + public static function convert(\Record\Chan &$chan, $level) + { + $output = $level." CHAN \n"; + // level up + $level++; + // DATE + $_date = $chan->getDate(); + if (!empty($_date)) { + $output .= $level.' DATE '.$_date."\n"; + } + // TIME + $_time = $chan->getDate(); + if (!empty($_time)) { + $output .= $level.' DATE '.$_time."\n"; + } + // $_note = array() + $_note = $chan->getNote(); + if (!empty($_note) && count($_note) > 0) { + foreach ($_note as $item) { + $_convert = \Writer\NoteRef::convert($item, $level); + $output .= $_convert; + } + } + + return $output; + } +} diff --git a/src/Writer/Fam.php b/src/Writer/Fam.php new file mode 100644 index 00000000..661bedf1 --- /dev/null +++ b/src/Writer/Fam.php @@ -0,0 +1,153 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer; + +class Fam +{ + /** + * @param \Record\Fam $sour + * @param int $level + * + * @return string + */ + public static function convert(\Record\Fam &$fam, $level = 0) + { + $output = ''; + $id = $fam->getId(); + if (empty($id)) { + return $output; + } else { + $output .= $level.' @'.$id.'@ FAM '."\n"; + } + // level up + $level++; + + // HUSB + $husb = $fam->getHusb(); + if (!empty($husb)) { + $output .= $level.' HUSB @'.$husb."@\n"; + } + + // WIFE + $wife = $fam->getWife(); + if (!empty($wife)) { + $output .= $level.' WIFE @'.$wife."@\n"; + } + + // CHIL + $chil = $fam->getChil(); + if (!empty($chil) && count($chil) > 0) { + foreach ($chil as $item) { + if ($item) { + $_convert = $level.' CHIL @'.$item."@\n"; + $output .= $_convert; + } + } + } + // NCHI + $nchi = $fam->getNchi(); + if (!empty($nchi)) { + $output .= $level.' NCHI '.$nchi."\n"; + } + + // SUBM array + $subm = $fam->getSubm(); + + if (!empty($subm) && count($subm) > 0) { + foreach ($subm as $item) { + if ($item) { + $output .= $level.' SUBM '.$item."\n"; + } + } + } + + // RIN + $rin = $fam->getRin(); + if (!empty($rin)) { + $output .= $level.' RIN '.$rin."\n"; + } + // CHAN + $chan = $fam->getChan(); + if (!empty($chan)) { + $_convert = \Writer\Chan::convert($chan, $level); + $output .= $_convert; + } + // SLGS + $slgs = $fam->getSlgs(); + if (!empty($slgs) && count($slgs) > 0) { + if ($slgs) { + $_convert = \Writer\Fam\Slgs::convert($item, $level); + $output .= $_convert; + } + } + + // REFN array + $refn = $fam->getRefn(); + if (!empty($refn) && count($refn) > 0) { + foreach ($refn as $item) { + if ($item) { + $_convert = \Writer\Refn::convert($item, $level); + $output .= $_convert; + } + } + } + + // NOTE array + $note = $fam->getNote(); + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { + if ($item) { + $_convert = \Writer\NoteRef::convert($item, $level); + $output .= $_convert; + } + } + } + + // SOUR + $sour = $fam->getSour(); + if (!empty($sour) && count($sour) > 0) { + foreach ($sour as $item) { + if ($item) { + $_convert = \Writer\SourRef::convert($item, $level); + $output .= $_convert; + } + } + } + + // OBJE + $obje = $fam->getObje(); + if (!empty($obje) && count($obje) > 0) { + foreach ($obje as $item) { + if ($item) { + $_convert = \Writer\ObjeRef::convert($item, $level); + $output .= $_convert; + } + } + } + + // EVEN + $even = $fam->getAllEven(); + if (!empty($even) && count($even) > 0) { + foreach ($even as $item) { + if ($item) { + $_convert = \Writer\Fam\Even::convert($item, $level); + $output .= $_convert; + } + } + } + + return $output; + } +} diff --git a/src/Writer/Fam/Even.php b/src/Writer/Fam/Even.php new file mode 100644 index 00000000..085c99fe --- /dev/null +++ b/src/Writer/Fam/Even.php @@ -0,0 +1,134 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\Fam; + +class Even +{ + /** + * @param \Record\Fam\Even $even + * @param int $level + * + * @return string + */ + public static function convert(\Record\Fam\Even &$even, $level) + { + $output = ''; + + // $type; + $type = $even->getType(); + if (!empty($type)) { + $output .= $level.' '.$type."\n"; + } else { + return $output; + } + $level++; + + // $type; + $type = $even->getType(); + if (!empty($type)) { + $output .= $level.' TYPE '.$type."\n"; + } + + // $date; + $date = $even->getDate(); + if (!empty($date)) { + $output .= $level.' DATE '.$date."\n"; + } + + // Plac + $plac = $even->getPlac(); + if (!empty($plac)) { + $_convert = \Writer\Indi\Even\Plac::convert($plac, $level); + $output .= $_convert; + } + + // $caus; + $caus = $even->getCaus(); + if (!empty($caus)) { + $output .= $level.' CAUS '.$caus."\n"; + } + + // $age; + $age = $even->getAge(); + if (!empty($age)) { + $output .= $level.' AGE '.$age."\n"; + } + + // $addr + $addr = $even->getAddr(); + if (!empty($addr)) { + $_convert = \Writer\Addr::convert($addr, $level); + $output .= $_convert; + } + + // $phon = array() + $phon = $even->getPhon(); + if (!empty($phon) && count($phon) > 0) { + foreach ($phon as $item) { + $_convert = \Writer\Phon::convert($item, $level); + $output .= $_convert; + } + } + // $agnc + $agnc = $even->getAgnc(); + if (!empty($agnc)) { + $output .= $level.' AGNC '.$agnc."\n"; + } + + // HUSB + $husb = $even->getHusb(); + if (!empty($husb)) { + $_convert = \Writer\Fam\Even\Husb::convert($husb, $level); + $output .= $_convert; + } + + // WIFE + $wife = $even->getWife(); + if (!empty($wife)) { + $_convert = \Writer\Fam\Even\Wife::convert($wife, $level); + $output .= $_convert; + } + + // $ref = array(); + // This is not in parser + + // $obje = array(); + $obje = $even->getObje(); + if (!empty($obje) && count($obje) > 0) { + foreach ($obje as $item) { + $_convert = \Writer\ObjeRef::convert($item, $level); + $output .= $_convert; + } + } + // $sour = array(); + $sour = $even->getSour(); + if (!empty($sour) && count($sour) > 0) { + foreach ($sour as $item) { + $_convert = \Writer\SourRef::convert($item, $level); + $output .= $_convert; + } + } + // $note = array(); + $note = $even->getNote(); + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { + $_convert = \Writer\NoteRef::convert($item, $level); + $output .= $_convert; + } + } + + return $output; + } +} diff --git a/src/Writer/Fam/Even/Husb.php b/src/Writer/Fam/Even/Husb.php new file mode 100644 index 00000000..5e5554ea --- /dev/null +++ b/src/Writer/Fam/Even/Husb.php @@ -0,0 +1,41 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\Fam\Even; + +class Husb +{ + /** + * @param \Record\Fam\Even\Husb $attr + * @param int $level + * + * @return string + */ + public static function convert(\Record\Fam\Even\Husb &$husb, $level = 0) + { + $output = ''; + + $output .= $level." WIFE \n"; + // level up + $level++; + + // AGE + $age = $husb->getAge(); + if (!empty($age)) { + $output .= $level.' AGE '.$age."\n"; + } + + return $output; + } +} diff --git a/src/Writer/Fam/Even/Wife.php b/src/Writer/Fam/Even/Wife.php new file mode 100644 index 00000000..47ccd8d9 --- /dev/null +++ b/src/Writer/Fam/Even/Wife.php @@ -0,0 +1,41 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\Fam\Even; + +class Wife +{ + /** + * @param \Record\Fam\Even\Wife $attr + * @param int $level + * + * @return string + */ + public static function convert(\Record\Fam\Even\Wife &$wife, $level = 0) + { + $output = ''; + + $output .= $level." HUSB \n"; + // level up + $level++; + + // AGE + $age = $wife->getAge(); + if (!empty($age)) { + $output .= $level.' AGE '.$age."\n"; + } + + return $output; + } +} diff --git a/src/Writer/Fam/Slgs.php b/src/Writer/Fam/Slgs.php new file mode 100644 index 00000000..d43851cd --- /dev/null +++ b/src/Writer/Fam/Slgs.php @@ -0,0 +1,76 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\Fam; + +class Slgs +{ + /** + * @param \Record\Fam\Slgs $slgs + * @param int $level + * + * @return string + */ + public static function convert(\Record\Fam\Slgs &$slgs, $level) + { + $output = ''; + $output .= $level." SLGS \n"; + + // Level up + $level++; + + // $STAT; + $stat = $slgs->getStat(); + if (!empty($stat)) { + $output .= $level.' STAT '.$stat."\n"; + } + + // $date; + $date = $slgs->getDate(); + if (!empty($date)) { + $output .= $level.' DATE '.$date."\n"; + } + + // PLAC + $plac = $slgs->getPlac(); + if (!empty($plac)) { + $output .= $level.' PLAC '.$plac."\n"; + } + + // $TEMP; + $temp = $slgs->getTemp(); + if (!empty($temp)) { + $output .= $level.' TEMP '.$temp."\n"; + } + + // $sour = array(); + $sour = $slgs->getSour(); + if (!empty($sour) && count($sour) > 0) { + foreach ($sour as $item) { + $_convert = \Writer\SourRef::convert($item, $level); + $output .= $_convert; + } + } + // $note = array(); + $note = $slgs->getNote(); + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { + $_convert = \Writer\NoteRef::convert($item, $level); + $output .= $_convert; + } + } + + return $output; + } +} diff --git a/src/Writer/Head.php b/src/Writer/Head.php new file mode 100644 index 00000000..25a3a923 --- /dev/null +++ b/src/Writer/Head.php @@ -0,0 +1,127 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer; + +class Head +{ + /** + * @param \Record\Head $head + * @param string $format + * + * @return string + */ + public static function convert(\Record\Head &$head, $format = self::GEDCOM55) + { + $level = 0; + $output = $level." HEAD\n"; + + // level up + $level++; + + //SOUR + $sour = $head->getSour(); + if ($sour) { + $_convert = \Writer\Head\Sour::convert($sour, $level); + $output .= $_convert; + } + + // DEST + $dest = $head->getDest(); + if ($dest) { + $output .= $level.' DEST '.$dest."\n"; + } + + //Subm + $subm = $head->getSubm(); + if ($subm) { + $output .= $level.' SUBM '.$subm."\n"; + } + + // SUBN + $subn = $head->getSubn(); + if ($subn) { + $output .= $level.' SUBN '.$subn."\n"; + } + + // FILE + $file = $head->getFile(); + if ($file) { + $output .= $level.' FILE '.$file."\n"; + } + + // COPR + $copr = $head->getCopr(); + if ($copr) { + $output .= $level.' COPR '.$copr."\n"; + } + + // LANG + $lang = $head->getLang(); + if ($lang) { + $output .= $level.' LANG '.$lang."\n"; + } + // DATE + $date = $head->getDate(); + if ($date) { + $_convert = \Writer\Head\Date::convert($date, $level); + $output .= $_convert; + } + + // GEDC + $gedc = $head->getGedc(); + if ($gedc) { + $_convert = \Writer\Head\Gedc::convert($gedc, $level); + $output .= $_convert; + } + + // CHAR + $char = $head->getChar(); + if ($char) { + $_convert = \Writer\Head\Char::convert($char, $level); + $output .= $_convert; + } + // PLAC + $plac = $head->getPlac(); + if ($plac) { + $_convert = \Writer\Head\Plac::convert($plac, $level); + $output .= $_convert; + } + + // NOTE + $note = $head->getNote(); + if ($note) { + $output .= $level.' NOTE '.$note."\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/src/Writer/Head/Char.php b/src/Writer/Head/Char.php new file mode 100644 index 00000000..505401b5 --- /dev/null +++ b/src/Writer/Head/Char.php @@ -0,0 +1,47 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\Head; + +class Char +{ + /** + * @param \Record\Head\Char $char + * @param string $format + * @param int $level + * + * @return string + */ + public static function convert(\Record\Head\Char &$char, $level) + { + $output = ''; + // char + $_char = $char->getChar(); + if ($_char) { + $output .= $level.' CHAR '.$_char."\n"; + } else { + return $output; + } + + // level up + $level++; + // VERS + $vers = $char->getVersion(); + if ($vers) { + $output .= $level.' VERS '.$vers."\n"; + } + + return $output; + } +} diff --git a/src/Writer/Head/Date.php b/src/Writer/Head/Date.php new file mode 100644 index 00000000..247ebc86 --- /dev/null +++ b/src/Writer/Head/Date.php @@ -0,0 +1,46 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\Head; + +class Date +{ + /** + * @param \Record\Head\Date $date + * @param string $format + * @param int $level + * + * @return string + */ + public static function convert(\Record\Head\Date &$date, $level) + { + $output = ''; + $_date = $date->getDate(); + if ($_date) { + $output .= $level.' DATE '.$_date."\n"; + } else { + return $output; + } + + // level up + $level++; + // Time + $time = $date->getTime(); + if ($time) { + $output .= $level.' TIME '.$time."\n"; + } + + return $output; + } +} diff --git a/src/Writer/Head/Gedc.php b/src/Writer/Head/Gedc.php new file mode 100644 index 00000000..4833a7d8 --- /dev/null +++ b/src/Writer/Head/Gedc.php @@ -0,0 +1,46 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\Head; + +class Gedc +{ + /** + * @param \Record\Head\Gedc $gedc + * @param string $format + * @param int $level + * + * @return string + */ + public static function convert(\Record\Head\Gedc &$gedc, $level) + { + $output = $level." GEDC \n"; + + // level up + $level++; + // VERS + $vers = $gedc->getVersion(); + if ($vers) { + $output .= $level.' VERS '.$vers."\n"; + } + + // FORM + $form = $gedc->getForm(); + if ($form) { + $output .= $level.' FORM '.$form."\n"; + } + + return $output; + } +} diff --git a/src/Writer/Head/Plac.php b/src/Writer/Head/Plac.php new file mode 100644 index 00000000..7f78c659 --- /dev/null +++ b/src/Writer/Head/Plac.php @@ -0,0 +1,40 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\Head; + +class Plac +{ + /** + * @param \Record\Head\Plac $plac + * @param string $format + * @param int $level + * + * @return string + */ + public static function convert(\Record\Head\Plac &$plac, $level) + { + $output = $level." PLAC \n"; + + // level up + $level++; + // FORM + $form = $plac->getForm(); + if ($form) { + $output .= $level.' FORM '.$form."\n"; + } + + return $output; + } +} diff --git a/src/Writer/Head/Sour.php b/src/Writer/Head/Sour.php new file mode 100644 index 00000000..92c98485 --- /dev/null +++ b/src/Writer/Head/Sour.php @@ -0,0 +1,67 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\Head; + +class Sour +{ + /** + * @param \Record\Head\Sour $sour + * @param string $format + * @param int $level + * + * @return string + */ + public static function convert(\Record\Head\Sour &$sour, $level) + { + $output = ''; + $_sour = $sour->getSour(); + if ($_sour) { + $output .= $level.' SOUR '.$_sour."\n"; + } else { + return $output; + } + + // level up + $level++; + + // VERS + $vers = $sour->getVersion(); + if ($vers) { + $output .= $level.' VERS '.$vers."\n"; + } + + // NAME + $name = $sour->getName(); + if ($name) { + $output .= $level.' NAME '.$name."\n"; + } + + // CORP + $corp = $sour->getCorp(); + if ($corp) { + $_convert = \Writer\Head\Sour\Corp::convert($corp, $level); + $output .= $_convert; + } + + // DATA + $data = $sour->getData(); + if ($data) { + $_convert = \Writer\Head\Sour\Data::convert($data, $level); + $output .= $_convert; + } + + return $output; + } +} diff --git a/src/Writer/Head/Sour/Corp.php b/src/Writer/Head/Sour/Corp.php new file mode 100644 index 00000000..accaa62a --- /dev/null +++ b/src/Writer/Head/Sour/Corp.php @@ -0,0 +1,59 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\Head\Sour; + +class Corp +{ + /** + * @param \Record\Head\Sour\Corp $corp + * @param string $format + * @param int $level + * + * @return string + */ + public static function convert(\Record\Head\Sour\Corp &$corp, $level) + { + $output = ''; + $_corp = $corp->getCorp(); + if ($_corp) { + $output .= $level.' CORP '.$_corp."\n"; + } else { + return $output; + } + + // level up + $level++; + + // ADDR + $addr = $corp->getAddr(); + if ($addr) { + $_convert = \Writer\Addr::convert($addr, $level); + $output .= $_convert; + } + + // phon + $phon = $corp->getPhon(); + if ($phon && count($phon) > 0) { + foreach ($phon as $item) { + if ($item) { + $_convert = \Writer\Phon::convert($item, $level); + $output .= $_convert; + } + } + } + + return $output; + } +} diff --git a/src/Writer/Head/Sour/Data.php b/src/Writer/Head/Sour/Data.php new file mode 100644 index 00000000..9095e6d5 --- /dev/null +++ b/src/Writer/Head/Sour/Data.php @@ -0,0 +1,53 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\Head\Sour; + +class Data +{ + /** + * @param \Record\Head\Sour\Data $data + * @param string $format + * @param int $level + * + * @return string + */ + public static function convert(\Record\Head\Sour\Data &$data, $level) + { + $output = ''; + $_data = $data->getData(); + if ($_data) { + $output .= $level.' DATA '.$_data."\n"; + } else { + return $output; + } + + // level up + $level++; + + // DATE + $date = $corp->getDate(); + if ($date) { + $output .= $level.' DATE '.$date."\n"; + } + + // COPR + $corp = $corp->getCorp(); + if ($corp) { + $output .= $level.' COPR '.$corp."\n"; + } + + return $output; + } +} diff --git a/src/Writer/Indi.php b/src/Writer/Indi.php new file mode 100644 index 00000000..92a35d16 --- /dev/null +++ b/src/Writer/Indi.php @@ -0,0 +1,245 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer; + +class Indi +{ + /** + * @param \Record\Indi $indi + * @param string $format + * + * @return string + */ + public static function convert(\Record\Indi &$indi) + { + $level = 0; + + // id + $id = $indi->getId(); + $output = $level.' @'.$id."@ INDI\n"; + + // increase level after start indi + $level++; + + // name + // $name = $indi->getName(); + // if(!empty($name)){ + // $output.=$level." NAME ".$name."\n"; + // } + + // chan + $chan = $indi->getChan(); + if (!empty($chan)) { + $output .= $level.' CHAN '.$chan."\n"; + } + + // $attr + // PhpGedcom/Record/Attr extend PhpGedcom/Record/Even and there is no change. + // So used convert Even + $attr = $indi->getAllAttr(); + if (!empty($attr) && count($attr) > 0) { + foreach ($attr as $item) { + $_convert = \Writer\Indi\Even::convert($item, $level); + $output .= $_convert; + } + } + + // $even + $even = $indi->getAllEven(); + if (!empty($even) && count($even) > 0) { + foreach ($even as $item) { + $_convert = \Writer\Indi\Even::convert($item, $level); + $output .= $_convert; + } + } + + // $note + + $note = $indi->getNote(); + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { + $_convert = \Writer\NoteRef::convert($item, $level); + $output .= $_convert; + } + } + + // $obje + $obje = $indi->getObje(); + if (!empty($obje) && count($obje) > 0) { + foreach ($obje as $item) { + $_convert = \Writer\ObjeRef::convert($item, $level); + $output .= $_convert; + } + } + + // $sour + $sour = $indi->getSour(); + if (!empty($sour) && count($sour) > 0) { + foreach ($sour as $item) { + $_convert = \Writer\SourRef::convert($item, $level); + $output .= $_convert; + } + } + + // $name + $name = $indi->getName(); + if (!empty($name) && count($name) > 0) { + foreach ($name as $item) { + $_convert = \Writer\Indi\Name::convert($item, $level); + $output .= $_convert; + } + } + + // $alia + $alia = $indi->getAlia(); + if (!empty($alia) && count($alia) > 0) { + foreach ($alia as $item) { + if (!empty($item)) { + $_convert = $level.' ALIA '.$item."\n"; + $output .= $_convert; + } + } + } + + // $sex + $sex = $indi->getSex(); + if (!empty($sex)) { + $output .= $level.' SEX '.$sex."\n"; + } + + // $rin + $rin = $indi->getRin(); + if (!empty($rin)) { + $output .= $level.' RIN '.$rin."\n"; + } + + // $resn + $resn = $indi->getResn(); + if (!empty($resn)) { + $output .= $level.' RESN '.$resn."\n"; + } + + // $rfn + $rfn = $indi->getRfn(); + if (!empty($rfn)) { + $output .= $level.' RFN '.$rfn."\n"; + } + + // $afn + $afn = $indi->getAfn(); + if (!empty($afn)) { + $output .= $level.' AFN '.$afn."\n"; + } + + // Fams[] + $fams = $indi->getFams(); + if (!empty($fams) && count($fams) > 0) { + foreach ($fams as $item) { + $_convert = \Writer\Indi\Fams::convert($item, $level); + $output .= $_convert; + } + } + + // Famc[] + $famc = $indi->getFamc(); + if (!empty($famc) && count($famc) > 0) { + foreach ($famc as $item) { + $_convert = \Writer\Indi\Famc::convert($item, $level); + $output .= $_convert; + } + } + + // Asso[] + $asso = $indi->getAsso(); + if (!empty($asso) && count($asso) > 0) { + foreach ($asso as $item) { + $_convert = \Writer\Indi\Asso::convert($item, $level); + $output .= $_convert; + } + } + + // $subm + $subm = $indi->getSubm(); + if (!empty($subm) && count($subm) > 0) { + foreach ($subm as $item) { + if (!empty($item)) { + $_convert = $level.' SUBM '.$item."\n"; + $output .= $_convert; + } + } + } + + // $anci + $anci = $indi->getAnci(); + if (!empty($anci) && count($anci) > 0) { + foreach ($anci as $item) { + $_convert = $level.' ANCI '.$item."\n"; + $output .= $_convert; + } + } + + // $desi + $desi = $indi->getDesi(); + if (!empty($desi) && count($desi) > 0) { + foreach ($desi as $item) { + $_convert = $level.' DESI '.$item."\n"; + $output .= $_convert; + } + } + + // Refn[] + $refn = $indi->getRefn(); + if (!empty($refn) && count($refn) > 0) { + foreach ($refn as $item) { + $_convert = \Writer\Refn::convert($item, $level); + $output .= $_convert; + } + } + + // Bapl + // Currently Bapl is empty + // $bapl = $indi->getBapl(); + // if(!empty($bapl)){ + // $_convert = \Writer\Indi\Bapl::convert($bapl, $level); + // $output.=$_convert; + // } + + // Conl + // Currently Conl is empty + // $conl = $indi->getConl(); + // if(!empty($conl)){ + // $_convert = \Writer\Indi\Conl::convert($conl, $level); + // $output.=$_convert; + // } + + // Endl + // Currently Endl is empty + // $endl = $indi->getEndl(); + // if(!empty($endl)){ + // $_convert = \Writer\Indi\Endl::convert($endl, $level); + // $output.=$_convert; + // } + + // Slgc + // Currently Endl is empty + // $slgc = $indi->getSlgc(); + // if(!empty($slgc)){ + // $_convert = \Writer\Indi\Slgc::convert($slgc, $level); + // $output.=$_convert; + // } + + return $output; + } +} diff --git a/src/Writer/Indi/Asso.php b/src/Writer/Indi/Asso.php new file mode 100644 index 00000000..5efcf33e --- /dev/null +++ b/src/Writer/Indi/Asso.php @@ -0,0 +1,62 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\Indi; + +class Asso +{ + /** + * @param \Record\Indi\Asso $attr + * @param int $level + * + * @return string + */ + public static function convert(\Record\Indi\Asso &$asso, $level = 0) + { + $output = ''; + // _indi + $_indi = $asso->getIndi(); + if (empty($_indi)) { + return $output; + } + $output .= $level.' ASSO '.$_indi."\n"; + // level up + $level++; + + // RELA + $rela = $asso->getRela(); + if (!empty($rela)) { + $output .= $level.' RELA '.$rela."\n"; + } + // sour + $sour = $asso->getSour(); + if (!empty($sour) && count($sour) > 0) { + foreach ($sour as $item) { + $_convert = \Writer\SourRef::convert($item, $level); + $output .= $_convert; + } + } + + // note + $note = $asso->getSour(); + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { + $_convert = \Writer\NoteRef::convert($item, $level); + $output .= $_convert; + } + } + + return $output; + } +} diff --git a/src/Writer/Indi/Attr.php b/src/Writer/Indi/Attr.php new file mode 100644 index 00000000..0e718eb8 --- /dev/null +++ b/src/Writer/Indi/Attr.php @@ -0,0 +1,31 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\Indi; + +class Attr +{ + /** + * @param \Record\Indi\Attr $attr + * @param int $level + * + * @return string + */ + public static function convert(\Record\Indi\Attr &$attr, $level = 0) + { + $output = ''; + + return $output; + } +} diff --git a/src/Writer/Indi/Even.php b/src/Writer/Indi/Even.php new file mode 100644 index 00000000..162f37d3 --- /dev/null +++ b/src/Writer/Indi/Even.php @@ -0,0 +1,126 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\Indi; + +class Even +{ + /** + * @param \Record\Indi\Even $even + * @param int $level + * + * @return string + */ + public static function convert(\Record\Indi\Even &$even, $level = 0) + { + $output = ''; + + // $_attr; + $attr = $even->getAttr(); + if (!empty($attr)) { + $output .= $level.' EVEN '.$attr."\n"; + } else { + $output = $level." EVEN\n"; + } + $level++; + + // $type; + $type = $even->getType(); + if (!empty($type)) { + $output .= $level.' TYPE '.$type."\n"; + } + + // $date; + $date = $even->getDate(); + if (!empty($date)) { + $output .= $level.' DATE '.$date."\n"; + } + + // Plac + $plac = $even->getPlac(); + if (!empty($plac)) { + $_convert = \Writer\Indi\Even\Plac::convert($plac, $level); + $output .= $_convert; + } + + // $caus; + $caus = $even->getCaus(); + if (!empty($caus)) { + $output .= $level.' CAUS '.$caus."\n"; + } + + // $age; + $age = $even->getAge(); + if (!empty($age)) { + $output .= $level.' AGE '.$age."\n"; + } + + // $addr + $addr = $even->getAddr(); + if (!empty($addr)) { + $_convert = \Writer\Addr::convert($addr, $level); + $output .= $_convert; + } + + // $phon = array() + $phon = $even->getPhon(); + if (!empty($phon) && count($phon) > 0) { + foreach ($phon as $item) { + $_convert = \Writer\Phon::convert($item, $level); + $output .= $_convert; + } + } + // $agnc + $agnc = $even->getAgnc(); + if (!empty($agnc)) { + $output .= $level.' AGNC '.$agnc."\n"; + } + + // $ref = array(); + // This is not in parser + + // $obje = array(); + $obje = $even->getObje(); + if (!empty($obje) && count($obje) > 0) { + foreach ($obje as $item) { + $_convert = \Writer\ObjeRef::convert($item, $level); + $output .= $_convert; + } + } + // $sour = array(); + $sour = $even->getSour(); + if (!empty($sour) && count($sour) > 0) { + foreach ($sour as $item) { + $_convert = \Writer\SourRef::convert($item, $level); + $output .= $_convert; + } + } + // $note = array(); + $note = $even->getSour(); + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { + $_convert = \Writer\NoteRef::convert($item, $level); + $output .= $_convert; + } + } + // Record\Chan + $chan = $even->getChan(); + if (!empty($chan)) { + $_convert = \Writer\Chan::convert($item, $level); + $output .= $_convert; + } + + return $output; + } +} diff --git a/src/Writer/Indi/Even/Plac.php b/src/Writer/Indi/Even/Plac.php new file mode 100644 index 00000000..fc6601af --- /dev/null +++ b/src/Writer/Indi/Even/Plac.php @@ -0,0 +1,65 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\Indi\Even; + +class Plac +{ + /** + * @param \Record\Indi\Even\Plac $plac + * @param int $level + * + * @return string + */ + public static function convert(\Record\Indi\Even\Plac &$plac, $level = 0) + { + $output = ''; + + // $plac + $_plac = $plac->getPlac(); + if (!empty($_plac)) { + $output .= $level.' PLAC '.$_plac."\n"; + } else { + $output .= $level." PLAC\n"; + } + + // level up + $level++; + + // $form + $form = $plac->getForm(); + if (!empty($form)) { + $output .= $level.' FORM '.$form."\n"; + } + + // $note -array + $note = $plac->getNote(); + if ($note && count($note) > 0) { + foreach ($note as $item) { + $_convert = \Writer\NoteRef::convert($item, $level); + $output .= $_convert; + } + } + // $sour -array + $sour = $plac->getSour(); + if ($sour && count($sour) > 0) { + foreach ($sour as $item) { + $_convert = \Writer\SourRef::convert($item, $level); + $output .= $_convert; + } + } + + return $output; + } +} diff --git a/src/Writer/Indi/Famc.php b/src/Writer/Indi/Famc.php new file mode 100644 index 00000000..61bea234 --- /dev/null +++ b/src/Writer/Indi/Famc.php @@ -0,0 +1,54 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\Indi; + +class Famc +{ + /** + * @param \Record\Indi\Famc $attr + * @param int $level + * + * @return string + */ + public static function convert(\Record\Indi\Famc &$famc, $level = 0) + { + $output = ''; + // NAME + $_famc = $famc->getFams(); + if (empty($_fams)) { + return $output; + } + $output .= $level.' FAMC @'.$_famc."@\n"; + // level up + $level++; + + // PEDI + $pedi = $famc->getPedi(); + if (!empty($pedi)) { + $output .= $level.' PEDI '.$pedi."\n"; + } + + // note + $note = $famc->getSour(); + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { + $_convert = \Writer\NoteRef::convert($item, $level); + $output .= $_convert; + } + } + + return $output; + } +} diff --git a/src/Writer/Indi/Fams.php b/src/Writer/Indi/Fams.php new file mode 100644 index 00000000..e6654ad3 --- /dev/null +++ b/src/Writer/Indi/Fams.php @@ -0,0 +1,48 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\Indi; + +class Fams +{ + /** + * @param \Record\Indi\Fams $attr + * @param int $level + * + * @return string + */ + public static function convert(\Record\Indi\Fams &$fams, $level = 0) + { + $output = ''; + // NAME + $_fams = $fams->getFams(); + if (empty($_fams)) { + return $output; + } + $output .= $level.' FAMS @'.$_fams."@\n"; + // level up + $level++; + + // note + $note = $fams->getNote(); + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { + $_convert = \Writer\NoteRef::convert($item, $level); + $output .= $_convert; + } + } + + return $output; + } +} diff --git a/src/Writer/Indi/Name.php b/src/Writer/Indi/Name.php new file mode 100644 index 00000000..502a1f37 --- /dev/null +++ b/src/Writer/Indi/Name.php @@ -0,0 +1,87 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\Indi; + +class Name +{ + /** + * @param \Record\Indi\Name $attr + * @param int $level + * + * @return string + */ + public static function convert(\Record\Indi\Name &$name, $level = 0) + { + $output = ''; + // NAME + $_name = $name->getName(); + if (empty($_name)) { + return $output; + } + $output .= $level.' NAME '.$_name."\n"; + // level up + $level++; + + // NPFX + $npfx = $name->getNpfx(); + if (!empty($npfx)) { + $output .= $level.' NPFX '.$npfx."\n"; + } + + // GIVN + $givn = $name->getGivn(); + if (!empty($givn)) { + $output .= $level.' GIVN '.$givn."\n"; + } + // NICK + $nick = $name->getNick(); + if (!empty($nick)) { + $output .= $level.' NICK '.$nick."\n"; + } + // SPFX + $spfx = $name->getSpfx(); + if (!empty($spfx)) { + $output .= $level.' SPFX '.$spfx."\n"; + } + // SURN + $surn = $name->getSurn(); + if (!empty($surn)) { + $output .= $level.' SURN '.$surn."\n"; + } + // NSFX + $nsfx = $name->getNsfx(); + if (!empty($nsfx)) { + $output .= $level.' NSFX '.$nsfx."\n"; + } + // SOUR + $sour = $name->getSour(); + if (!empty($sour) && count($sour) > 0) { + foreach ($sour as $item) { + $_convert = \Writer\SourRef::convert($item, $level); + $output .= $_convert; + } + } + // note + $note = $name->getSour(); + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { + $_convert = \Writer\NoteRef::convert($item, $level); + $output .= $_convert; + } + } + + return $output; + } +} diff --git a/src/Writer/Note.php b/src/Writer/Note.php new file mode 100644 index 00000000..fb0d5673 --- /dev/null +++ b/src/Writer/Note.php @@ -0,0 +1,80 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer; + +class Note +{ + /** + * @param \Record\Note $sour + * @param int $level + * + * @return string + */ + public static function convert(\Record\Note &$note) + { + $level = 0; + $output = ''; + $id = $note->getId(); + if (!empty($id)) { + $output .= $level.' '.$id.' '." NOTE \n"; + } else { + return $output; + } + + // Level Up + $level++; + // RIN + $rin = $note->getRin(); + if ($rin) { + $output .= $level.' RIN '.$rin."\n"; + } + + // cont + $cont = $note->getNote(); + if ($cont) { + $output .= $level.' CONT '.$cont."\n"; + } + + // REFN + $refn = $note->getRefn(); + if (!empty($refn) && count($refn) > 0) { + foreach ($refn as $item) { + if ($item) { + $_convert = \Writer\Refn::convert($item, $level); + $output .= $_convert; + } + } + } + // CHAN + $chan = $note->getChan(); + if ($chan) { + $_convert = \Writer\Chan::convert($chan, $level); + $output .= $_convert; + } + + // SOUR array + $sour = $note->getSour(); + if (!empty($sour) && count($sour) > 0) { + foreach ($sour as $item) { + if ($item) { + $_convert = \Writer\SourRef::convert($item, $level); + $output .= $_convert; + } + } + } + + return $output; + } +} diff --git a/src/Writer/NoteRef.php b/src/Writer/NoteRef.php new file mode 100644 index 00000000..46c9f877 --- /dev/null +++ b/src/Writer/NoteRef.php @@ -0,0 +1,47 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer; + +class NoteRef +{ + /** + * @param \Record\NoteRef $note + * @param int $level + * + * @return string + */ + public static function convert(\Record\NoteRef &$note, $level) + { + $output = ''; + + // $_note + $_note = $note->getNote(); + if (!empty($_note)) { + $output .= $level.' NOTE '.$_note."\n"; + } + + $level++; + // $sour + $sour = $note->getSour(); + if ($sour && count($sour) > 0) { + foreach ($sour as $item) { + $_convert = \Writer\SourRef::convert($item, $level); + $output .= $_convert; + } + } + + return $output; + } +} diff --git a/src/Writer/Obje.php b/src/Writer/Obje.php new file mode 100644 index 00000000..acbd13b8 --- /dev/null +++ b/src/Writer/Obje.php @@ -0,0 +1,104 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer; + +class Obje +{ + /** + * @param \Record\Obje $sour + * @param int $level + * + * @return string + */ + public static function convert(\Record\Obje &$obje) + { + $level = 0; + $output = ''; + $id = $obje->getId(); + if ($id) { + $output .= $level.' '.$id." OBJE\n"; + } else { + return $output; + } + + // level up + $level++; + + // FORM + $form = $obje->getName(); + if ($form) { + $output .= $level.' FORM '.$form."\n"; + } + + // TITL + $titl = $obje->getTitl(); + if ($titl) { + $output .= $level.' TITL '.$titl."\n"; + } + + // OBJE + // This is same as FORM + + // RIN + $rin = $obje->getRin(); + if ($rin) { + $output .= $level.' RIN '.$rin."\n"; + } + + // REFN + $refn = $obje->getRefn(); + if (!empty($refn) && count($refn) > 0) { + foreach ($refn as $item) { + if ($item) { + $_convert = \Writer\Refn::convert($item, $level); + $output .= $_convert; + } + } + } + + // BLOB + $blob = $obje->getBlob(); + if ($blob) { + $output .= $level.' BLOB '.$blob."\n"; + } + + // NOTE + $note = $obje->getNote(); + if ($note && count($note) > 0) { + foreach ($note as $item) { + if ($item) { + $_convert = \Writer\NoteRef::convert($item, $level); + $output .= $_convert; + } + } + } + + // CHAN + $chan = $obje->getChan(); + if ($chan) { + $_convert = \Writer\Chan::convert($chan, $level); + $output .= $_convert; + } + + // FILE + $file = $obje->getFile(); + if ($file) { + $output .= $level.' FILE '.$file."\n"; + } + + // + return $output; + } +} diff --git a/src/Writer/ObjeRef.php b/src/Writer/ObjeRef.php new file mode 100644 index 00000000..cf1d842e --- /dev/null +++ b/src/Writer/ObjeRef.php @@ -0,0 +1,67 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer; + +class ObjeRef +{ + /** + * @param \Record\ObjeRef $note + * @param int $level + * + * @return string + */ + public static function convert(\Record\ObjeRef &$obje, $level) + { + $output = ''; + + // $_note + $_obje = $obje->getObje(); + if (!empty($_note)) { + $output .= $level.' OBJE '.$_obje."\n"; + } else { + $output .= $level." OBJE \n"; + } + + $level++; + // _form + $_form = $obje->getForm(); + if (!empty($_form)) { + $output .= $level.' FORM '.$_form."\n"; + } + + // _titl + $_titl = $obje->getTitl(); + if (!empty($_titl)) { + $output .= $level.' TITL '.$_titl."\n"; + } + + // _file + $_file = $obje->getFile(); + if (!empty($_file)) { + $output .= $level.' FILE '.$_file."\n"; + } + + // $_note = array() + $_note = $obje->getNote(); + if (!empty($_note) && count($_note) > 0) { + foreach ($_note as $item) { + $_convert = \Writer\NoteRef::convert($item, $level); + $output .= $_convert; + } + } + + return $output; + } +} diff --git a/src/Writer/Phon.php b/src/Writer/Phon.php new file mode 100644 index 00000000..86cc7c91 --- /dev/null +++ b/src/Writer/Phon.php @@ -0,0 +1,32 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer; + +class Phon +{ + /** + * @param string $phon + * @param string $format + * @param int $level + * + * @return string + */ + public static function convert($phon, $level = 1) + { + $output = "{$level} PHON ".$phon."\n"; + + return $output; + } +} diff --git a/src/Writer/Refn.php b/src/Writer/Refn.php new file mode 100644 index 00000000..59762838 --- /dev/null +++ b/src/Writer/Refn.php @@ -0,0 +1,44 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer; + +class Refn +{ + /** + * @param \Record\Refn $note + * @param int $level + * + * @return string + */ + public static function convert(\Record\Refn &$refn, $level) + { + $output = ''; + $_refn = $refn->getRefn(); + if (empty($_refn)) { + return $output; + } else { + $output .= $level.' REFN '.$_refn."\n"; + } + // level up + $level++; + // DATE + $type = $refn->getType(); + if (!empty($type)) { + $output .= $level.' TYPE '.$type."\n"; + } + + return $output; + } +} diff --git a/src/Writer/Repo.php b/src/Writer/Repo.php new file mode 100644 index 00000000..da671736 --- /dev/null +++ b/src/Writer/Repo.php @@ -0,0 +1,96 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer; + +class Repo +{ + /** + * @param \Record\Repo $sour + * @param int $level + * + * @return string + */ + public static function convert(\Record\Repo &$repo) + { + $level = 0; + $output = ''; + $_repo = $repo->getRepo(); + if ($_repo) { + $output .= $level.' '.$_repo." REPO\n"; + } else { + return $output; + } + + // level up + $level++; + + //NAME + $name = $repo->getName(); + if ($name) { + $output .= $level.' NAME '.$name."\n"; + } + + // ADDR + $addr = $repo->getAddr(); + if ($addr) { + $_convert = \Writer\Addr::convert($addr, $level); + $output .= $_convert; + } + + // PHON + $phon = $repo->getPhon(); + if ($phon) { + $_convert = \Writer\Phon::convert($phon, $level); + $output .= $_convert; + } + + // NOTE array + $note = $repo->getNote(); + if ($note && count($note) > 0) { + foreach ($note as $item) { + if ($item) { + $_convert = \Writer\NoteRef::convert($item, $level); + $output .= $_convert; + } + } + } + + // REFN + $refn = $repo->getRefn(); + if (!empty($refn) && count($refn) > 0) { + foreach ($refn as $item) { + if ($item) { + $_convert = \Writer\Refn::convert($item, $level); + $output .= $_convert; + } + } + } + + // CHAN + $chan = $repo->getChan(); + if ($chan) { + $_convert = \Writer\Chan::convert($chan, $level); + $output .= $_convert; + } + + // RIN + $rin = $repo->getRin(); + if ($rin) { + $output .= $level.' RIN '.$rin."\n"; + } + + return $output; + } +} diff --git a/src/Writer/RepoRef.php b/src/Writer/RepoRef.php new file mode 100644 index 00000000..2f919c5c --- /dev/null +++ b/src/Writer/RepoRef.php @@ -0,0 +1,57 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer; + +class RepoRef +{ + /** + * @param \Record\RepoRef $reporef + * @param int $level + * + * @return string + */ + public static function convert(\Record\RepoRef &$reporef, $level) + { + $output = ''; + $_repo = $reporef->getRepo(); + if (empty($_sour)) { + return $output; + } else { + $output .= $level.' REPO '.$_repo."\n"; + } + // level up + $level++; + + // Note array + $note = $reporef->getNote(); + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { + $_convert = \Writer\NoteRef::convert($item, $level); + $output .= $_convert; + } + } + + // _caln array + $_caln = $reporef->getCaln(); + if (!empty($_caln) && count($_caln) > 0) { + foreach ($_caln as $item) { + $_convert = \Writer\Caln::convert($item, $level); + $output .= $_convert; + } + } + + return $output; + } +} diff --git a/src/Writer/Sour.php b/src/Writer/Sour.php new file mode 100644 index 00000000..dc9b4448 --- /dev/null +++ b/src/Writer/Sour.php @@ -0,0 +1,123 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer; + +class Sour +{ + /** + * @param \Record\Sour $sour + * @param int $level + * + * @return string + */ + public static function convert(\Record\Sour &$sour, $level) + { + $output = ''; + $_sour = $sour->getSour(); + if (empty($_sour)) { + return $output; + } else { + $output .= $level.' '.$_sour.' SOUR '."\n"; + } + // level up + $level++; + + // TITL + $titl = $sour->getType(); + if (!empty($type)) { + $output .= $level.' TITL '.$titl."\n"; + } + + // RIN + $rin = $sour->getRin(); + if (!empty($rin)) { + $output .= $level.' RIN '.$rin."\n"; + } + + // AUTH + $auth = $sour->getAuth(); + if (!empty($auth)) { + $output .= $level.' AUTH '.$auth."\n"; + } + + // TEXT + $text = $sour->getText(); + if (!empty($text)) { + $output .= $level.' TEXT '.$text."\n"; + } + + // PUBL + $publ = $sour->getPubl(); + if (!empty($publ)) { + $output .= $level.' PUBL '.$publ."\n"; + } + + // ABBR + $abbr = $sour->getAbbr(); + if (!empty($abbr)) { + $output .= $level.' ABBR '.$abbr."\n"; + } + + // REPO + $repo = $sour->getRepo(); + if (!empty($repo)) { + $_convert = \Writer\RepoRef::convert($repo, $level); + $output .= $_convert; + } + + // NOTE array + $note = $sour->getNote(); + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { + $_convert = \Writer\NoteRef::convert($item, $level); + $output .= $_convert; + } + } + + // DATA + $data = $sour->getData(); + if (!empty($data)) { + $_convert = \Writer\Sour\Data::convert($data, $level); + $output .= $_convert; + } + + // OBJE array + $obje = $sour->getObje(); + if (!empty($obje) && count($obje) > 0) { + foreach ($obje as $item) { + $_convert = \Writer\ObjeRef::convert($item, $level); + $output .= $_convert; + } + } + + // REFN array + $refn = $sour->getRefn(); + if (!empty($refn) && count($refn) > 0) { + foreach ($refn as $item) { + $_convert = \Writer\Refn::convert($item, $level); + $output .= $_convert; + } + } + + // chan + $chan = $sour->getChan(); + if (!empty($chan)) { + $_convert = \Writer\Chan::convert($chan, $level); + $output .= $_convert; + } + + return $output; + } +} diff --git a/src/Writer/Sour/Data.php b/src/Writer/Sour/Data.php new file mode 100644 index 00000000..1e168e20 --- /dev/null +++ b/src/Writer/Sour/Data.php @@ -0,0 +1,70 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\Sour; + +class Data +{ + /** + * @param \Record\Sour\Data $data + * @param int $level + * + * @return string + */ + public static function convert(\Record\Sour\Data &$data, $level = 0) + { + $output = ''; + + $output = $level." DATA\n"; + $level++; + + // $_date; + $date = $data->getDate(); + if (!empty($date)) { + $output .= $level.' DATE '.$date."\n"; + } + + // $_agnc AGNC + $_agnc = $data->getAgnc(); + if (!empty($_agnc)) { + $output .= $level.' AGNC '.$_agnc."\n"; + } + + // $_text + $_text = $data->getText(); + if (!empty($_text)) { + $output .= $level.' TEXT '.$_text."\n"; + } + + // $_note + $note = $data->getNote(); + if ($note && count($note) > 0) { + foreach ($note as $item) { + $_convert = \Writer\NoteRef::convert($item, $level); + $output .= $_convert; + } + } + + // $_even + $_even = $data->getEven(); + if ($_even && count($_even) > 0) { + foreach ($_even as $item) { + $_convert = \Writer\Sour\Data\Even::convert($item, $level); + $output .= $_convert; + } + } + + return $output; + } +} diff --git a/src/Writer/Sour/Data/Even.php b/src/Writer/Sour/Data/Even.php new file mode 100644 index 00000000..30289ab4 --- /dev/null +++ b/src/Writer/Sour/Data/Even.php @@ -0,0 +1,46 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\Sour\Data; + +class Even +{ + /** + * @param \Record\Sour\Data\Even $even + * @param int $level + * + * @return string + */ + public static function convert(\Record\Sour\Data\Even &$even, $level) + { + $output = ''; + + $output = $level." EVEN\n"; + $level++; + + // $date; + $date = $even->getDate(); + if (!empty($date)) { + $output .= $level.' DATE '.$date."\n"; + } + + // Plac + $plac = $even->getPlac(); + if (!empty($plac)) { + $output .= $level.' PLAC '.$plac."\n"; + } + + return $output; + } +} diff --git a/src/Writer/SourRef.php b/src/Writer/SourRef.php new file mode 100644 index 00000000..9043d030 --- /dev/null +++ b/src/Writer/SourRef.php @@ -0,0 +1,72 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer; + +class SourRef +{ + /** + * @param \Record\SourRef $sour + * @param int $level + * + * @return string + */ + public static function convert(\Record\SourRef &$sour, $level) + { + $output = ''; + $_sour = $sour->getSour(); + if (!empty($_sour)) { + $output .= $level.' SOUR '.$_sour."\n"; + } + $level++; + // protected $_text = null; + $_text = $sour->getText(); + if (!empty($_text)) { + $output .= $level.' TEXT '.$_text."\n"; + } + // protected $_note = array(); + $note = $sour->getNote(); + if ($note && count($note) > 0) { + foreach ($note as $item) { + $_convert = \Writer\NoteRef::convert($item, $level); + $output .= $_convert; + } + } + // protected $_data = null; + $_data = $sour->getData(); + if ($_data) { + $_convert = \Writer\Sour\Data::convert($_data, $level); + $output .= $_convert; + } + // protected $_page setPage + $_page = $sour->getPage(); + if (!empty($_page)) { + $output .= $level.' PAGE '.$_page."\n"; + } + // protected $_even = null; + $_even = $sour->getData(); + if ($_even) { + $_convert = \Writer\SourRef\Even::convert($_even, $level); + $output .= $_convert; + } + // protected $_quay + $_quay = $sour->getQuay(); + if (!empty($_quay)) { + $output .= $level.' QUAY '.$_quay."\n"; + } + // protected $_obje = array(); + // This is not defined in parser. + return $output; + } +} diff --git a/src/Writer/SourRef/Even.php b/src/Writer/SourRef/Even.php new file mode 100644 index 00000000..22c3d4d2 --- /dev/null +++ b/src/Writer/SourRef/Even.php @@ -0,0 +1,47 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer\SourRef; + +class Even +{ + /** + * @param \Record\SourRef\Even $even + * @param int $level + * + * @return string + */ + public static function convert(\Record\SourRef\Even &$even, $level = 0) + { + $output = ''; + + // $_date; + $_even = $even->getEven(); + if (!empty($_even)) { + $output .= $level.' EVEN '.$_even."\n"; + } else { + $output = $level." EVEN\n"; + } + // level up + $level++; + + // $_role ROLE + $_role = $data->getRole(); + if (!empty($_role)) { + $output .= $level.' ROLE '.$_role."\n"; + } + + return $output; + } +} diff --git a/src/Writer/Subm.php b/src/Writer/Subm.php new file mode 100644 index 00000000..a7ee4bd8 --- /dev/null +++ b/src/Writer/Subm.php @@ -0,0 +1,111 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer; + +class Subm +{ + /** + * @param \Record\Subm $note + * @param int $level + * + * @return string + */ + public static function convert(\Record\Subm &$subm) + { + $level = 0; + $output = ''; + $_subm = $subm->getSubn(); + if (empty($_subm)) { + return $output; + } else { + $output .= $level.' '.$_subm.' SUBM '."\n"; + } + // level up + $level++; + + // NAME + $name = $subm->getName(); + if (!empty($name)) { + $output .= $level.' NAME '.$name."\n"; + } + // $chan + $chan = $subm->getChan(); + if ($chan) { + $_convert = \Writer\Chan::convert($chan, $level); + $output .= $_convert; + } + + // $addr + $addr = $subm->getAddr(); + if ($addr) { + $_convert = \Writer\Addr::convert($addr, $level); + $output .= $_convert; + } + + // $rin + $rin = $subm->getRin(); + if (!empty($rin)) { + $output .= $level.' RIN '.$rin."\n"; + } + + // $rfn + $rfn = $subm->getRfn(); + if (!empty($rfn)) { + $output .= $level.' RFN '.$rfn."\n"; + } + + // $lang = array() + $langs = $subm->getLang(); + if (!empty($langs) && count($langs) > 0) { + foreach ($langs as $item) { + if ($item) { + $_convert = $level.' LANG '.$item."\n"; + $output .= $_convert; + } + } + } + + // $phon = array() + $phon = $subm->getLang(); + if (!empty($phon) && count($phon) > 0) { + foreach ($phon as $item) { + if ($item) { + $_convert = \Writer\Phon::convert($item, $level); + $output .= $_convert; + } + } + } + + // $obje = array() + $obje = $subm->getObje(); + if (!empty($obje) && count($obje) > 0) { + foreach ($obje as $item) { + $_convert = \Writer\ObjeRef::convert($item, $level); + $output .= $_convert; + } + } + + // note + $note = $subm->getNote(); + if (!empty($note) && count($note) > 0) { + foreach ($note as $item) { + $_convert = \Writer\NoteRef::convert($item, $level); + $output .= $_convert; + } + } + + return $output; + } +} diff --git a/src/Writer/Subn.php b/src/Writer/Subn.php new file mode 100644 index 00000000..8f656e32 --- /dev/null +++ b/src/Writer/Subn.php @@ -0,0 +1,81 @@ + + * @copyright Copyright (c) 2010-2013, Xiang Ming + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Writer; + +class Subn +{ + /** + * @param \Record\Subn $note + * @param int $level + * + * @return string + */ + public static function convert(\Record\Subn &$subn) + { + $level = 0; + $output = ''; + $_subn = $subn->getSubn(); + if (empty($_subn)) { + return $output; + } else { + $output .= $level.' '.$_subn." SUBN \n"; + } + // level up + $level++; + + // SUBM + $subm = $subn->getSubm(); + if (!empty($subm)) { + $output .= $level.' SUBM '.$subm."\n"; + } + + // FAMF + $famf = $subn->getFamf(); + if (!empty($famf)) { + $output .= $level.' FAMF '.$famf."\n"; + } + + // TEMP + $temp = $subn->getTemp(); + if (!empty($temp)) { + $output .= $level.' TEMP '.$temp."\n"; + } + + // ANCE + $ance = $subn->getAnce(); + if (!empty($ance)) { + $output .= $level.' ANCE '.$ance."\n"; + } + + // DESC + $desc = $subn->getDesc(); + if (!empty($desc)) { + $output .= $level.' DESC '.$desc."\n"; + } + // ORDI + $ordi = $subn->getOrdi(); + if (!empty($ordi)) { + $output .= $level.' ORDI '.$ordi."\n"; + } + + // RIN + $rin = $subn->getRin(); + if (!empty($rin)) { + $output .= $level.' RIN '.$rin."\n"; + } + + return $output; + } +} From c37436ce118aa3e56375f276ddd52d98627861fb Mon Sep 17 00:00:00 2001 From: xeanu Date: Thu, 15 Jul 2021 20:16:22 +0700 Subject: [PATCH 62/99] update --- library/PhpGedcom/Gedcom.php | 274 ------- library/PhpGedcom/Parser.php | 275 ------- library/PhpGedcom/Parser/Addr.php | 58 -- library/PhpGedcom/Parser/Caln.php | 57 -- library/PhpGedcom/Parser/Chan.php | 60 -- library/PhpGedcom/Parser/Component.php | 22 - library/PhpGedcom/Parser/Date.php | 36 - library/PhpGedcom/Parser/Fam.php | 136 ---- library/PhpGedcom/Parser/Fam/Anul.php | 19 - library/PhpGedcom/Parser/Fam/Cens.php | 19 - library/PhpGedcom/Parser/Fam/Div.php | 19 - library/PhpGedcom/Parser/Fam/Divf.php | 19 - library/PhpGedcom/Parser/Fam/Enga.php | 19 - library/PhpGedcom/Parser/Fam/Even.php | 103 --- library/PhpGedcom/Parser/Fam/Even/Husb.php | 51 -- library/PhpGedcom/Parser/Fam/Even/Wife.php | 51 -- library/PhpGedcom/Parser/Fam/Marb.php | 19 - library/PhpGedcom/Parser/Fam/Marc.php | 19 - library/PhpGedcom/Parser/Fam/Marl.php | 19 - library/PhpGedcom/Parser/Fam/Marr.php | 19 - library/PhpGedcom/Parser/Fam/Mars.php | 19 - library/PhpGedcom/Parser/Fam/Slgs.php | 71 -- library/PhpGedcom/Parser/Fam/Slgs/Stat.php | 59 -- library/PhpGedcom/Parser/Head.php | 106 --- library/PhpGedcom/Parser/Head/Char.php | 57 -- library/PhpGedcom/Parser/Head/Date.php | 57 -- library/PhpGedcom/Parser/Head/Gedc.php | 54 -- library/PhpGedcom/Parser/Head/Plac.php | 51 -- library/PhpGedcom/Parser/Head/Sour.php | 68 -- library/PhpGedcom/Parser/Head/Sour/Corp.php | 60 -- library/PhpGedcom/Parser/Head/Sour/Data.php | 60 -- library/PhpGedcom/Parser/Indi.php | 188 ----- library/PhpGedcom/Parser/Indi/Adop.php | 34 - library/PhpGedcom/Parser/Indi/Asso.php | 67 -- library/PhpGedcom/Parser/Indi/Attr.php | 100 --- library/PhpGedcom/Parser/Indi/Bapl.php | 19 - library/PhpGedcom/Parser/Indi/Bapm.php | 19 - library/PhpGedcom/Parser/Indi/Barm.php | 19 - library/PhpGedcom/Parser/Indi/Basm.php | 19 - library/PhpGedcom/Parser/Indi/Birt.php | 26 - library/PhpGedcom/Parser/Indi/Bles.php | 19 - library/PhpGedcom/Parser/Indi/Buri.php | 19 - library/PhpGedcom/Parser/Indi/Cast.php | 19 - library/PhpGedcom/Parser/Indi/Cens.php | 19 - library/PhpGedcom/Parser/Indi/Chr.php | 26 - library/PhpGedcom/Parser/Indi/Chra.php | 19 - library/PhpGedcom/Parser/Indi/Conf.php | 19 - library/PhpGedcom/Parser/Indi/Conl.php | 19 - library/PhpGedcom/Parser/Indi/Crem.php | 19 - library/PhpGedcom/Parser/Indi/Deat.php | 19 - library/PhpGedcom/Parser/Indi/Dscr.php | 19 - library/PhpGedcom/Parser/Indi/Educ.php | 19 - library/PhpGedcom/Parser/Indi/Emig.php | 19 - library/PhpGedcom/Parser/Indi/Endl.php | 19 - library/PhpGedcom/Parser/Indi/Even.php | 125 --- library/PhpGedcom/Parser/Indi/Even/Plac.php | 65 -- library/PhpGedcom/Parser/Indi/Famc.php | 67 -- library/PhpGedcom/Parser/Indi/Fams.php | 64 -- library/PhpGedcom/Parser/Indi/Fcom.php | 19 - library/PhpGedcom/Parser/Indi/Grad.php | 19 - library/PhpGedcom/Parser/Indi/Idno.php | 19 - library/PhpGedcom/Parser/Indi/Immi.php | 19 - library/PhpGedcom/Parser/Indi/Lds.php | 83 -- library/PhpGedcom/Parser/Indi/Name.php | 95 --- library/PhpGedcom/Parser/Indi/Name/Fone.php | 77 -- library/PhpGedcom/Parser/Indi/Name/Romn.php | 79 -- library/PhpGedcom/Parser/Indi/Nati.php | 19 - library/PhpGedcom/Parser/Indi/Natu.php | 19 - library/PhpGedcom/Parser/Indi/Nchi.php | 19 - library/PhpGedcom/Parser/Indi/Nmr.php | 19 - library/PhpGedcom/Parser/Indi/Occu.php | 19 - library/PhpGedcom/Parser/Indi/Ordn.php | 19 - library/PhpGedcom/Parser/Indi/Prob.php | 19 - library/PhpGedcom/Parser/Indi/Prop.php | 19 - library/PhpGedcom/Parser/Indi/Reli.php | 19 - library/PhpGedcom/Parser/Indi/Resi.php | 19 - library/PhpGedcom/Parser/Indi/Reti.php | 19 - library/PhpGedcom/Parser/Indi/Slgc.php | 24 - library/PhpGedcom/Parser/Indi/Ssn.php | 19 - library/PhpGedcom/Parser/Indi/Titl.php | 19 - library/PhpGedcom/Parser/Indi/Will.php | 19 - library/PhpGedcom/Parser/Note.php | 87 -- library/PhpGedcom/Parser/NoteRef.php | 68 -- library/PhpGedcom/Parser/Obje.php | 85 -- library/PhpGedcom/Parser/ObjeRef.php | 61 -- library/PhpGedcom/Parser/ObjeRef/File.php | 56 -- .../PhpGedcom/Parser/ObjeRef/File/Form.php | 59 -- library/PhpGedcom/Parser/Phon.php | 54 -- library/PhpGedcom/Parser/Plac.php | 76 -- library/PhpGedcom/Parser/Plac/Fone.php | 59 -- library/PhpGedcom/Parser/Plac/Map.php | 54 -- library/PhpGedcom/Parser/Plac/Romn.php | 59 -- library/PhpGedcom/Parser/Refn.php | 57 -- library/PhpGedcom/Parser/Repo.php | 93 --- library/PhpGedcom/Parser/RepoRef.php | 65 -- library/PhpGedcom/Parser/Sour.php | 100 --- library/PhpGedcom/Parser/Sour/Data.php | 66 -- library/PhpGedcom/Parser/Sour/Data/Even.php | 54 -- library/PhpGedcom/Parser/Sour/Repo.php | 57 -- library/PhpGedcom/Parser/Sour/Repo/Caln.php | 56 -- library/PhpGedcom/Parser/SourRef.php | 82 -- library/PhpGedcom/Parser/SourRef/Data.php | 53 -- library/PhpGedcom/Parser/SourRef/Even.php | 57 -- library/PhpGedcom/Parser/Subm.php | 104 --- library/PhpGedcom/Parser/Subn.php | 89 --- library/PhpGedcom/Record.php | 107 --- library/PhpGedcom/Record/Addr.php | 198 ----- library/PhpGedcom/Record/Caln.php | 73 -- library/PhpGedcom/Record/Chan.php | 98 --- library/PhpGedcom/Record/Data.php | 73 -- library/PhpGedcom/Record/Date.php | 133 ---- library/PhpGedcom/Record/Fam.php | 96 --- library/PhpGedcom/Record/Fam/Anul.php | 19 - library/PhpGedcom/Record/Fam/Cens.php | 19 - library/PhpGedcom/Record/Fam/Div.php | 19 - library/PhpGedcom/Record/Fam/Enga.php | 19 - library/PhpGedcom/Record/Fam/Even.php | 70 -- library/PhpGedcom/Record/Fam/Even/Husb.php | 20 - library/PhpGedcom/Record/Fam/Even/Wife.php | 20 - library/PhpGedcom/Record/Fam/Marb.php | 19 - library/PhpGedcom/Record/Fam/Marc.php | 19 - library/PhpGedcom/Record/Fam/Marl.php | 19 - library/PhpGedcom/Record/Fam/Marr.php | 19 - library/PhpGedcom/Record/Fam/Mars.php | 19 - library/PhpGedcom/Record/Fam/Slgs.php | 40 - library/PhpGedcom/Record/Fam/Slgs/Stat.php | 29 - library/PhpGedcom/Record/Head.php | 323 -------- library/PhpGedcom/Record/Head/Char.php | 21 - library/PhpGedcom/Record/Head/Date.php | 21 - library/PhpGedcom/Record/Head/Gedc.php | 54 -- library/PhpGedcom/Record/Head/Plac.php | 20 - library/PhpGedcom/Record/Head/Sour.php | 92 --- library/PhpGedcom/Record/Head/Sour/Corp.php | 28 - library/PhpGedcom/Record/Head/Sour/Data.php | 22 - library/PhpGedcom/Record/Indi.php | 740 ------------------ library/PhpGedcom/Record/Indi/Adop.php | 21 - library/PhpGedcom/Record/Indi/Asso.php | 38 - library/PhpGedcom/Record/Indi/Attr.php | 46 -- library/PhpGedcom/Record/Indi/Bapl.php | 19 - library/PhpGedcom/Record/Indi/Bapm.php | 19 - library/PhpGedcom/Record/Indi/Barm.php | 19 - library/PhpGedcom/Record/Indi/Basm.php | 19 - library/PhpGedcom/Record/Indi/Birt.php | 46 -- library/PhpGedcom/Record/Indi/Bles.php | 19 - library/PhpGedcom/Record/Indi/Buri.php | 19 - library/PhpGedcom/Record/Indi/Cast.php | 19 - library/PhpGedcom/Record/Indi/Cens.php | 19 - library/PhpGedcom/Record/Indi/Chr.php | 20 - library/PhpGedcom/Record/Indi/Chra.php | 19 - library/PhpGedcom/Record/Indi/Conf.php | 19 - library/PhpGedcom/Record/Indi/Conl.php | 19 - library/PhpGedcom/Record/Indi/Crem.php | 19 - library/PhpGedcom/Record/Indi/Deat.php | 19 - library/PhpGedcom/Record/Indi/Dscr.php | 19 - library/PhpGedcom/Record/Indi/Educ.php | 19 - library/PhpGedcom/Record/Indi/Emig.php | 19 - library/PhpGedcom/Record/Indi/Endl.php | 19 - library/PhpGedcom/Record/Indi/Even.php | 353 --------- library/PhpGedcom/Record/Indi/Even/Plac.php | 123 --- library/PhpGedcom/Record/Indi/Famc.php | 30 - library/PhpGedcom/Record/Indi/Fams.php | 29 - library/PhpGedcom/Record/Indi/Fcom.php | 19 - library/PhpGedcom/Record/Indi/Grad.php | 19 - library/PhpGedcom/Record/Indi/Idno.php | 19 - library/PhpGedcom/Record/Indi/Immi.php | 19 - library/PhpGedcom/Record/Indi/Lds.php | 40 - library/PhpGedcom/Record/Indi/Name.php | 52 -- library/PhpGedcom/Record/Indi/Name/Fone.php | 77 -- library/PhpGedcom/Record/Indi/Name/Romn.php | 77 -- library/PhpGedcom/Record/Indi/Nati.php | 19 - library/PhpGedcom/Record/Indi/Natu.php | 19 - library/PhpGedcom/Record/Indi/Nchi.php | 19 - library/PhpGedcom/Record/Indi/Nmr.php | 19 - library/PhpGedcom/Record/Indi/Note.php | 19 - library/PhpGedcom/Record/Indi/Occu.php | 19 - library/PhpGedcom/Record/Indi/Ordn.php | 19 - library/PhpGedcom/Record/Indi/Prob.php | 19 - library/PhpGedcom/Record/Indi/Prop.php | 19 - library/PhpGedcom/Record/Indi/Reli.php | 19 - library/PhpGedcom/Record/Indi/Resi.php | 19 - library/PhpGedcom/Record/Indi/Reti.php | 19 - library/PhpGedcom/Record/Indi/Slgc.php | 20 - library/PhpGedcom/Record/Indi/Ssn.php | 19 - library/PhpGedcom/Record/Indi/Titl.php | 19 - library/PhpGedcom/Record/Indi/Will.php | 19 - library/PhpGedcom/Record/Note.php | 38 - library/PhpGedcom/Record/NoteRef.php | 39 - library/PhpGedcom/Record/Noteable.php | 20 - library/PhpGedcom/Record/Obje.php | 50 -- library/PhpGedcom/Record/ObjeRef.php | 36 - library/PhpGedcom/Record/ObjeRef/File.php | 35 - .../PhpGedcom/Record/ObjeRef/File/Form.php | 40 - library/PhpGedcom/Record/Objectable.php | 20 - library/PhpGedcom/Record/Phon.php | 48 -- library/PhpGedcom/Record/Plac.php | 55 -- library/PhpGedcom/Record/Plac/Fone.php | 33 - library/PhpGedcom/Record/Plac/Map.php | 33 - library/PhpGedcom/Record/Plac/Romn.php | 33 - library/PhpGedcom/Record/Refn.php | 73 -- library/PhpGedcom/Record/Repo.php | 303 ------- library/PhpGedcom/Record/RepoRef.php | 29 - library/PhpGedcom/Record/Sour.php | 348 -------- library/PhpGedcom/Record/Sour/Data.php | 33 - library/PhpGedcom/Record/Sour/Data/Even.php | 21 - library/PhpGedcom/Record/Sour/Repo.php | 41 - library/PhpGedcom/Record/Sour/Repo/Caln.php | 27 - library/PhpGedcom/Record/SourRef.php | 30 - library/PhpGedcom/Record/SourRef/Data.php | 27 - library/PhpGedcom/Record/SourRef/Even.php | 21 - library/PhpGedcom/Record/Sourceable.php | 20 - library/PhpGedcom/Record/Subm.php | 360 --------- library/PhpGedcom/Record/Subn.php | 257 ------ library/PhpGedcom/Writer.php | 128 --- library/PhpGedcom/Writer/Addr.php | 47 -- library/PhpGedcom/Writer/Caln.php | 46 -- library/PhpGedcom/Writer/Chan.php | 51 -- library/PhpGedcom/Writer/Fam.php | 153 ---- library/PhpGedcom/Writer/Fam/Even.php | 134 ---- library/PhpGedcom/Writer/Fam/Even/Husb.php | 41 - library/PhpGedcom/Writer/Fam/Even/Wife.php | 41 - library/PhpGedcom/Writer/Fam/Slgs.php | 76 -- library/PhpGedcom/Writer/Head.php | 127 --- library/PhpGedcom/Writer/Head/Char.php | 47 -- library/PhpGedcom/Writer/Head/Date.php | 46 -- library/PhpGedcom/Writer/Head/Gedc.php | 46 -- library/PhpGedcom/Writer/Head/Plac.php | 40 - library/PhpGedcom/Writer/Head/Sour.php | 67 -- library/PhpGedcom/Writer/Head/Sour/Corp.php | 59 -- library/PhpGedcom/Writer/Head/Sour/Data.php | 53 -- library/PhpGedcom/Writer/Indi.php | 247 ------ library/PhpGedcom/Writer/Indi/Asso.php | 62 -- library/PhpGedcom/Writer/Indi/Attr.php | 31 - library/PhpGedcom/Writer/Indi/Even.php | 157 ---- library/PhpGedcom/Writer/Indi/Even/Plac.php | 65 -- library/PhpGedcom/Writer/Indi/Famc.php | 54 -- library/PhpGedcom/Writer/Indi/Fams.php | 48 -- library/PhpGedcom/Writer/Indi/Name.php | 87 -- library/PhpGedcom/Writer/Note.php | 80 -- library/PhpGedcom/Writer/NoteRef.php | 47 -- library/PhpGedcom/Writer/Obje.php | 104 --- library/PhpGedcom/Writer/ObjeRef.php | 67 -- library/PhpGedcom/Writer/Phon.php | 32 - library/PhpGedcom/Writer/Refn.php | 44 -- library/PhpGedcom/Writer/Repo.php | 96 --- library/PhpGedcom/Writer/RepoRef.php | 57 -- library/PhpGedcom/Writer/Sour.php | 123 --- library/PhpGedcom/Writer/Sour/Data.php | 70 -- library/PhpGedcom/Writer/Sour/Data/Even.php | 46 -- library/PhpGedcom/Writer/SourRef.php | 72 -- library/PhpGedcom/Writer/SourRef/Even.php | 47 -- library/PhpGedcom/Writer/Subm.php | 111 --- library/PhpGedcom/Writer/Subn.php | 81 -- 252 files changed, 14597 deletions(-) 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/Date.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/Fam/Slgs/Stat.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/Name/Fone.php delete mode 100644 library/PhpGedcom/Parser/Indi/Name/Romn.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/ObjeRef/File.php delete mode 100644 library/PhpGedcom/Parser/ObjeRef/File/Form.php delete mode 100644 library/PhpGedcom/Parser/Phon.php delete mode 100644 library/PhpGedcom/Parser/Plac.php delete mode 100644 library/PhpGedcom/Parser/Plac/Fone.php delete mode 100644 library/PhpGedcom/Parser/Plac/Map.php delete mode 100644 library/PhpGedcom/Parser/Plac/Romn.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/Sour/Repo.php delete mode 100644 library/PhpGedcom/Parser/Sour/Repo/Caln.php delete mode 100644 library/PhpGedcom/Parser/SourRef.php delete mode 100644 library/PhpGedcom/Parser/SourRef/Data.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/Date.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/Fam/Slgs/Stat.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/Name/Fone.php delete mode 100644 library/PhpGedcom/Record/Indi/Name/Romn.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/ObjeRef/File.php delete mode 100644 library/PhpGedcom/Record/ObjeRef/File/Form.php delete mode 100644 library/PhpGedcom/Record/Objectable.php delete mode 100644 library/PhpGedcom/Record/Phon.php delete mode 100644 library/PhpGedcom/Record/Plac.php delete mode 100644 library/PhpGedcom/Record/Plac/Fone.php delete mode 100644 library/PhpGedcom/Record/Plac/Map.php delete mode 100644 library/PhpGedcom/Record/Plac/Romn.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/Sour/Repo.php delete mode 100644 library/PhpGedcom/Record/Sour/Repo/Caln.php delete mode 100644 library/PhpGedcom/Record/SourRef.php delete mode 100644 library/PhpGedcom/Record/SourRef/Data.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/Caln.php delete mode 100644 library/PhpGedcom/Writer/Chan.php delete mode 100644 library/PhpGedcom/Writer/Fam.php delete mode 100644 library/PhpGedcom/Writer/Fam/Even.php delete mode 100644 library/PhpGedcom/Writer/Fam/Even/Husb.php delete mode 100644 library/PhpGedcom/Writer/Fam/Even/Wife.php delete mode 100644 library/PhpGedcom/Writer/Fam/Slgs.php delete mode 100644 library/PhpGedcom/Writer/Head.php delete mode 100644 library/PhpGedcom/Writer/Head/Char.php delete mode 100644 library/PhpGedcom/Writer/Head/Date.php delete mode 100644 library/PhpGedcom/Writer/Head/Gedc.php delete mode 100644 library/PhpGedcom/Writer/Head/Plac.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/Head/Sour/Data.php delete mode 100644 library/PhpGedcom/Writer/Indi.php delete mode 100644 library/PhpGedcom/Writer/Indi/Asso.php delete mode 100644 library/PhpGedcom/Writer/Indi/Attr.php delete mode 100644 library/PhpGedcom/Writer/Indi/Even.php delete mode 100644 library/PhpGedcom/Writer/Indi/Even/Plac.php delete mode 100644 library/PhpGedcom/Writer/Indi/Famc.php delete mode 100644 library/PhpGedcom/Writer/Indi/Fams.php delete mode 100644 library/PhpGedcom/Writer/Indi/Name.php delete mode 100644 library/PhpGedcom/Writer/Note.php delete mode 100644 library/PhpGedcom/Writer/NoteRef.php delete mode 100644 library/PhpGedcom/Writer/Obje.php delete mode 100644 library/PhpGedcom/Writer/ObjeRef.php delete mode 100644 library/PhpGedcom/Writer/Phon.php delete mode 100644 library/PhpGedcom/Writer/Refn.php delete mode 100644 library/PhpGedcom/Writer/Repo.php delete mode 100644 library/PhpGedcom/Writer/RepoRef.php delete mode 100644 library/PhpGedcom/Writer/Sour.php delete mode 100644 library/PhpGedcom/Writer/Sour/Data.php delete mode 100644 library/PhpGedcom/Writer/Sour/Data/Even.php delete mode 100644 library/PhpGedcom/Writer/SourRef.php delete mode 100644 library/PhpGedcom/Writer/SourRef/Even.php delete mode 100644 library/PhpGedcom/Writer/Subm.php delete mode 100644 library/PhpGedcom/Writer/Subn.php diff --git a/library/PhpGedcom/Gedcom.php b/library/PhpGedcom/Gedcom.php deleted file mode 100644 index e57c35e4..00000000 --- a/library/PhpGedcom/Gedcom.php +++ /dev/null @@ -1,274 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom; - -/** - * Class Gedcom. - */ -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 \PhpGedcom\Record\Sour[] - */ - protected $sour = []; - - /** - * Stores all the individuals contained within the GEDCOM file. - * - * @var \PhpGedcom\Record\Indi[] - */ - protected $indi = []; - - /** - * Stores all the individuals contained within the GEDCOM file. - * - * @var array - */ - protected $uid2indi = []; - - /** - * Stores all the families contained within the GEDCOM file. - * - * @var \PhpGedcom\Record\Fam[] - */ - protected $fam = []; - - /** - * Stores all the notes contained within the GEDCOM file that are not inline. - * - * @var \PhpGedcom\Record\Note[] - */ - protected $note = []; - - /** - * Stores all repositories that are contained within the GEDCOM file and referenced by sources. - * - * @var \PhpGedcom\Record\Repo[] - */ - protected $repo = []; - - /** - * Stores all the media objects that are contained within the GEDCOM file. - * - * @var \PhpGedcom\Record\Obje[] - */ - protected $obje = []; - - /** - * Stores information about all the submitters to the GEDCOM file. - * - * @var \PhpGedcom\Record\Subm[] - */ - protected $subm = []; - - /** - * 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; - if ($indi->getUid()) { - $this->uid2indi[$indi->getUid()] = $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 \PhpGedcom\Record\Subm[] - */ - public function getSubm() - { - return $this->subm; - } - - /** - * Gets the collection of individuals stored in the GEDCOM file. - * - * @return \PhpGedcom\Record\Indi[] - */ - public function getIndi() - { - return $this->indi; - } - - /** - * Gets the collection of families stored in the GEDCOM file. - * - * @return \PhpGedcom\Record\Fam[] - */ - public function getFam() - { - return $this->fam; - } - - /** - * Gets the collection of repositories stored in the GEDCOM file. - * - * @return \PhpGedcom\Record\Repo[] - */ - public function getRepo() - { - return $this->repo; - } - - /** - * Gets the collection of sources stored in the GEDCOM file. - * - * @return \PhpGedcom\Record\Sour[] - */ - public function getSour() - { - return $this->sour; - } - - /** - * Gets the collection of note stored in the GEDCOM file. - * - * @return \PhpGedcom\Record\Note[] - */ - public function getNote() - { - return $this->note; - } - - /** - * Gets the collection of objects stored in the GEDCOM file. - * - * @return \PhpGedcom\Record\Obje[] - */ - public function getObje() - { - return $this->obje; - } -} diff --git a/library/PhpGedcom/Parser.php b/library/PhpGedcom/Parser.php deleted file mode 100644 index e7b45759..00000000 --- a/library/PhpGedcom/Parser.php +++ /dev/null @@ -1,275 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom; - -class Parser -{ - protected $_file = null; - - protected $_gedcom = null; - - protected $_errorLog = []; - - protected $_linesParsed = 0; - - protected $_line = ''; - - protected $_lineRecord = null; - - protected $_linePieces = 0; - - 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)) { - if ($this->_linePieces == $pieces) { - return $this->_lineRecord; - } - } - - if (empty($this->_line)) { - return false; - } - - $line = trim($this->_line); - - $this->_lineRecord = explode(' ', $line, $pieces); - $this->_linePieces = $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): - if (isset($record[1])) { - $identifier = $this->normalizeIdentifier($record[1]); - } - - if (isset($record[1]) && trim($record[1]) == 'HEAD') { - Parser\Head::parse($this); - } elseif (isset($record[2]) && trim($record[2]) == 'SUBN') { - Parser\Subn::parse($this); - } elseif (isset($record[2]) && trim($record[2]) == 'SUBM') { - Parser\Subm::parse($this); - } elseif (isset($record[2]) && $record[2] == 'SOUR') { - Parser\Sour::parse($this); - } elseif (isset($record[2]) && $record[2] == 'INDI') { - Parser\Indi::parse($this); - } elseif (isset($record[2]) && $record[2] == 'FAM') { - Parser\Fam::parse($this); - } elseif (isset($record[2]) && substr(trim($record[2]), 0, 4) == 'NOTE') { - Parser\Note::parse($this); - } elseif (isset($record[2]) && $record[2] == 'REPO') { - Parser\Repo::parse($this); - } elseif (isset($record[2]) && $record[2] == 'OBJE') { - Parser\Obje::parse($this); - } elseif (isset($record[1]) && 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 7ace5ab1..00000000 --- a/library/PhpGedcom/Parser/Addr.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 ea91e3f4..00000000 --- a/library/PhpGedcom/Parser/Caln.php +++ /dev/null @@ -1,57 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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(); - $depth = (int) $record[0]; - if (isset($record[2])) { - $identifier = $parser->normalizeIdentifier($record[2]); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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 5dc5dfc0..00000000 --- a/library/PhpGedcom/Parser/Chan.php +++ /dev/null @@ -1,60 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 16484e4e..00000000 --- a/library/PhpGedcom/Parser/Component.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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/Date.php b/library/PhpGedcom/Parser/Date.php deleted file mode 100644 index 2ed23b40..00000000 --- a/library/PhpGedcom/Parser/Date.php +++ /dev/null @@ -1,36 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -class Date extends \PhpGedcom\Parser\Component -{ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; - if (isset($record[1])) { - $dat = new \PhpGedcom\Record\Date(); - if (!empty($record[2])) { - $dat->setDate($record[2]); - } - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - return $dat; - } -} diff --git a/library/PhpGedcom/Parser/Fam.php b/library/PhpGedcom/Parser/Fam.php deleted file mode 100644 index 8a1a0d3c..00000000 --- a/library/PhpGedcom/Parser/Fam.php +++ /dev/null @@ -1,136 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -class Fam extends \PhpGedcom\Parser\Component -{ - protected static $_eventTypes = [ - 'ANUL', - 'CENS', - 'DIV', - 'DIVF', - 'ENGA', - 'MARR', - 'MARB', - 'MARC', - 'MARL', - 'MARS', - ]; - - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; - if (isset($record[1])) { - $identifier = $parser->normalizeIdentifier($record[1]); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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 'RESN': - $fam->setResn(trim($record[2])); - 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; - 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 '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 'RIN': - $fam->setRin(trim($record[2])); - break; - case 'CHAN': - $chan = \PhpGedcom\Parser\Chan::parse($parser); - $fam->setChan($chan); - 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; - - 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 cbfc8270..00000000 --- a/library/PhpGedcom/Parser/Fam/Anul.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 72fc9238..00000000 --- a/library/PhpGedcom/Parser/Fam/Cens.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 1a17af9a..00000000 --- a/library/PhpGedcom/Parser/Fam/Div.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 448105e6..00000000 --- a/library/PhpGedcom/Parser/Fam/Divf.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 117f1a38..00000000 --- a/library/PhpGedcom/Parser/Fam/Enga.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 9001c06f..00000000 --- a/library/PhpGedcom/Parser/Fam/Even.php +++ /dev/null @@ -1,103 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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': - $dat = \PhpGedcom\Parser\Date::parse($parser); - $even->setDate($dat); - //$even->setDate(trim($record[2])); - break; - case 'PLAC': - $plac = \PhpGedcom\Parser\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 b0f8515e..00000000 --- a/library/PhpGedcom/Parser/Fam/Even/Husb.php +++ /dev/null @@ -1,51 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 c6845fd6..00000000 --- a/library/PhpGedcom/Parser/Fam/Even/Wife.php +++ /dev/null @@ -1,51 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 78a70c75..00000000 --- a/library/PhpGedcom/Parser/Fam/Marb.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 34c93205..00000000 --- a/library/PhpGedcom/Parser/Fam/Marc.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 1031f5f3..00000000 --- a/library/PhpGedcom/Parser/Fam/Marl.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 f52c576c..00000000 --- a/library/PhpGedcom/Parser/Fam/Marr.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 2ef26680..00000000 --- a/library/PhpGedcom/Parser/Fam/Mars.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 4cccaf25..00000000 --- a/library/PhpGedcom/Parser/Fam/Slgs.php +++ /dev/null @@ -1,71 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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': - $stat = \PhpGedcom\Parser\Fam\Slgs\Stat::parse($parser); - $slgs->setStat($stat); - 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/Fam/Slgs/Stat.php b/library/PhpGedcom/Parser/Fam/Slgs/Stat.php deleted file mode 100644 index 523102c3..00000000 --- a/library/PhpGedcom/Parser/Fam/Slgs/Stat.php +++ /dev/null @@ -1,59 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Fam\Slgs; - -class Stat extends \PhpGedcom\Parser\Component -{ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; - if (isset($record[2])) { - $_stat = $record[2]; - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $stat = new \PhpGedcom\Record\Fam\Slgs\Stat(); - $stat->setStat($_stat); - - $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': - $stat->setDate(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); - } - - $parser->forward(); - } - - return $stat; - } -} diff --git a/library/PhpGedcom/Parser/Head.php b/library/PhpGedcom/Parser/Head.php deleted file mode 100644 index ba860070..00000000 --- a/library/PhpGedcom/Parser/Head.php +++ /dev/null @@ -1,106 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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(); - $depth = (int) $record[0]; - if (isset($record[1])) { - $identifier = $parser->normalizeIdentifier($record[1]); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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 3dda7621..00000000 --- a/library/PhpGedcom/Parser/Head/Char.php +++ /dev/null @@ -1,57 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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]; - if (isset($record[2])) { - $char = new \PhpGedcom\Record\Head\Char(); - $char->setChar(trim($record[2])); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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 7be159a0..00000000 --- a/library/PhpGedcom/Parser/Head/Date.php +++ /dev/null @@ -1,57 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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]; - if (isset($record[2])) { - $date = new \PhpGedcom\Record\Head\Date(); - $date->setDate(trim($record[2])); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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 c5754c96..00000000 --- a/library/PhpGedcom/Parser/Head/Gedc.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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->setVersion(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 2c7bb05d..00000000 --- a/library/PhpGedcom/Parser/Head/Plac.php +++ /dev/null @@ -1,51 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 d1669fd7..00000000 --- a/library/PhpGedcom/Parser/Head/Sour.php +++ /dev/null @@ -1,68 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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]; - if (isset($record[2])) { - $source = new \PhpGedcom\Record\Head\Sour(); - $source->setSour(trim($record[2])); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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 8199c233..00000000 --- a/library/PhpGedcom/Parser/Head/Sour/Corp.php +++ /dev/null @@ -1,60 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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]; - if (isset($record[2])) { - $corp = new \PhpGedcom\Record\Head\Sour\Corp(); - $corp->setCorp(trim($record[2])); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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 9b4930d0..00000000 --- a/library/PhpGedcom/Parser/Head/Sour/Data.php +++ /dev/null @@ -1,60 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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]; - if (isset($record[2])) { - $data = new \PhpGedcom\Record\Head\Sour\Data(); - $data->setData(trim($record[2])); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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 377c44a5..00000000 --- a/library/PhpGedcom/Parser/Indi.php +++ /dev/null @@ -1,188 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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(); - $depth = (int) $record[0]; - if (isset($record[1])) { - $identifier = $parser->normalizeIdentifier($record[1]); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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 '_UID': - $indi->setUid(trim($record[2])); - break; - case 'RESN': - $indi->setResn(trim($record[2])); - break; - case 'NAME': - $name = \PhpGedcom\Parser\Indi\Name::parse($parser); - $indi->addName($name); - break; - case 'SEX': - $indi->setSex(isset($record[2]) ? trim($record[2]) : ''); - 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; - case 'BAPL': - case 'CONL': - case 'ENDL': - case 'SLGC': - $className = ucfirst(strtolower($recordType)); - $class = '\\PhpGedcom\\Parser\\Indi\\'.$className; - - $lds = $class::parse($parser); - $indi->{'add'.$recordType}[] = $lds; - break; - case 'FAMC': - $famc = \PhpGedcom\Parser\Indi\Famc::parse($parser); - if ($famc) { - $indi->addFamc($famc); - } - break; - case 'FAMS': - $fams = \PhpGedcom\Parser\Indi\Fams::parse($parser); - if ($fams) { - $indi->addFams($fams); - } - break; - case 'SUBM': - $indi->addSubm($parser->normalizeIdentifier($record[2])); - break; - case 'ASSO': - $asso = \PhpGedcom\Parser\Indi\Asso::parse($parser); - $indi->addAsso($asso); - break; - case 'ALIA': - $indi->addAlia($parser->normalizeIdentifier($record[2])); - break; - case 'ANCI': - $indi->addAnci($parser->normalizeIdentifier($record[2])); - break; - case 'DESI': - $indi->addDesi($parser->normalizeIdentifier($record[2])); - break; - case 'RFN': - $indi->setRfn(trim($record[2])); - break; - case 'AFN': - $indi->setAfn(trim($record[2])); - break; - case 'REFN': - $ref = \PhpGedcom\Parser\Refn::parse($parser); - $indi->addRefn($ref); - break; - case 'RIN': - $indi->setRin(trim($record[2])); - break; - case 'CHAN': - $chan = \PhpGedcom\Parser\Chan::parse($parser); - $indi->setChan($chan); - 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 'OBJE': - $obje = \PhpGedcom\Parser\ObjeRef::parse($parser); - $indi->addObje($obje); - 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 4fbaca06..00000000 --- a/library/PhpGedcom/Parser/Indi/Adop.php +++ /dev/null @@ -1,34 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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(); - if (isset($record[1])) { - $even->setAdop(trim($record[2])); - } - } - - public static function parseFamc($parser, $even) - { - $record = $parser->getCurrentLineRecord(); - if (isset($record[1])) { - $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 ca4b4edc..00000000 --- a/library/PhpGedcom/Parser/Indi/Asso.php +++ /dev/null @@ -1,67 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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]; - if (isset($record[2])) { - $asso = new \PhpGedcom\Record\Indi\Asso(); - $asso->setIndi($parser->normalizeIdentifier($record[2])); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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 17f18e5d..00000000 --- a/library/PhpGedcom/Parser/Indi/Attr.php +++ /dev/null @@ -1,100 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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]; - if (isset($record[1])) { - $className = '\\PhpGedcom\\Record\\Indi\\'.ucfirst(strtolower(trim($record[1]))); - $attr = new $className(); - - $attr->setType(trim($record[1])); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - 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 7ddc8c96..00000000 --- a/library/PhpGedcom/Parser/Indi/Bapl.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 6cb91df2..00000000 --- a/library/PhpGedcom/Parser/Indi/Bapm.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 5e759ed5..00000000 --- a/library/PhpGedcom/Parser/Indi/Barm.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 7c2425a6..00000000 --- a/library/PhpGedcom/Parser/Indi/Basm.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 1097fede..00000000 --- a/library/PhpGedcom/Parser/Indi/Birt.php +++ /dev/null @@ -1,26 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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(); - if (isset($record[2])) { - $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 e0c1cd00..00000000 --- a/library/PhpGedcom/Parser/Indi/Bles.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 ad06eec7..00000000 --- a/library/PhpGedcom/Parser/Indi/Buri.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 99789056..00000000 --- a/library/PhpGedcom/Parser/Indi/Cast.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 86899215..00000000 --- a/library/PhpGedcom/Parser/Indi/Cens.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 5654c707..00000000 --- a/library/PhpGedcom/Parser/Indi/Chr.php +++ /dev/null @@ -1,26 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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(); - if (isset($record[2])) { - $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 0540e945..00000000 --- a/library/PhpGedcom/Parser/Indi/Chra.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 7b4e5872..00000000 --- a/library/PhpGedcom/Parser/Indi/Conf.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 fffd5ed7..00000000 --- a/library/PhpGedcom/Parser/Indi/Conl.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 e2efa06b..00000000 --- a/library/PhpGedcom/Parser/Indi/Crem.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 8bfb3523..00000000 --- a/library/PhpGedcom/Parser/Indi/Deat.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 3e0240e5..00000000 --- a/library/PhpGedcom/Parser/Indi/Dscr.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 30e9b6f0..00000000 --- a/library/PhpGedcom/Parser/Indi/Educ.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 18e7e536..00000000 --- a/library/PhpGedcom/Parser/Indi/Emig.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 6021c2d9..00000000 --- a/library/PhpGedcom/Parser/Indi/Endl.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 9da06ccd..00000000 --- a/library/PhpGedcom/Parser/Indi/Even.php +++ /dev/null @@ -1,125 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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]; - if (empty($record[1])) { - $parser->skipToNextLevel($depth); - - return null; - } - - $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])); - } - - // ensures we capture any data following the EVEN type - if (isset($record[2]) && !empty($record[2])) { - $even->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': - $even->setType(trim($record[2])); - break; - case 'DATE': - $dat = \PhpGedcom\Parser\Date::parse($parser); - $even->setDate($dat); - //$even->setDate(trim($record[2])) - break; - case 'PLAC': - $plac = \PhpGedcom\Parser\Plac::parse($parser); - $even->setPlac($plac); - break; - case 'ADDR': - $even->setAddr(\PhpGedcom\Parser\Addr::parse($parser)); - 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 '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 20db6830..00000000 --- a/library/PhpGedcom/Parser/Indi/Even/Plac.php +++ /dev/null @@ -1,65 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 d930589b..00000000 --- a/library/PhpGedcom/Parser/Indi/Famc.php +++ /dev/null @@ -1,67 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 a4e8b5ee..00000000 --- a/library/PhpGedcom/Parser/Indi/Fams.php +++ /dev/null @@ -1,64 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 6cf0f0c7..00000000 --- a/library/PhpGedcom/Parser/Indi/Fcom.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 e23024f2..00000000 --- a/library/PhpGedcom/Parser/Indi/Grad.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 772b1a21..00000000 --- a/library/PhpGedcom/Parser/Indi/Idno.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 191eac06..00000000 --- a/library/PhpGedcom/Parser/Indi/Immi.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 c2c68342..00000000 --- a/library/PhpGedcom/Parser/Indi/Lds.php +++ /dev/null @@ -1,83 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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]; - if (isset($record[1])) { - $className = '\\PhpGedcom\\Record\\Indi\\'.ucfirst(strtolower(trim($record[1]))); - $lds = new $className(); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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 af5e0a55..00000000 --- a/library/PhpGedcom/Parser/Indi/Name.php +++ /dev/null @@ -1,95 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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]; - if (isset($record[2])) { - $name = new \PhpGedcom\Record\Indi\Name(); - $name->setName(trim($record[2])); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int) $record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - if (!isset($record[2])) { - $record[2] = ''; - } - - switch ($recordType) { - case 'TYPE': - $name->setType(trim($record[2])); - break; - 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; - case 'FONE': - $name->setFone(\PhpGedcom\Parser\Indi\Name\Fone::parse($parser)); - break; - case 'ROMN': - $name->setRomn(\PhpGedcom\Parser\Indi\Name\Romn::parse($parser)); - break; - default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); - } - - $parser->forward(); - } - - return $name; - } -} diff --git a/library/PhpGedcom/Parser/Indi/Name/Fone.php b/library/PhpGedcom/Parser/Indi/Name/Fone.php deleted file mode 100644 index 60b0ca2e..00000000 --- a/library/PhpGedcom/Parser/Indi/Name/Fone.php +++ /dev/null @@ -1,77 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi\Name; - -class Fone extends \PhpGedcom\Parser\Component -{ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; - if (isset($record[2])) { - $fone = new \PhpGedcom\Record\Indi\Name\Fone(); - $fone->setFone(trim($record[2])); - } else { - return null; - } - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int) $record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - if (!isset($record[2])) { - $record[2] = ''; - } - - switch ($recordType) { - case 'TYPE': - $fone->setType(trim($record[2])); - break; - case 'NPFX': - $fone->setNpfx(trim($record[2])); - break; - case 'GIVN': - $fone->setGivn(trim($record[2])); - break; - case 'NICK': - $fone->setNick(trim($record[2])); - break; - case 'SPFX': - $fone->setSpfx(trim($record[2])); - break; - case 'SURN': - $fone->setSurn(trim($record[2])); - break; - case 'NSFX': - $fone->setNsfx(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); - } - - $parser->forward(); - } - - return $fone; - } -} diff --git a/library/PhpGedcom/Parser/Indi/Name/Romn.php b/library/PhpGedcom/Parser/Indi/Name/Romn.php deleted file mode 100644 index 52208c59..00000000 --- a/library/PhpGedcom/Parser/Indi/Name/Romn.php +++ /dev/null @@ -1,79 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Indi\Name; - -class Romn extends \PhpGedcom\Parser\Component -{ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; - if (isset($record[2])) { - $romn = new \PhpGedcom\Record\Indi\Name\Romn(); - $romn->setRomn(trim($record[2])); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $parser->forward(); - - while (!$parser->eof()) { - $record = $parser->getCurrentLineRecord(); - $recordType = strtoupper(trim($record[1])); - $currentDepth = (int) $record[0]; - - if ($currentDepth <= $depth) { - $parser->back(); - break; - } - - if (!isset($record[2])) { - $record[2] = ''; - } - - switch ($recordType) { - case 'TYPE': - $romn->setRomn(trim($record[2])); - break; - case 'NPFX': - $romn->setNpfx(trim($record[2])); - break; - case 'GIVN': - $romn->setGivn(trim($record[2])); - break; - case 'NICK': - $romn->setNick(trim($record[2])); - break; - case 'SPFX': - $romn->setSpfx(trim($record[2])); - break; - case 'SURN': - $romn->setSurn(trim($record[2])); - break; - case 'NSFX': - $romn->setNsfx(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); - } - - $parser->forward(); - } - - return $romn; - } -} diff --git a/library/PhpGedcom/Parser/Indi/Nati.php b/library/PhpGedcom/Parser/Indi/Nati.php deleted file mode 100644 index fb7d980a..00000000 --- a/library/PhpGedcom/Parser/Indi/Nati.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 0cc9b6dd..00000000 --- a/library/PhpGedcom/Parser/Indi/Natu.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 9b072ac9..00000000 --- a/library/PhpGedcom/Parser/Indi/Nchi.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 370f6010..00000000 --- a/library/PhpGedcom/Parser/Indi/Nmr.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 dfe0b538..00000000 --- a/library/PhpGedcom/Parser/Indi/Occu.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 3e941250..00000000 --- a/library/PhpGedcom/Parser/Indi/Ordn.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 961f19e2..00000000 --- a/library/PhpGedcom/Parser/Indi/Prob.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 cd5edbaa..00000000 --- a/library/PhpGedcom/Parser/Indi/Prop.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 0d1cbffb..00000000 --- a/library/PhpGedcom/Parser/Indi/Reli.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 6e20ef11..00000000 --- a/library/PhpGedcom/Parser/Indi/Resi.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 737aa802..00000000 --- a/library/PhpGedcom/Parser/Indi/Reti.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 030fc5be..00000000 --- a/library/PhpGedcom/Parser/Indi/Slgc.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 1c5e38e4..00000000 --- a/library/PhpGedcom/Parser/Indi/Ssn.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 8830ef25..00000000 --- a/library/PhpGedcom/Parser/Indi/Titl.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 6c3b5ba5..00000000 --- a/library/PhpGedcom/Parser/Indi/Will.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 c081a70f..00000000 --- a/library/PhpGedcom/Parser/Note.php +++ /dev/null @@ -1,87 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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); - $depth = (int) $record[0]; - if (isset($record[1])) { - $identifier = $parser->normalizeIdentifier($record[1]); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $note = new \PhpGedcom\Record\Note(); - $note->setId($identifier); - - if (isset($record[3])) { - $note->setNote($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 '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 'RIN': - $note->setRin(trim($record[2])); - break; - case 'SOUR': - $sour = \PhpGedcom\Parser\SourRef::parse($parser); - $note->addSour($sour); - break; - case 'CHAN': - $chan = \PhpGedcom\Parser\Chan::parse($parser); - $note->setChan($chan); - break; - default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); - } - - $parser->forward(); - } - $parser->getGedcom()->addNote($note); - - return $note; - } -} diff --git a/library/PhpGedcom/Parser/NoteRef.php b/library/PhpGedcom/Parser/NoteRef.php deleted file mode 100644 index f0e481ad..00000000 --- a/library/PhpGedcom/Parser/NoteRef.php +++ /dev/null @@ -1,68 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 ff1f1267..00000000 --- a/library/PhpGedcom/Parser/Obje.php +++ /dev/null @@ -1,85 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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(); - $depth = (int) $record[0]; - if (isset($record[1])) { - $identifier = $parser->normalizeIdentifier($record[1]); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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 'FILE': - $obje->setFile(trim($record[2])); - break; - case 'REFN': - $refn = \PhpGedcom\Parser\Refn::parse($parser); - $obje->addRefn($refn); - break; - case 'RIN': - $obje->setRin(trim($record[2])); - break; - - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $obje->addNote($note); - } - break; - case 'SOUR': - $chan = \PhpGedcom\Parser\Chan::parse($parser); - $obje->setChan($chan); - 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 0bd94f9b..00000000 --- a/library/PhpGedcom/Parser/ObjeRef.php +++ /dev/null @@ -1,61 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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(\PhpGedcom\Parser\ObjeRef\File::parse($parser)); - break; - default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); - } - - $parser->forward(); - } - - return $obje; - } -} diff --git a/library/PhpGedcom/Parser/ObjeRef/File.php b/library/PhpGedcom/Parser/ObjeRef/File.php deleted file mode 100644 index e1bc4f18..00000000 --- a/library/PhpGedcom/Parser/ObjeRef/File.php +++ /dev/null @@ -1,56 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\ObjeRef; - -class File extends \PhpGedcom\Parser\Component -{ - public static function parse(\PhpGedcom\Parser $parser) - { - $file = new \PhpGedcom\Record\ObjeRef\File(); - $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; - if (isset($record[2])) { - $file->setFile($record[2]); - } else { - return null; - } - $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': - $file->setDate(\PhpGedcom\Parser\ObjeRef\File\Form::parse($parser)); - break; - case 'TITL': - $file->setTitl(trim($record[2])); - default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); - } - - $parser->forward(); - } - - return $file; - } -} diff --git a/library/PhpGedcom/Parser/ObjeRef/File/Form.php b/library/PhpGedcom/Parser/ObjeRef/File/Form.php deleted file mode 100644 index f7787aa6..00000000 --- a/library/PhpGedcom/Parser/ObjeRef/File/Form.php +++ /dev/null @@ -1,59 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\ObjeRef\File; - -class Form extends \PhpGedcom\Parser\Component -{ - public static function parse(\PhpGedcom\Parser $parser) - { - $form = new \PhpGedcom\Record\ObjeRef\File\Form(); - $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; - if (isset($record[2])) { - $form->setForm($record[2]); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - $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 'MEDI': - $form->setMedi(trim($record[2])); - break; - case 'TYPE': - $form->setType(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); - } - - $parser->forward(); - } - - return $form; - } -} diff --git a/library/PhpGedcom/Parser/Phon.php b/library/PhpGedcom/Parser/Phon.php deleted file mode 100644 index 7b6717a6..00000000 --- a/library/PhpGedcom/Parser/Phon.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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]; - if (isset($record[2])) { - $phone = new \PhpGedcom\Record\Phon(); - $phone->setPhon(trim($record[2])); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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/Plac.php b/library/PhpGedcom/Parser/Plac.php deleted file mode 100644 index 5e5319ee..00000000 --- a/library/PhpGedcom/Parser/Plac.php +++ /dev/null @@ -1,76 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser; - -class Plac extends \PhpGedcom\Parser\Component -{ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; - if (isset($record[2])) { - $_plac = trim($record[2]); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $plac = new \PhpGedcom\Record\Plac(); - $plac->setPlac($_plac); - - $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': - $plac->setForm(trim($record[2])); - break; - case 'FONE': - $fone = \PhpGedcom\Parser\Plac\Fone::parse($parser); - $plac->setFone($fone); - break; - case 'ROMN': - $romn = \PhpGedcom\Parser\Plac\Romn::parse($parser); - $plac->setRomn($romn); - break; - case 'NOTE': - if ($note = \PhpGedcom\Parser\NoteRef::parse($parser)) { - $plac->addNote($note); - } - break; - case 'MAP': - $map = \PhpGedcom\Parser\Plac\Map::parse($parser); - $plac->setMap($map); - break; - default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); - } - - $parser->forward(); - } - - return $plac; - } -} diff --git a/library/PhpGedcom/Parser/Plac/Fone.php b/library/PhpGedcom/Parser/Plac/Fone.php deleted file mode 100644 index 9152b75d..00000000 --- a/library/PhpGedcom/Parser/Plac/Fone.php +++ /dev/null @@ -1,59 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Plac; - -class Fone extends \PhpGedcom\Parser\Component -{ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; - if (isset($record[2])) { - $_fone = trim($record[2]); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $fone = new \PhpGedcom\Record\Plac\Fone(); - $fone->setPlac($_fone); - - $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 'TYPE': - $fone->setType(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); - } - - $parser->forward(); - } - - return $fone; - } -} diff --git a/library/PhpGedcom/Parser/Plac/Map.php b/library/PhpGedcom/Parser/Plac/Map.php deleted file mode 100644 index ce1d0fc1..00000000 --- a/library/PhpGedcom/Parser/Plac/Map.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Plac; - -class Map extends \PhpGedcom\Parser\Component -{ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; - - $map = new \PhpGedcom\Record\Plac\Map(); - - $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 'LATI': - $map->setLati(trim($record[2])); - break; - case 'LONG': - $map->setLong(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); - } - - $parser->forward(); - } - - return $map; - } -} diff --git a/library/PhpGedcom/Parser/Plac/Romn.php b/library/PhpGedcom/Parser/Plac/Romn.php deleted file mode 100644 index ba42cf23..00000000 --- a/library/PhpGedcom/Parser/Plac/Romn.php +++ /dev/null @@ -1,59 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Plac; - -class Romn extends \PhpGedcom\Parser\Component -{ - public static function parse(\PhpGedcom\Parser $parser) - { - $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; - if (isset($record[2])) { - $_romn = trim($record[2]); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $romn = new \PhpGedcom\Record\Plac\Romn(); - $romn->setPlac($_romn); - - $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 'TYPE': - $romn->setType(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); - } - - $parser->forward(); - } - - return $romn; - } -} diff --git a/library/PhpGedcom/Parser/Refn.php b/library/PhpGedcom/Parser/Refn.php deleted file mode 100644 index 978f06fe..00000000 --- a/library/PhpGedcom/Parser/Refn.php +++ /dev/null @@ -1,57 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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]; - if (isset($record[2])) { - $refn = new \PhpGedcom\Record\Refn(); - $refn->setRefn(trim($record[2])); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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 076e9371..00000000 --- a/library/PhpGedcom/Parser/Repo.php +++ /dev/null @@ -1,93 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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(); - $depth = (int) $record[0]; - if (isset($record[1])) { - $identifier = $parser->normalizeIdentifier($record[1]); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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': - $repo->addPhon(trim($record[2])); - break; - case 'EMAIL': - $repo->addEmail(trim($record[2])); - break; - case 'FAX': - $repo->addFax(trim($record[2])); - break; - case 'WWW': - $repo->addWww(trim($record[2])); - break; - case 'NOTE': - if ($note = \PhpGedcom\Parser\NoteRef::parse($parser)) { - $repo->addNote($note); - } - break; - case 'REFN': - $refn = \PhpGedcom\Parser\Refn::parse($parser); - $repo->addRefn($refn); - break; - case 'RIN': - $repo->setRin(trim($record[2])); - break; - case 'CHAN': - $chan = \PhpGedcom\Parser\Chan::parse($parser); - $repo->setChan($chan); - 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 964b0053..00000000 --- a/library/PhpGedcom/Parser/RepoRef.php +++ /dev/null @@ -1,65 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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(); - $depth = (int) $record[0]; - if (isset($record[2])) { - $identifier = $parser->normalizeIdentifier($record[2]); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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 1d42aac4..00000000 --- a/library/PhpGedcom/Parser/Sour.php +++ /dev/null @@ -1,100 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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(); - $depth = (int) $record[0]; - if (isset($record[1])) { - $identifier = $parser->normalizeIdentifier($record[1]); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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 'DATA': - $sour->setData(\PhpGedcom\Parser\Sour\Data::parse($parser)); - break; - case 'AUTH': - $sour->setAuth($parser->parseMultilineRecord()); - break; - case 'TITL': - $sour->setTitl($parser->parseMultilineRecord()); - break; - case 'ABBR': - $sour->setAbbr(trim($record[2])); - break; - case 'PUBL': - $sour->setPubl($parser->parseMultilineRecord()); - break; - case 'TEXT': - $sour->setText($parser->parseMultilineRecord()); - break; - case 'REPO': - $sour->setRepo(\PhpGedcom\Parser\Sour\Repo::parse($parser)); - break; - case 'REFN': - $refn = \PhpGedcom\Parser\Refn::parse($parser); - $sour->addRefn($refn); - break; - case 'RIN': - $sour->setRin(trim($record[2])); - break; - case 'CHAN': - $chan = \PhpGedcom\Parser\Chan::parse($parser); - $sour->setChan($chan); - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $sour->addNote($note); - } - break; - case 'OBJE': - $obje = \PhpGedcom\Parser\ObjeRef::parse($parser); - $sour->addObje($obje); - 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 e30794b8..00000000 --- a/library/PhpGedcom/Parser/Sour/Data.php +++ /dev/null @@ -1,66 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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': // not in 5.5.1 - $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': // not in 5.5.1 - $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 bbac5753..00000000 --- a/library/PhpGedcom/Parser/Sour/Data/Even.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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/Sour/Repo.php b/library/PhpGedcom/Parser/Sour/Repo.php deleted file mode 100644 index ff5d808e..00000000 --- a/library/PhpGedcom/Parser/Sour/Repo.php +++ /dev/null @@ -1,57 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Sour; - -class Repo extends \PhpGedcom\Parser\Component -{ - public static function parse(\PhpGedcom\Parser $parser) - { - $repo = new \PhpGedcom\Record\Sour\Repo(); - $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; - if (isset($record[2])) { - $_repo = $parser->normalizeIdentifier($record[2]); - $repo->setRepo($_repo); - } - - $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': - $repo->addNote(\PhpGedcom\Parser\NoteRef::parse($parser)); - break; - case 'CALN': - $repo->addCaln(\PhpGedcom\Parser\Sour\Repo\Caln::parse($parser)); - break; - default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); - } - - $parser->forward(); - } - - return $repo; - } -} diff --git a/library/PhpGedcom/Parser/Sour/Repo/Caln.php b/library/PhpGedcom/Parser/Sour/Repo/Caln.php deleted file mode 100644 index 6bf0e6e4..00000000 --- a/library/PhpGedcom/Parser/Sour/Repo/Caln.php +++ /dev/null @@ -1,56 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\Sour\Repo; - -class Caln extends \PhpGedcom\Parser\Component -{ - public static function parse(\PhpGedcom\Parser $parser) - { - $caln = new \PhpGedcom\Record\Sour\Repo\Caln(); - $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; - if (isset($record[2])) { - $_caln = $record[2]; - $caln->setCaln($_caln); - } else { - return null; - } - - $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 'MEDI': - $caln->setMedi(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); - } - - $parser->forward(); - } - - return $caln; - } -} diff --git a/library/PhpGedcom/Parser/SourRef.php b/library/PhpGedcom/Parser/SourRef.php deleted file mode 100644 index 49d34842..00000000 --- a/library/PhpGedcom/Parser/SourRef.php +++ /dev/null @@ -1,82 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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]; - if (isset($record[2])) { - $sour = new \PhpGedcom\Record\SourRef(); - $sour->setSour($parser->normalizeIdentifier($record[2])); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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 'PAGE': - $sour->setPage(trim($record[2])); - break; - case 'EVEN': - $even = \PhpGedcom\Parser\SourRef\Even::parse($parser); - $sour->setEven($even); - break; - case 'DATA': - $sour->setData(\PhpGedcom\Parser\SourRef\Data::parse($parser)); - break; - case 'TEXT': - $sour->setText($parser->parseMultiLineRecord()); - break; - case 'OBJE': - $obje = \PhpGedcom\Parser\ObjeRef::parse($parser); - if ($obje) { - $sour->addNote($obje); - } - break; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $sour->addNote($note); - } - break; - case 'QUAY': - $sour->setQuay(trim($record[2])); - break; - default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); - } - - $parser->forward(); - } - - return $sour; - } -} diff --git a/library/PhpGedcom/Parser/SourRef/Data.php b/library/PhpGedcom/Parser/SourRef/Data.php deleted file mode 100644 index a77f4b45..00000000 --- a/library/PhpGedcom/Parser/SourRef/Data.php +++ /dev/null @@ -1,53 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Parser\SourRef; - -class Data extends \PhpGedcom\Parser\Component -{ - public static function parse(\PhpGedcom\Parser $parser) - { - $data = new \PhpGedcom\Record\SourRef\Data(); - $record = $parser->getCurrentLineRecord(); - $depth = (int) $record[0]; - - $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 'TEXT': - $data->setText($parser->parseMultiLineRecord()); - break; - default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); - } - - $parser->forward(); - } - - return $data; - } -} diff --git a/library/PhpGedcom/Parser/SourRef/Even.php b/library/PhpGedcom/Parser/SourRef/Even.php deleted file mode 100644 index 6b0bd183..00000000 --- a/library/PhpGedcom/Parser/SourRef/Even.php +++ /dev/null @@ -1,57 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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]; - if (isset($record[2])) { - $even = new \PhpGedcom\Record\SourRef\Even(); - $even->setEven(trim($record[2])); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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 f9fed35d..00000000 --- a/library/PhpGedcom/Parser/Subm.php +++ /dev/null @@ -1,104 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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(); - $depth = (int) $record[0]; - if (isset($record[1])) { - $identifier = $parser->normalizeIdentifier($record[1]); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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 = isset($record[2]) ? trim($record[2]) : ''; - $subm->addPhon($phone); - break; - case 'EMAIL': - $email = isset($record[2]) ? trim($record[2]) : ''; - $subm->addEmail($email); - break; - case 'FAX': - $fax = isset($record[2]) ? trim($record[2]) : ''; - $subm->addFax($fax); - break; - case 'WWW': - $www = isset($record[2]) ? trim($record[2]) : ''; - $subm->addWww($www); - 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 b1234827..00000000 --- a/library/PhpGedcom/Parser/Subn.php +++ /dev/null @@ -1,89 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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(); - $depth = (int) $record[0]; - if (isset($record[1])) { - $identifier = $parser->normalizeIdentifier($record[1]); - } else { - $parser->skipToNextLevel($depth); - - return null; - } - - $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; - case 'NOTE': - $note = \PhpGedcom\Parser\NoteRef::parse($parser); - if ($note) { - $subn->addNote($note); - } - break; - case 'CHAN': - $chan = \PhpGedcom\Parser\Chan::parse($parser); - $subn->setChan($chan); - 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 1a28d803..00000000 --- a/library/PhpGedcom/Record.php +++ /dev/null @@ -1,107 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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)) { - throw new \Exception('Incorrect arguments to '.$method); - } - - if (!isset($args[0])) { - // Argument can be empty since we trim it's value - return; - } - - 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)) { - throw new \Exception('Incorrect arguments to '.$method); - } - - if (!isset($args[0])) { - // Argument can be empty since we trim it's value - return; - } - - if (is_object($args[0])) { - // Type safety? - } - - $this->{'_'.$arr} = $args[0]; - - return $this; - } elseif (substr($method, 0, 3) == 'get') { - $arr = strtolower(substr($method, 3)); - - // hotfix getData - if ('data' == $arr) { - if (!property_exists($this, '_text')) { - throw new \Exception('Unknown '.get_class($this).'::'.$arr); - } - - return $this->{'_text'}; - } - - 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 c4ffab3e..00000000 --- a/library/PhpGedcom/Record/Addr.php +++ /dev/null @@ -1,198 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Addr. - */ -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 5f60f008..00000000 --- a/library/PhpGedcom/Record/Caln.php +++ /dev/null @@ -1,73 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Caln. - */ -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 88f0be0d..00000000 --- a/library/PhpGedcom/Record/Chan.php +++ /dev/null @@ -1,98 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Chan. - */ -class Chan extends Record -{ - /** - * @var string - */ - protected $date; - - /** - * @var string - */ - protected $time; - - /** - * @var array - */ - protected $note = []; - - /** - * @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($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 92f67b36..00000000 --- a/library/PhpGedcom/Record/Data.php +++ /dev/null @@ -1,73 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Data. - */ -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/Date.php b/library/PhpGedcom/Record/Date.php deleted file mode 100644 index 7ee5da98..00000000 --- a/library/PhpGedcom/Record/Date.php +++ /dev/null @@ -1,133 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Date. - */ -class Date extends Record -{ - /** - * @var string - */ - protected $date = null; - - /** - * @var array - */ - private $months = [ - 'JAN' => 1, 'FEB' => 2, 'MAR' => 3, 'APR' => 4, 'MAY' => 5, 'JUN' => 6, - 'JUL' => 7, 'AUG' => 8, 'SEP' => 9, 'OCT' => 10, 'NOV' => 11, 'DEC' => 12, - ]; - - /** - * @param string $date Date array - * - * @return Date - */ - public function setDate($date) - { - $this->date = $date; - - return $this; - } - - /** - * @return null|string - */ - public function getDate() - { - return $this->date; - } - - /** - * Return month part of date. - * - * @return int|null - */ - public function getMonth() - { - $record = explode(' ', $this->date); - if (count($record) > 0) { - if ($this->isPrefix($record[0])) { - unset($record[0]); - } - foreach ($record as $part) { - if (isset($this->months[trim($part)])) { - return $this->months[trim($part)]; - } - } - } - - return null; - } - - /** - * Return year part of date. - * - * @return int|null - */ - public function getYear() - { - $record = explode(' ', $this->date); - if (count($record) > 0) { - if ($this->isPrefix($record[0])) { - unset($record[0]); - } - if (count($record) > 0) { - return (int) end($record); - } - } - - return null; - } - - /** - * Return day part of date. - * - * @return int|null - */ - public function getDay() - { - $record = explode(' ', $this->date); - if (!empty($record[0])) { - if ($this->isPrefix($record[0])) { - unset($record[0]); - } - if (count($record) > 0) { - $day = (int) reset($record); - if ($day >= 1 && $day <= 31) { - return $day; - } - } - } - - return null; - } - - /** - * Check if the first part is a prefix (eg 'BEF', 'ABT',). - * - * @param string $datePart Date part to be checked - * - * @return bool - */ - private function isPrefix($datePart) - { - return in_array($datePart, ['FROM', 'TO', 'BEF', 'AFT', 'BET', 'AND', 'ABT', 'EST', 'CAL', 'INT']); - } -} diff --git a/library/PhpGedcom/Record/Fam.php b/library/PhpGedcom/Record/Fam.php deleted file mode 100644 index df6d07cd..00000000 --- a/library/PhpGedcom/Record/Fam.php +++ /dev/null @@ -1,96 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -class Fam extends \PhpGedcom\Record implements Noteable, Sourceable, Objectable -{ - protected $_id = null; - - protected $_resn = null; - - protected $_even = []; - - protected $_husb = null; - - protected $_wife = null; - - protected $_chil = []; - - protected $_nchi = null; - - protected $_subm = []; - - protected $_slgs = []; - - protected $_refn = []; - - protected $_rin = null; - - protected $_chan = null; - - protected $_note = []; - - protected $_sour = []; - - protected $_obje = []; - - public function addEven($even) - { - $this->_even[$even->getType()] = $even; - } - - /** - * @return array - */ - public function getAllEven() - { - return $this->_even; - } - - /** - * @return void|\PhpGedcom\Record\Fam\Even - */ - public function getEven($key = '') - { - if (isset($this->_even[strtoupper($key)])) { - return $this->_even[strtoupper($key)]; - } - } - - public function addSlgs($slgs = []) - { - $this->_slgs[] = $slgs; - } - - public function addRefn($refn = []) - { - $this->_refn[] = $refn; - } - - public function addNote($note = []) - { - $this->_note[] = $note; - } - - public function addSour($sour = []) - { - $this->_sour[] = $sour; - } - - public function addObje($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 323930d0..00000000 --- a/library/PhpGedcom/Record/Fam/Anul.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 b1a2be54..00000000 --- a/library/PhpGedcom/Record/Fam/Cens.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 1b9050d1..00000000 --- a/library/PhpGedcom/Record/Fam/Div.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 e8659e8e..00000000 --- a/library/PhpGedcom/Record/Fam/Enga.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 9e9d3c5f..00000000 --- a/library/PhpGedcom/Record/Fam/Even.php +++ /dev/null @@ -1,70 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Fam; - -use PhpGedcom\Record\Noteable; -use PhpGedcom\Record\Objectable; -use PhpGedcom\Record\Sourceable; - -/** - * Event record. - * - * @method mixed getType() - * @method \PhpGedcom\Record\Date getDate() - * @method string getPlac() - */ -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 = []; - - protected $_agnc = null; - - protected $_husb = null; - protected $_wife = null; - - protected $_obje = []; - - protected $_sour = []; - - protected $_note = []; - - public function addPhon($phon = []) - { - $this->_phon[] = $phon; - } - - public function addObje($obje = []) - { - $this->_obje[] = $obje; - } - - public function addSour($sour = []) - { - $this->_sour[] = $sour; - } - - public function addNote($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 53ed7afa..00000000 --- a/library/PhpGedcom/Record/Fam/Even/Husb.php +++ /dev/null @@ -1,20 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 d0c97d3d..00000000 --- a/library/PhpGedcom/Record/Fam/Even/Wife.php +++ /dev/null @@ -1,20 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 cf31a8ca..00000000 --- a/library/PhpGedcom/Record/Fam/Marb.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 ba6f178a..00000000 --- a/library/PhpGedcom/Record/Fam/Marc.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 6e2bc342..00000000 --- a/library/PhpGedcom/Record/Fam/Marl.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 0bfaa559..00000000 --- a/library/PhpGedcom/Record/Fam/Marr.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 7a8359d9..00000000 --- a/library/PhpGedcom/Record/Fam/Mars.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 89da9353..00000000 --- a/library/PhpGedcom/Record/Fam/Slgs.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Fam; - -use PhpGedcom\Record\Noteable; -use PhpGedcom\Record\Sourceable; - -class Slgs extends \PhpGedcom\Record implements Sourceable, Noteable -{ - protected $_stat; - protected $_date; - protected $_plac; - protected $_temp; - - protected $_sour = []; - - protected $_note = []; - - public function addSour($sour = []) - { - $this->_sour[] = $sour; - } - - public function addNote($note = []) - { - $this->_note[] = $note; - } -} diff --git a/library/PhpGedcom/Record/Fam/Slgs/Stat.php b/library/PhpGedcom/Record/Fam/Slgs/Stat.php deleted file mode 100644 index 0db8baa4..00000000 --- a/library/PhpGedcom/Record/Fam/Slgs/Stat.php +++ /dev/null @@ -1,29 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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($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($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($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($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($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 4e7e44cc..00000000 --- a/library/PhpGedcom/Record/Head/Char.php +++ /dev/null @@ -1,21 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 ca4570e4..00000000 --- a/library/PhpGedcom/Record/Head/Date.php +++ /dev/null @@ -1,21 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 a696326c..00000000 --- a/library/PhpGedcom/Record/Head/Gedc.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Head; - -class Gedc extends \PhpGedcom\Record -{ - protected $_vers = null; - - protected $_form = null; - - /** - * @return Gedc/version - */ - public function getVersion() - { - return $this->_vers; - } - - /** - * @param Gedc/version - */ - public function setVersion($vers = []) - { - $this->_vers = $vers; - } - - /** - * @return Gedc/form - */ - public function getForm() - { - return $this->_form; - } - - /** - * @param Gedc/version - */ - public function setForm($form = []) - { - $this->_form = $form; - } -} diff --git a/library/PhpGedcom/Record/Head/Plac.php b/library/PhpGedcom/Record/Head/Plac.php deleted file mode 100644 index e2b28f92..00000000 --- a/library/PhpGedcom/Record/Head/Plac.php +++ /dev/null @@ -1,20 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 8c0dc638..00000000 --- a/library/PhpGedcom/Record/Head/Sour.php +++ /dev/null @@ -1,92 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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($corp = []) - { - $this->_corp = $corp; - } - - /** - * @return Sour\Corp - */ - public function getCorp() - { - return $this->_corp; - } - - /** - * @param \PhpGedcom\Record\Head\Sour\Data $data - */ - public function setData($data = []) - { - $this->_data = $data; - } - - /** - * @return \PhpGedcom\Record\Head\Sour\Data - */ - public function getData() - { - return $this->_data; - } - - /** - * @return Sour\Name - */ - public function getName() - { - return $this->_name; - } - - /** - * @param Sour\Name - */ - public function setName($name = []) - { - $this->_name = $name; - } - - /** - * @return Sour\Version - */ - public function getVersion() - { - return $this->_vers; - } - - /** - * @param Sour\Version - */ - public function setVersion($version = []) - { - $this->_vers = $version; - } -} diff --git a/library/PhpGedcom/Record/Head/Sour/Corp.php b/library/PhpGedcom/Record/Head/Sour/Corp.php deleted file mode 100644 index 3011112b..00000000 --- a/library/PhpGedcom/Record/Head/Sour/Corp.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 = []; - - 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 7ab7e0ea..00000000 --- a/library/PhpGedcom/Record/Head/Sour/Data.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 220f4527..00000000 --- a/library/PhpGedcom/Record/Indi.php +++ /dev/null @@ -1,740 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Indi. - */ -class Indi extends Record implements Noteable, Objectable, Sourceable -{ - /** - * @var string - */ - protected $id; - - /** - * @var string - */ - protected $uid; - - /** - * @var string - */ - protected $resn; - /** - * @var Indi\Name[] - */ - protected $name = []; - /** - * @var string - */ - protected $sex; - - /** - * @var Indi\Even[] - */ - protected $even = []; - /** - * @var Indi\Attr[] - */ - protected $attr = []; - /** - * @var Indi\Bapl - */ - protected $bapl = []; - - /** - * @var Indi\Conl - */ - protected $conl = []; - - /** - * @var Indi\Endl - */ - protected $endl = []; - - /** - * @var Indi\Slgc - */ - protected $slgc = []; - - /** - * @var Indi\Famc[] - */ - protected $famc = []; - /** - * @var Indi\Fams[] - */ - protected $fams = []; - /** - * @var string[] - */ - protected $subm = []; - /** - * @var string[] - */ - protected $alia = []; - /** - * @var string[] - */ - protected $anci = []; - /** - * @var string[] - */ - protected $desi = []; - /** - * @var string - */ - protected $rfn; - /** - * @var string - */ - protected $afn; - /** - * @var Refn[] - */ - protected $refn = []; - /** - * @var string - */ - protected $rin; - - /** - * @var string - */ - protected $chan; - - /** - * @var Indi\Note[] - */ - protected $note = []; - - /** - * @var Obje[] - */ - protected $obje = []; - - /** - * @var Sour[] - */ - protected $sour = []; - - /** - * @var Indi\Asso[] - */ - protected $asso = []; - - /** - * @param string $id - * - * @return Indi - */ - public function setId($id = '') - { - $this->id = $id; - - return $this; - } - - /** - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * @param string $uid - * - * @return Indi - */ - public function setUid($uid = '') - { - $this->uid = $uid; - - return $this; - } - - /** - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * @param Indi\Name $name - * - * @return Indi - */ - public function addName($name = []) - { - $this->name[] = $name; - - return $this; - } - - /** - * @return Indi\Name[] - */ - public function getName() - { - return $this->name; - } - - /** - * @param Indi\Attr $attr - * - * @return Indi - */ - public function addAttr($attr = []) - { - $attrName = $attr->getType(); - - if (!array_key_exists($attrName, $this->attr)) { - $this->attr[$attrName] = []; - } - - $this->attr[$attrName][] = $attr; - - return $this; - } - - /** - * @return Indi\Attr[] - */ - public function getAllAttr() - { - return $this->attr; - } - - /** - * @return Indi\Attr[] - */ - public function getAttr($key = '') - { - if (isset($this->attr[strtoupper($key)])) { - return $this->attr[strtoupper($key)]; - } - } - - /** - * @param Indi\Even $even - * - * @return Indi - */ - public function addEven($even = []) - { - $evenName = $even->getType(); - - if (!array_key_exists($evenName, $this->even)) { - $this->even[$evenName] = []; - } - - $this->even[$evenName][] = $even; - - return $this; - } - - /** - * @return array - */ - public function getAllEven() - { - return $this->even; - } - - /** - * @return array - */ - public function getEven($key = '') - { - if (isset($this->even[strtoupper($key)])) { - return $this->even[strtoupper($key)]; - } - } - - /** - * @param Indi\Asso $asso - * - * @return Indi - */ - public function addAsso($asso = []) - { - $this->asso[] = $asso; - - return $this; - } - - /** - * @return array - */ - public function getAsso() - { - return $this->asso; - } - - /** - * @param Refn $ref - * - * @return Indi - */ - public function addRefn($ref = []) - { - $this->refn[] = $ref; - - return $this; - } - - /** - * @return Refn[] - */ - public function getRefn() - { - return $this->refn; - } - - /** - * @param \PhpGedcom\Record\NoteRef $note - * - * @return Indi - */ - public function addNote($note = []) - { - $this->note[] = $note; - - return $this; - } - - /** - * @return array - */ - public function getNote() - { - return $this->note; - } - - /** - * @param ObjeRef $obje - * - * @return Indi - */ - public function addObje($obje = []) - { - $this->obje[] = $obje; - - return $this; - } - - /** - * @return array - */ - public function getObje() - { - return $this->obje; - } - - /** - * @param SourRef $sour - * - * @return Indi - */ - public function addSour($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($famc = []) - { - $this->famc[] = $famc; - - return $this; - } - - /** - * @return array - */ - public function getFamc() - { - return $this->famc; - } - - /** - * @param Indi\Fams $fams - * - * @return Indi - */ - public function addFams($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 string[] - */ - public function getAnci() - { - return $this->anci; - } - - /** - * @param string $subm - * - * @return Indi - */ - public function addDesi($subm = '') - { - $this->desi[] = $subm; - - return $this; - } - - /** - * @return string[] - */ - public function getDesi() - { - return $this->desi; - } - - /** - * @param string $subm - * - * @return Indi - */ - public function addSubm($subm = '') - { - $this->subm[] = $subm; - - return $this; - } - - /** - * @return string[] - */ - 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 = null) - { - $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($bapl = []) - { - $this->bapl = $bapl; - - return $this; - } - - /** - * @param Indi\Bapl $bapl - * - * @return Indi - */ - public function addBapl($bapl = null) - { - $this->bapl[] = $bapl; - - return $this; - } - - /** - * @return Indi\Bapl - */ - public function getBapl() - { - return $this->bapl; - } - - /** - * @param Indi\Conl $conl - * - * @return Indi - */ - public function setConl($conl = []) - { - $this->conl = $conl; - - return $this; - } - - /** - * @param Indi\Conl $conl - * - * @return Indi - */ - public function addConl($conl) - { - $this->conl[] = $conl; - - return $this; - } - - /** - * @return Indi\Conl - */ - public function getConl() - { - return $this->conl; - } - - /** - * @param Indi\Endl $endl - * - * @return Indi - */ - public function setEndl($endl = []) - { - $this->endl = $endl; - - return $this; - } - - /** - * @param Indi\Endl $endl - * - * @return Indi - */ - public function addEndl($endl) - { - $this->endl[] = $endl; - - return $this; - } - - /** - * @return Indi\Endl - */ - public function getEndl() - { - return $this->endl; - } - - /** - * @param Indi\Slgc $slgc - * - * @return Indi - */ - public function setSlgc($slgc = []) - { - $this->slgc = $slgc; - - return $this; - } - - /** - * @param Indi\Slgc $slgc - * - * @return Indi - */ - public function addSlgc($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 7fa2d5d6..00000000 --- a/library/PhpGedcom/Record/Indi/Adop.php +++ /dev/null @@ -1,21 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 4e341ee8..00000000 --- a/library/PhpGedcom/Record/Indi/Asso.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -use PhpGedcom\Record\Noteable; -use PhpGedcom\Record\Sourceable; - -class Asso extends \PhpGedcom\Record implements Sourceable, Noteable -{ - protected $_indi = null; - protected $_rela = null; - - protected $_note = []; - - protected $_sour = []; - - public function addNote($note = []) - { - $this->_note[] = $note; - } - - public function addSour($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 f7d18c7c..00000000 --- a/library/PhpGedcom/Record/Indi/Attr.php +++ /dev/null @@ -1,46 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -use PhpGedcom\Record\Noteable; -use PhpGedcom\Record\Objectable; -use PhpGedcom\Record\Sourceable; - -class Attr extends \PhpGedcom\Record\Indi\Even implements Sourceable, Noteable, Objectable -{ - protected $type = null; - protected $_attr = null; - - protected $sour = []; - - protected $note = []; - - protected $obje = []; - - public function addSour($sour = []) - { - $this->sour[] = $sour; - } - - public function addNote($note = []) - { - $this->note[] = $note; - } - - public function addObje($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 cb0421de..00000000 --- a/library/PhpGedcom/Record/Indi/Bapl.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 3c9bc0e9..00000000 --- a/library/PhpGedcom/Record/Indi/Bapm.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 ba0ff3d7..00000000 --- a/library/PhpGedcom/Record/Indi/Barm.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 0d89e7ac..00000000 --- a/library/PhpGedcom/Record/Indi/Basm.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 287f7f50..00000000 --- a/library/PhpGedcom/Record/Indi/Birt.php +++ /dev/null @@ -1,46 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * Class Birt. - */ -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 8ff5c10c..00000000 --- a/library/PhpGedcom/Record/Indi/Bles.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 ace72a8e..00000000 --- a/library/PhpGedcom/Record/Indi/Buri.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 6231be9b..00000000 --- a/library/PhpGedcom/Record/Indi/Cast.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 de8c8d27..00000000 --- a/library/PhpGedcom/Record/Indi/Cens.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 f272eb0d..00000000 --- a/library/PhpGedcom/Record/Indi/Chr.php +++ /dev/null @@ -1,20 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 1e0f0258..00000000 --- a/library/PhpGedcom/Record/Indi/Chra.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 e351e043..00000000 --- a/library/PhpGedcom/Record/Indi/Conf.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 82b28119..00000000 --- a/library/PhpGedcom/Record/Indi/Conl.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 34260e01..00000000 --- a/library/PhpGedcom/Record/Indi/Crem.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 64e5b713..00000000 --- a/library/PhpGedcom/Record/Indi/Deat.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 5cdad437..00000000 --- a/library/PhpGedcom/Record/Indi/Dscr.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 15a943d9..00000000 --- a/library/PhpGedcom/Record/Indi/Educ.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 0472bfc0..00000000 --- a/library/PhpGedcom/Record/Indi/Emig.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 6a329f9a..00000000 --- a/library/PhpGedcom/Record/Indi/Endl.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 f22bd10f..00000000 --- a/library/PhpGedcom/Record/Indi/Even.php +++ /dev/null @@ -1,353 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -use PhpGedcom\Record; - -/** - * Class Even. - */ -class Even extends Record implements Record\Objectable, Record\Sourceable, Record\Noteable -{ - /** - * @var string - */ - protected $type; - - /** - * @var string - */ - protected $_attr; - - /** - * @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 = []; - - /** - * @var string - */ - protected $agnc; - - /** - * @var array - */ - public $ref = []; - - /** - * @var array - */ - protected $obje = []; - - /** - * @var array - */ - protected $sour = []; - - /** - * @var array - */ - protected $note = []; - - /** - * @var Record\Chan - */ - protected $chan; - - /** - * @return array - */ - public function getPhon() - { - return $this->phon; - } - - /** - * @param Record\Phon $phon - * - * @return Even - */ - public function addPhon($phon = []) - { - $this->phon[] = $phon; - - return $this; - } - - /** - * @return array - */ - public function getObje() - { - return $this->obje; - } - - /** - * @param Record\ObjeRef $obje - * - * @return Even - */ - public function addObje($obje = []) - { - $this->obje[] = $obje; - - return $this; - } - - /** - * @return array - */ - public function getSour() - { - return $this->sour; - } - - /** - * @param Record\SourRef $sour - * - * @return Even - */ - public function addSour($sour = []) - { - $this->sour[] = $sour; - - return $this; - } - - /** - * @return array - */ - public function getNote() - { - return $this->note; - } - - /** - * @param Record\NoteRef $note - * - * @return Even - */ - public function addNote($note = []) - { - $this->note[] = $note; - - return $this; - } - - /** - * @param \PhpGedcom\Record\Addr $addr - * - * @return Even - */ - public function setAddr($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($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 df54c4b7..00000000 --- a/library/PhpGedcom/Record/Indi/Even/Plac.php +++ /dev/null @@ -1,123 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi\Even; - -use PhpGedcom\Record; - -/** - * Class Plac. - */ -class Plac extends Record implements Record\Noteable, Record\Sourceable -{ - /** - * @var string - */ - protected $plac; - - /** - * @var string - */ - protected $form; - - /** - * @var array - */ - protected $note = []; - - /** - * @var array - */ - protected $sour = []; - - /** - * @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($note = []) - { - $this->note[] = $note; - - return $this; - } - - /** - * @return array - */ - public function getSour() - { - return $this->sour; - } - - /** - * @param Record\SourRef $sour - * - * @return Plac - */ - public function addSour($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 f615069e..00000000 --- a/library/PhpGedcom/Record/Indi/Famc.php +++ /dev/null @@ -1,30 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 = []; - - public function addNote($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 f0a6a0dc..00000000 --- a/library/PhpGedcom/Record/Indi/Fams.php +++ /dev/null @@ -1,29 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 = []; - - public function addNote($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 81c0f83d..00000000 --- a/library/PhpGedcom/Record/Indi/Fcom.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 a54ea19c..00000000 --- a/library/PhpGedcom/Record/Indi/Grad.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 c10615de..00000000 --- a/library/PhpGedcom/Record/Indi/Idno.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 cad6fd09..00000000 --- a/library/PhpGedcom/Record/Indi/Immi.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 03479107..00000000 --- a/library/PhpGedcom/Record/Indi/Lds.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -use PhpGedcom\Record\Noteable; -use PhpGedcom\Record\Sourceable; - -abstract class Lds extends \PhpGedcom\Record implements Sourceable, Noteable -{ - protected $_stat; - protected $_date; - protected $_plac; - protected $_temp; - - protected $_sour = []; - - protected $_note = []; - - public function addSour($sour = []) - { - $this->_sour[] = $sour; - } - - public function addNote($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 dfeec6de..00000000 --- a/library/PhpGedcom/Record/Indi/Name.php +++ /dev/null @@ -1,52 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi; - -/** - * @method string getName() - * @method string getNpfx() - * @method string getGivn() - * @method string getNick() - * @method string getSpfx() - * @method string getSurn() - * @method string getNsfx() - */ -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 $_fone = null; // PhpGedcom/ - protected $_romn = null; - protected $_type = null; - - protected $_note = []; - - protected $_sour = []; - - public function addSour($sour = []) - { - $this->_sour[] = $sour; - } - - public function addNote($note = []) - { - $this->_note[] = $note; - } -} diff --git a/library/PhpGedcom/Record/Indi/Name/Fone.php b/library/PhpGedcom/Record/Indi/Name/Fone.php deleted file mode 100644 index 53916383..00000000 --- a/library/PhpGedcom/Record/Indi/Name/Fone.php +++ /dev/null @@ -1,77 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi\Name; - -use PhpGedcom\Record; - -/** - * Class Refn. - */ -class Fone extends Record -{ - /** - * @var string phonetic_variation - */ - protected $fone; - - /** - * @var string phonetic_type - */ - protected $type; - /** - * string name_piece_prefix. - */ - protected $_npfx = null; - /** - * string name_piece_given. - */ - protected $_givn = null; - /** - * string name_piece_nickname. - */ - protected $_nick = null; - /** - * strign name_piece_surname_prefix. - */ - protected $_spfx = null; - /** - * string name_piece_surname. - */ - protected $_surn = null; - /** - * string name_piece_suffix. - */ - protected $_nsfx = null; - - /** - * PhpGedcom\Record\NoteRef. - */ - protected $_note = []; - - /** - * PhpGedcom\Record\SourRef. - */ - protected $_sour = []; - - public function addSour($sour = []) - { - $this->_sour[] = $sour; - } - - public function addNote($note = []) - { - $this->_note[] = $note; - } -} diff --git a/library/PhpGedcom/Record/Indi/Name/Romn.php b/library/PhpGedcom/Record/Indi/Name/Romn.php deleted file mode 100644 index 0e079b6b..00000000 --- a/library/PhpGedcom/Record/Indi/Name/Romn.php +++ /dev/null @@ -1,77 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Indi\Name; - -use PhpGedcom\Record; - -/** - * Class Refn. - */ -class Romn extends Record -{ - /** - * @var string romanized_variation - */ - protected $romn; - - /** - * @var string romanized_type - */ - protected $type; - /** - * string name_piece_prefix. - */ - protected $_npfx = null; - /** - * string name_piece_given. - */ - protected $_givn = null; - /** - * string name_piece_nickname. - */ - protected $_nick = null; - /** - * strign name_piece_surname_prefix. - */ - protected $_spfx = null; - /** - * string name_piece_surname. - */ - protected $_surn = null; - /** - * string name_piece_suffix. - */ - protected $_nsfx = null; - - /** - * PhpGedcom\Record\NoteRef. - */ - protected $_note = []; - - /** - * PhpGedcom\Record\SourRef. - */ - protected $_sour = []; - - public function addSour($sour = []) - { - $this->_sour[] = $sour; - } - - public function addNote($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 77bd569f..00000000 --- a/library/PhpGedcom/Record/Indi/Nati.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 abb8e5dc..00000000 --- a/library/PhpGedcom/Record/Indi/Natu.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 94d7f0ee..00000000 --- a/library/PhpGedcom/Record/Indi/Nchi.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 bdb801f4..00000000 --- a/library/PhpGedcom/Record/Indi/Nmr.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 5b426ac5..00000000 --- a/library/PhpGedcom/Record/Indi/Note.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 b21b6376..00000000 --- a/library/PhpGedcom/Record/Indi/Occu.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 8aa39890..00000000 --- a/library/PhpGedcom/Record/Indi/Ordn.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 0236f8f4..00000000 --- a/library/PhpGedcom/Record/Indi/Prob.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 99099eb1..00000000 --- a/library/PhpGedcom/Record/Indi/Prop.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 26b4aee7..00000000 --- a/library/PhpGedcom/Record/Indi/Reli.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 e39692d5..00000000 --- a/library/PhpGedcom/Record/Indi/Resi.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 99fd4d13..00000000 --- a/library/PhpGedcom/Record/Indi/Reti.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 467346fb..00000000 --- a/library/PhpGedcom/Record/Indi/Slgc.php +++ /dev/null @@ -1,20 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 fa0c8351..00000000 --- a/library/PhpGedcom/Record/Indi/Ssn.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 9ce05b07..00000000 --- a/library/PhpGedcom/Record/Indi/Titl.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 fc8f7bbd..00000000 --- a/library/PhpGedcom/Record/Indi/Will.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 26df6ea0..00000000 --- a/library/PhpGedcom/Record/Note.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -class Note extends \PhpGedcom\Record implements Sourceable -{ - protected $_id = null; - protected $_note = null; - - protected $_even = null; - protected $_refn = []; - protected $_rin = null; - - protected $_sour = []; - protected $_chan = null; - - public function addRefn($refn = []) - { - $this->_refn[] = $refn; - } - - public function addSour($sour = []) - { - $this->_sour[] = $sour; - } -} diff --git a/library/PhpGedcom/Record/NoteRef.php b/library/PhpGedcom/Record/NoteRef.php deleted file mode 100644 index caf2f9e7..00000000 --- a/library/PhpGedcom/Record/NoteRef.php +++ /dev/null @@ -1,39 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -class NoteRef extends \PhpGedcom\Record implements Sourceable -{ - protected $_isRef = false; - - protected $_note = ''; - - protected $_sour = []; - - public function setIsReference($isReference = true) - { - $this->_isRef = $isReference; - } - - public function getIsReference() - { - return $this->_isRef; - } - - public function addSour($sour = []) - { - $this->_sour[] = $sour; - } -} diff --git a/library/PhpGedcom/Record/Noteable.php b/library/PhpGedcom/Record/Noteable.php deleted file mode 100644 index acc21f9a..00000000 --- a/library/PhpGedcom/Record/Noteable.php +++ /dev/null @@ -1,20 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -interface Noteable -{ - public function addNote($note = []); -} diff --git a/library/PhpGedcom/Record/Obje.php b/library/PhpGedcom/Record/Obje.php deleted file mode 100644 index 196764df..00000000 --- a/library/PhpGedcom/Record/Obje.php +++ /dev/null @@ -1,50 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -class Obje extends \PhpGedcom\Record implements Noteable -{ - protected $_id = null; - - protected $_file = []; - protected $_rin = null; - protected $_chan = null; - - protected $_refn = []; - - protected $_note = []; - - protected $_sour = []; - - public function addRefn($refn = []) - { - $this->_refn[] = $refn; - } - - public function addNote($note = []) - { - $this->_note[] = $note; - } - - public function addFile($file) - { - $this->_file[] = $file; - } - - public function addSour($sour) - { - $this->_sour[] = $sour; - } -} diff --git a/library/PhpGedcom/Record/ObjeRef.php b/library/PhpGedcom/Record/ObjeRef.php deleted file mode 100644 index 859bacf4..00000000 --- a/library/PhpGedcom/Record/ObjeRef.php +++ /dev/null @@ -1,36 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -class ObjeRef extends \PhpGedcom\Record -{ - protected $_isRef = false; - - protected $_obje = null; - - protected $_titl = null; - - protected $_file = null; - - public function setIsReference($isReference = true) - { - $this->_isRef = $isReference; - } - - public function getIsReference() - { - return $this->_isRef; - } -} diff --git a/library/PhpGedcom/Record/ObjeRef/File.php b/library/PhpGedcom/Record/ObjeRef/File.php deleted file mode 100644 index 2db2e6d9..00000000 --- a/library/PhpGedcom/Record/ObjeRef/File.php +++ /dev/null @@ -1,35 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\ObjeRef; - -use PhpGedcom\Record; - -/** - * Class Refn. - */ -class File extends Record -{ - /** - * @var string multimedia_file_refn - */ - protected $_file; - - /** - * @var PhpGedcom\Record\ObjeRef\File\Form - */ - protected $_form; - protected $_titl; - protected $_date; -} diff --git a/library/PhpGedcom/Record/ObjeRef/File/Form.php b/library/PhpGedcom/Record/ObjeRef/File/Form.php deleted file mode 100644 index 4f8cd973..00000000 --- a/library/PhpGedcom/Record/ObjeRef/File/Form.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\ObjeRef\File; - -use PhpGedcom\Record; - -/** - * Class Refn. - */ -class Form extends Record -{ - /** - * @var string multimedia_format - */ - protected $_form; - - /** - * @var string source_media_type - * for only obje - */ - protected $_type; - - /** - * @var string source_media_type - * for only objeref - */ - protected $_medi; -} diff --git a/library/PhpGedcom/Record/Objectable.php b/library/PhpGedcom/Record/Objectable.php deleted file mode 100644 index 05390358..00000000 --- a/library/PhpGedcom/Record/Objectable.php +++ /dev/null @@ -1,20 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -interface Objectable -{ - public function addObje($obje = []); -} diff --git a/library/PhpGedcom/Record/Phon.php b/library/PhpGedcom/Record/Phon.php deleted file mode 100644 index 2079adda..00000000 --- a/library/PhpGedcom/Record/Phon.php +++ /dev/null @@ -1,48 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Phon. - */ -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/Plac.php b/library/PhpGedcom/Record/Plac.php deleted file mode 100644 index 5c7e2085..00000000 --- a/library/PhpGedcom/Record/Plac.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -class Plac extends \PhpGedcom\Record implements Noteable -{ - /** - * string plac. - */ - protected $_plac = null; - /** - * string place_hierarchy. - */ - protected $_form = null; - /** - * array PhpGedcom\Record\Plac\Fone. - */ - protected $_fone = null; - /** - * array PhpGedcom\Record\Plac\Romn. - */ - protected $_romn = null; - /** - * PhpGedcom\Record\Plac\Map. - */ - protected $_map = null; - /** - * array PhpGedcom\Record\NoteRef. - */ - protected $_note = null; - - /** - * @param PhpGedcom\Record\NoteRef $note - * - * @return Plac - */ - public function addNote($note = null) - { - $this->_note[] = $note; - - return $this; - } -} diff --git a/library/PhpGedcom/Record/Plac/Fone.php b/library/PhpGedcom/Record/Plac/Fone.php deleted file mode 100644 index cdd0eb09..00000000 --- a/library/PhpGedcom/Record/Plac/Fone.php +++ /dev/null @@ -1,33 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Plac; - -use PhpGedcom\Record; - -/** - * Class Refn. - */ -class Fone extends Record -{ - /** - * @var string phonetic_variation - */ - protected $_fone; - - /** - * @var string phonetic_type - */ - protected $_type; -} diff --git a/library/PhpGedcom/Record/Plac/Map.php b/library/PhpGedcom/Record/Plac/Map.php deleted file mode 100644 index c1395c00..00000000 --- a/library/PhpGedcom/Record/Plac/Map.php +++ /dev/null @@ -1,33 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Plac; - -use PhpGedcom\Record; - -/** - * Class Refn. - */ -class Map extends Record -{ - /** - * @var string place_latitude - */ - protected $_lati; - - /** - * @var string place_longitude - */ - protected $_long; -} diff --git a/library/PhpGedcom/Record/Plac/Romn.php b/library/PhpGedcom/Record/Plac/Romn.php deleted file mode 100644 index d49fbbee..00000000 --- a/library/PhpGedcom/Record/Plac/Romn.php +++ /dev/null @@ -1,33 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Plac; - -use PhpGedcom\Record; - -/** - * Class Refn. - */ -class Romn extends Record -{ - /** - * @var string romanized_variation - */ - protected $romn; - - /** - * @var string romanized_type - */ - protected $type; -} diff --git a/library/PhpGedcom/Record/Refn.php b/library/PhpGedcom/Record/Refn.php deleted file mode 100644 index b25ea352..00000000 --- a/library/PhpGedcom/Record/Refn.php +++ /dev/null @@ -1,73 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Refn. - */ -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 68b3aa0b..00000000 --- a/library/PhpGedcom/Record/Repo.php +++ /dev/null @@ -1,303 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Repo. - */ -class Repo extends Record implements Noteable -{ - /** - * @var string - */ - protected $repo; - - /** - * @var string - */ - protected $name; - - /** - * @var Addr - */ - protected $addr; - - /** - * @var array - */ - protected $phon = []; - /** - * @var array - */ - protected $email = []; - /** - * @var array - */ - protected $fax = []; - /** - * @var array - */ - protected $www = []; - /** - * @var string - */ - protected $rin; - - /** - * @var Chan - */ - protected $chan; - - /** - * @var array - */ - protected $refn = []; - - /** - * @var array - */ - protected $note = []; - - /** - * @param null - * - * @return Repo - */ - public function addPhon($phon = null) - { - $this->phon[] = $phon; - - return $this; - } - - /** - * @return array - */ - public function getPhon() - { - return $this->phon; - } - - /** - * @param null - * - * @return Repo - */ - public function addEmail($email = null) - { - $this->email[] = $email; - - return $this; - } - - /** - * @return array - */ - public function getEmail() - { - return $this->email; - } - - /** - * @param null - * - * @return Repo - */ - public function addFax($fax = null) - { - $this->fax[] = $fax; - - return $this; - } - - /** - * @return array - */ - public function getFax() - { - return $this->fax; - } - - /** - * @param null - * - * @return Repo - */ - public function addWww($www = null) - { - $this->www[] = $www; - - return $this; - } - - /** - * @return array - */ - public function getWww() - { - return $this->www; - } - - /** - * @param null|\PhpGedcom\Record\Refn $refn - * - * @return Repo - */ - public function addRefn($refn = null) - { - if (empty($refn)) { - $refn = new \PhpGedcom\Record\Refn(); - } - $this->refn[] = $refn; - - return $this; - } - - /** - * @return array - */ - public function getRefn() - { - return $this->refn; - } - - /** - * @param null|\PhpGedcom\Record\NoteRef $note - * - * @return Repo - */ - public function addNote($note = null) - { - if (empty($node)) { - $note = new \PhpGedcom\Record\NoteRef(); - } - $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 null|\PhpGedcom\Record\Addr $addr - * - * @return Repo - */ - public function setAddr($addr = null) - { - if (empty($addr)) { - $addr = new \PhpGedcom\Record\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 4bdf1d15..00000000 --- a/library/PhpGedcom/Record/RepoRef.php +++ /dev/null @@ -1,29 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -class RepoRef extends \PhpGedcom\Record implements Noteable -{ - protected $_repo = null; - - protected $_caln = []; - - protected $_note = []; - - public function addNote($note = []) - { - $this->_note[] = $note; - } -} diff --git a/library/PhpGedcom/Record/Sour.php b/library/PhpGedcom/Record/Sour.php deleted file mode 100644 index 0a9df348..00000000 --- a/library/PhpGedcom/Record/Sour.php +++ /dev/null @@ -1,348 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Sour. - */ -class Sour extends Record implements Noteable, Objectable -{ - /** - * @var string - */ - protected $sour; - - /** - * @var Data - */ - protected $data; - - /** - * @var string - */ - protected $auth; - - /** - * @var string - */ - protected $titl; - - /** - * @var string - */ - protected $abbr; - - /** - * @var string - */ - protected $publ; - - /** - * @var string - */ - protected $text; - - /** - * @var Repo - */ - protected $repo; - - /** - * @var array - */ - protected $refn = []; - - /** - * @var string - */ - protected $rin; - - /** - * @var Chan - */ - protected $chan; - - /** - * @var array - */ - protected $note = []; - - /** - * @var array - */ - protected $obje = []; - - /** - * @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 = []) - { - $this->refn[] = $refn; - - return $this; - } - - /** - * @return array - */ - public function getRefn() - { - return $this->refn; - } - - /** - * @param NoteRef $note - * - * @return Sour - */ - public function addNote($note = []) - { - $this->note[] = $note; - - return $this; - } - - /** - * @return array - */ - public function getNote() - { - return $this->note; - } - - /** - * @param ObjeRef $obje - * - * @return Sour - */ - public function addObje($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 9c9fdceb..00000000 --- a/library/PhpGedcom/Record/Sour/Data.php +++ /dev/null @@ -1,33 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Sour; - -use PhpGedcom\Record\Noteable; - -class Data extends \PhpGedcom\Record implements Noteable -{ - protected $_even = []; - protected $_agnc = null; - protected $_date = null; - - protected $_text = null; - - protected $_note = []; - - public function addNote($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 9857ce1e..00000000 --- a/library/PhpGedcom/Record/Sour/Data/Even.php +++ /dev/null @@ -1,21 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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/Sour/Repo.php b/library/PhpGedcom/Record/Sour/Repo.php deleted file mode 100644 index af7d01dc..00000000 --- a/library/PhpGedcom/Record/Sour/Repo.php +++ /dev/null @@ -1,41 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Sour; - -use PhpGedcom\Record\Noteable; - -class Repo extends \PhpGedcom\Record implements Noteable -{ - protected $_repo = null; - /** - * array PhpGedcom\Record\Sour\Repo\Caln. - */ - protected $_caln = []; - - /** - * array PhpGedcom\Record\NoteRef. - */ - protected $_note = []; - - public function addNote($note = []) - { - $this->_note[] = $note; - } - - public function addCaln($caln = []) - { - $this->_caln[] = $caln; - } -} diff --git a/library/PhpGedcom/Record/Sour/Repo/Caln.php b/library/PhpGedcom/Record/Sour/Repo/Caln.php deleted file mode 100644 index 7fbbe437..00000000 --- a/library/PhpGedcom/Record/Sour/Repo/Caln.php +++ /dev/null @@ -1,27 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\Sour\Repo; - -class Caln extends \PhpGedcom\Record -{ - /** - * string source_call_number. - */ - protected $_caln = null; - /** - * string source_media_type. - */ - protected $_medi = null; -} diff --git a/library/PhpGedcom/Record/SourRef.php b/library/PhpGedcom/Record/SourRef.php deleted file mode 100644 index 2cdbe43f..00000000 --- a/library/PhpGedcom/Record/SourRef.php +++ /dev/null @@ -1,30 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 = []; - protected $_note = []; -} diff --git a/library/PhpGedcom/Record/SourRef/Data.php b/library/PhpGedcom/Record/SourRef/Data.php deleted file mode 100644 index 51dc0c9b..00000000 --- a/library/PhpGedcom/Record/SourRef/Data.php +++ /dev/null @@ -1,27 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record\SourRef; - -class Data extends \PhpGedcom\Record -{ - /** - * string entry_recording_date. - */ - protected $_date = null; - /** - * string text_from_source. - */ - protected $_text = null; -} diff --git a/library/PhpGedcom/Record/SourRef/Even.php b/library/PhpGedcom/Record/SourRef/Even.php deleted file mode 100644 index ddf9ac3f..00000000 --- a/library/PhpGedcom/Record/SourRef/Even.php +++ /dev/null @@ -1,21 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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 d130db16..00000000 --- a/library/PhpGedcom/Record/Sourceable.php +++ /dev/null @@ -1,20 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -interface Sourceable -{ - public function addSour($sour = []); -} diff --git a/library/PhpGedcom/Record/Subm.php b/library/PhpGedcom/Record/Subm.php deleted file mode 100644 index beeafe5e..00000000 --- a/library/PhpGedcom/Record/Subm.php +++ /dev/null @@ -1,360 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Subm. - */ -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 = []; - - /** - * @var array - */ - protected $phon = []; - - /** - * @var array - */ - protected $email = []; - - /** - * @var array - */ - protected $fax = []; - - /** - * @var array - */ - protected $www = []; - - /** - * @var array - */ - protected $obje = []; - - /** - * @var array - */ - protected $note = []; - - /** - * @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 Record\Phon $phon - * - * @return Subm - */ - public function addPhon($phon = []) - { - $this->phon[] = $phon; - - return $this; - } - - /** - * @return array - */ - public function getEmail() - { - return $this->email; - } - - /** - * @param Record\Phon $phon - * - * @return Subm - */ - public function addEmail($email) - { - $this->email[] = $email; - - return $this; - } - - /** - * @return array - */ - public function getFax() - { - return $this->fax; - } - - /** - * @param Record\Phon $phon - * - * @return Subm - */ - public function addFax($fax) - { - $this->fax[] = $fax; - - return $this; - } - - /** - * @return array - */ - public function getWww() - { - return $this->www; - } - - /** - * @param Record\Phon $phon - * - * @return Subm - */ - public function addWww($www) - { - $this->www[] = $www; - - return $this; - } - - /** - * @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; - } - - /** - * @return Addr - */ - public function getAddr() - { - return $this->addr; - } - - /** - * @param Addr $addr - * - * @return Subm - */ - public function setAddr($addr = []) - { - $this->addr = $addr; - - return $this; - } - - /** - * @return array - */ - public function getObje() - { - return $this->obje; - } - - /** - * @param Record\ObjeRef $obje - * - * @return Subm - */ - public function addObje($obje = []) - { - $this->obje[] = $obje; - - return $this; - } - - /** - * @return array - */ - public function getNote() - { - return $this->note; - } - - /** - * @param Record\Note $note - * - * @return Subm - */ - public function addNote($note = []) - { - $this->note[] = $note; - - return $this; - } -} diff --git a/library/PhpGedcom/Record/Subn.php b/library/PhpGedcom/Record/Subn.php deleted file mode 100644 index cfba4c93..00000000 --- a/library/PhpGedcom/Record/Subn.php +++ /dev/null @@ -1,257 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Record; - -use PhpGedcom\Record; - -/** - * Class Subn. - */ -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; - - /** - * @var array - */ - protected $_note = []; - - /** - * @var \PhpGedcom\Record\Chan - */ - protected $_chan = null; - - public function setChan($chan) - { - $this->_chan = $chan; - - return $this; - } - - public function getChan() - { - return $this->_chan; - } - - public function addNote($note) - { - $this->_note[] = $note; - - return $this; - } - - public function getNote() - { - return $this->_note; - } - - /** - * @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 09bd368d..00000000 --- a/library/PhpGedcom/Writer.php +++ /dev/null @@ -1,128 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom; - -use PhpGedcom\Writer\Fam; -use PhpGedcom\Writer\Head; -use PhpGedcom\Writer\Indi; -use PhpGedcom\Writer\Note; -use PhpGedcom\Writer\Obje; -use PhpGedcom\Writer\Repo; -use PhpGedcom\Writer\Sour; -use PhpGedcom\Writer\Subm; -use PhpGedcom\Writer\Subn; - -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(); - $subn = $gedcom->getSubn(); - $subms = $gedcom->getSubm(); // array() - $sours = $gedcom->getSour(); // array() - $indis = $gedcom->getIndi(); // array() - $fams = $gedcom->getFam(); // array() - $notes = $gedcom->getNote(); // array() - $repos = $gedcom->getRepo(); // array() - $objes = $gedcom->getObje(); // array() - - $output = '0 FORMAT '.$format."\n"; - - // head - if ($head) { - $output = Head::convert($head, $format); - } - - // subn - if ($subn) { - $output .= Subn::convert($subn); - } - - // subms - if (!empty($subms) && count($subms) > 0) { - foreach ($subms as $item) { - if ($item) { - $output .= Subm::convert($item); - } - } - } - - // sours - if (!empty($sours) && count($sours) > 0) { - foreach ($sours as $item) { - if ($item) { - $output .= Sour::convert($item); - } - } - } - - // indis - if (!empty($indis) && count($indis) > 0) { - foreach ($indis as $item) { - if ($item) { - $output .= Indi::convert($item); - } - } - } - - // fams - if (!empty($fams) && count($fams) > 0) { - foreach ($fams as $item) { - if ($item) { - $output .= Fam::convert($item); - } - } - } - // notes - if (!empty($notes) && count($notes) > 0) { - foreach ($notes as $item) { - if ($item) { - $output .= Note::convert($item); - } - } - } - - // repos - if (!empty($repos) && count($repos) > 0) { - foreach ($repos as $item) { - if ($item) { - $output .= Repo::convert($item); - } - } - } - // Objes - if (!empty($objes) && count($objes) > 0) { - foreach ($objes as $item) { - if ($item) { - $output .= Obje::convert($item); - } - } - } - // EOF - $output .= "0 TRLR\n"; - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Addr.php b/library/PhpGedcom/Writer/Addr.php deleted file mode 100644 index 16cf6d68..00000000 --- a/library/PhpGedcom/Writer/Addr.php +++ /dev/null @@ -1,47 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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->getAddr()); - - $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->getAdr2()."\n". - ($level + 1).' CITY '.$addr->getCity()."\n". - ($level + 1).' STAE '.$addr->getStae()."\n". - ($level + 1).' POST '.$addr->getPost()."\n". - ($level + 1).' CTRY '.$addr->getCtry()."\n"; - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Caln.php b/library/PhpGedcom/Writer/Caln.php deleted file mode 100644 index 39212331..00000000 --- a/library/PhpGedcom/Writer/Caln.php +++ /dev/null @@ -1,46 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer; - -class Caln -{ - /** - * @param \PhpGedcom\Record\Caln $note - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Caln &$caln, $level) - { - $output = ''; - $_caln = $caln->getCaln(); - if (empty($_caln)) { - return $output; - } else { - $output .= $level.' CALN '.$_caln."\n"; - } - - // level up - $level++; - - // medi - $medi = $caln->getMedi(); - if (!empty($medi)) { - $output .= $level.' MEDI '.$medi."\n"; - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Chan.php b/library/PhpGedcom/Writer/Chan.php deleted file mode 100644 index ae4a7e29..00000000 --- a/library/PhpGedcom/Writer/Chan.php +++ /dev/null @@ -1,51 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer; - -class Chan -{ - /** - * @param \PhpGedcom\Record\Chan $note - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Chan &$chan, $level) - { - $output = $level." CHAN \n"; - // level up - $level++; - // DATE - $_date = $chan->getDate(); - if (!empty($_date)) { - $output .= $level.' DATE '.$_date."\n"; - } - // TIME - $_time = $chan->getDate(); - if (!empty($_time)) { - $output .= $level.' DATE '.$_time."\n"; - } - // $_note = array() - $_note = $chan->getNote(); - if (!empty($_note) && count($_note) > 0) { - foreach ($_note as $item) { - $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output .= $_convert; - } - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Fam.php b/library/PhpGedcom/Writer/Fam.php deleted file mode 100644 index c9188bc8..00000000 --- a/library/PhpGedcom/Writer/Fam.php +++ /dev/null @@ -1,153 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer; - -class Fam -{ - /** - * @param \PhpGedcom\Record\Fam $sour - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Fam &$fam, $level = 0) - { - $output = ''; - $id = $fam->getId(); - if (empty($id)) { - return $output; - } else { - $output .= $level.' @'.$id.'@ FAM '."\n"; - } - // level up - $level++; - - // HUSB - $husb = $fam->getHusb(); - if (!empty($husb)) { - $output .= $level.' HUSB @'.$husb."@\n"; - } - - // WIFE - $wife = $fam->getWife(); - if (!empty($wife)) { - $output .= $level.' WIFE @'.$wife."@\n"; - } - - // CHIL - $chil = $fam->getChil(); - if (!empty($chil) && count($chil) > 0) { - foreach ($chil as $item) { - if ($item) { - $_convert = $level.' CHIL @'.$item."@\n"; - $output .= $_convert; - } - } - } - // NCHI - $nchi = $fam->getNchi(); - if (!empty($nchi)) { - $output .= $level.' NCHI '.$nchi."\n"; - } - - // SUBM array - $subm = $fam->getSubm(); - - if (!empty($subm) && count($subm) > 0) { - foreach ($subm as $item) { - if ($item) { - $output .= $level.' SUBM '.$item."\n"; - } - } - } - - // RIN - $rin = $fam->getRin(); - if (!empty($rin)) { - $output .= $level.' RIN '.$rin."\n"; - } - // CHAN - $chan = $fam->getChan(); - if (!empty($chan)) { - $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level); - $output .= $_convert; - } - // SLGS - $slgs = $fam->getSlgs(); - if (!empty($slgs) && count($slgs) > 0) { - if ($slgs) { - $_convert = \PhpGedcom\Writer\Fam\Slgs::convert($item, $level); - $output .= $_convert; - } - } - - // REFN array - $refn = $fam->getRefn(); - if (!empty($refn) && count($refn) > 0) { - foreach ($refn as $item) { - if ($item) { - $_convert = \PhpGedcom\Writer\Refn::convert($item, $level); - $output .= $_convert; - } - } - } - - // NOTE array - $note = $fam->getNote(); - if (!empty($note) && count($note) > 0) { - foreach ($note as $item) { - if ($item) { - $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output .= $_convert; - } - } - } - - // SOUR - $sour = $fam->getSour(); - if (!empty($sour) && count($sour) > 0) { - foreach ($sour as $item) { - if ($item) { - $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); - $output .= $_convert; - } - } - } - - // OBJE - $obje = $fam->getObje(); - if (!empty($obje) && count($obje) > 0) { - foreach ($obje as $item) { - if ($item) { - $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); - $output .= $_convert; - } - } - } - - // EVEN - $even = $fam->getAllEven(); - if (!empty($even) && count($even) > 0) { - foreach ($even as $item) { - if ($item) { - $_convert = \PhpGedcom\Writer\Fam\Even::convert($item, $level); - $output .= $_convert; - } - } - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Fam/Even.php b/library/PhpGedcom/Writer/Fam/Even.php deleted file mode 100644 index 5ccd8317..00000000 --- a/library/PhpGedcom/Writer/Fam/Even.php +++ /dev/null @@ -1,134 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\Fam; - -class Even -{ - /** - * @param \PhpGedcom\Record\Fam\Even $even - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Fam\Even &$even, $level) - { - $output = ''; - - // $type; - $type = $even->getType(); - if (!empty($type)) { - $output .= $level.' '.$type."\n"; - } else { - return $output; - } - $level++; - - // $type; - $type = $even->getType(); - if (!empty($type)) { - $output .= $level.' TYPE '.$type."\n"; - } - - // $date; - $date = $even->getDate(); - if (!empty($date)) { - $output .= $level.' DATE '.$date."\n"; - } - - // Plac - $plac = $even->getPlac(); - if (!empty($plac)) { - $_convert = \PhpGedcom\Writer\Indi\Even\Plac::convert($plac, $level); - $output .= $_convert; - } - - // $caus; - $caus = $even->getCaus(); - if (!empty($caus)) { - $output .= $level.' CAUS '.$caus."\n"; - } - - // $age; - $age = $even->getAge(); - if (!empty($age)) { - $output .= $level.' AGE '.$age."\n"; - } - - // $addr - $addr = $even->getAddr(); - if (!empty($addr)) { - $_convert = \PhpGedcom\Writer\Addr::convert($addr, $level); - $output .= $_convert; - } - - // $phon = array() - $phon = $even->getPhon(); - if (!empty($phon) && count($phon) > 0) { - foreach ($phon as $item) { - $_convert = \PhpGedcom\Writer\Phon::convert($item, $level); - $output .= $_convert; - } - } - // $agnc - $agnc = $even->getAgnc(); - if (!empty($agnc)) { - $output .= $level.' AGNC '.$agnc."\n"; - } - - // HUSB - $husb = $even->getHusb(); - if (!empty($husb)) { - $_convert = \PhpGedcom\Writer\Fam\Even\Husb::convert($husb, $level); - $output .= $_convert; - } - - // WIFE - $wife = $even->getWife(); - if (!empty($wife)) { - $_convert = \PhpGedcom\Writer\Fam\Even\Wife::convert($wife, $level); - $output .= $_convert; - } - - // $ref = array(); - // This is not in parser - - // $obje = array(); - $obje = $even->getObje(); - if (!empty($obje) && count($obje) > 0) { - foreach ($obje as $item) { - $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); - $output .= $_convert; - } - } - // $sour = array(); - $sour = $even->getSour(); - if (!empty($sour) && count($sour) > 0) { - foreach ($sour as $item) { - $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); - $output .= $_convert; - } - } - // $note = array(); - $note = $even->getNote(); - if (!empty($note) && count($note) > 0) { - foreach ($note as $item) { - $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output .= $_convert; - } - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Fam/Even/Husb.php b/library/PhpGedcom/Writer/Fam/Even/Husb.php deleted file mode 100644 index 69739b1d..00000000 --- a/library/PhpGedcom/Writer/Fam/Even/Husb.php +++ /dev/null @@ -1,41 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\Fam\Even; - -class Husb -{ - /** - * @param \PhpGedcom\Record\Fam\Even\Husb $attr - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Fam\Even\Husb &$husb, $level = 0) - { - $output = ''; - - $output .= $level." WIFE \n"; - // level up - $level++; - - // AGE - $age = $husb->getAge(); - if (!empty($age)) { - $output .= $level.' AGE '.$age."\n"; - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Fam/Even/Wife.php b/library/PhpGedcom/Writer/Fam/Even/Wife.php deleted file mode 100644 index d9cb0644..00000000 --- a/library/PhpGedcom/Writer/Fam/Even/Wife.php +++ /dev/null @@ -1,41 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\Fam\Even; - -class Wife -{ - /** - * @param \PhpGedcom\Record\Fam\Even\Wife $attr - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Fam\Even\Wife &$wife, $level = 0) - { - $output = ''; - - $output .= $level." HUSB \n"; - // level up - $level++; - - // AGE - $age = $wife->getAge(); - if (!empty($age)) { - $output .= $level.' AGE '.$age."\n"; - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Fam/Slgs.php b/library/PhpGedcom/Writer/Fam/Slgs.php deleted file mode 100644 index d9b00f59..00000000 --- a/library/PhpGedcom/Writer/Fam/Slgs.php +++ /dev/null @@ -1,76 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\Fam; - -class Slgs -{ - /** - * @param \PhpGedcom\Record\Fam\Slgs $slgs - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Fam\Slgs &$slgs, $level) - { - $output = ''; - $output .= $level." SLGS \n"; - - // Level up - $level++; - - // $STAT; - $stat = $slgs->getStat(); - if (!empty($stat)) { - $output .= $level.' STAT '.$stat."\n"; - } - - // $date; - $date = $slgs->getDate(); - if (!empty($date)) { - $output .= $level.' DATE '.$date."\n"; - } - - // PLAC - $plac = $slgs->getPlac(); - if (!empty($plac)) { - $output .= $level.' PLAC '.$plac."\n"; - } - - // $TEMP; - $temp = $slgs->getTemp(); - if (!empty($temp)) { - $output .= $level.' TEMP '.$temp."\n"; - } - - // $sour = array(); - $sour = $slgs->getSour(); - if (!empty($sour) && count($sour) > 0) { - foreach ($sour as $item) { - $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); - $output .= $_convert; - } - } - // $note = array(); - $note = $slgs->getNote(); - if (!empty($note) && count($note) > 0) { - foreach ($note as $item) { - $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output .= $_convert; - } - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Head.php b/library/PhpGedcom/Writer/Head.php deleted file mode 100644 index 2d22eb3f..00000000 --- a/library/PhpGedcom/Writer/Head.php +++ /dev/null @@ -1,127 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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) - { - $level = 0; - $output = $level." HEAD\n"; - - // level up - $level++; - - //SOUR - $sour = $head->getSour(); - if ($sour) { - $_convert = \PhpGedcom\Writer\Head\Sour::convert($sour, $level); - $output .= $_convert; - } - - // DEST - $dest = $head->getDest(); - if ($dest) { - $output .= $level.' DEST '.$dest."\n"; - } - - //Subm - $subm = $head->getSubm(); - if ($subm) { - $output .= $level.' SUBM '.$subm."\n"; - } - - // SUBN - $subn = $head->getSubn(); - if ($subn) { - $output .= $level.' SUBN '.$subn."\n"; - } - - // FILE - $file = $head->getFile(); - if ($file) { - $output .= $level.' FILE '.$file."\n"; - } - - // COPR - $copr = $head->getCopr(); - if ($copr) { - $output .= $level.' COPR '.$copr."\n"; - } - - // LANG - $lang = $head->getLang(); - if ($lang) { - $output .= $level.' LANG '.$lang."\n"; - } - // DATE - $date = $head->getDate(); - if ($date) { - $_convert = \PhpGedcom\Writer\Head\Date::convert($date, $level); - $output .= $_convert; - } - - // GEDC - $gedc = $head->getGedc(); - if ($gedc) { - $_convert = \PhpGedcom\Writer\Head\Gedc::convert($gedc, $level); - $output .= $_convert; - } - - // CHAR - $char = $head->getChar(); - if ($char) { - $_convert = \PhpGedcom\Writer\Head\Char::convert($char, $level); - $output .= $_convert; - } - // PLAC - $plac = $head->getPlac(); - if ($plac) { - $_convert = \PhpGedcom\Writer\Head\Plac::convert($plac, $level); - $output .= $_convert; - } - - // NOTE - $note = $head->getNote(); - if ($note) { - $output .= $level.' NOTE '.$note."\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/Char.php b/library/PhpGedcom/Writer/Head/Char.php deleted file mode 100644 index ac7d4831..00000000 --- a/library/PhpGedcom/Writer/Head/Char.php +++ /dev/null @@ -1,47 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\Head; - -class Char -{ - /** - * @param \PhpGedcom\Record\Head\Char $char - * @param string $format - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Head\Char &$char, $level) - { - $output = ''; - // char - $_char = $char->getChar(); - if ($_char) { - $output .= $level.' CHAR '.$_char."\n"; - } else { - return $output; - } - - // level up - $level++; - // VERS - $vers = $char->getVers(); - if ($vers) { - $output .= $level.' VERS '.$vers."\n"; - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Head/Date.php b/library/PhpGedcom/Writer/Head/Date.php deleted file mode 100644 index 0459dd32..00000000 --- a/library/PhpGedcom/Writer/Head/Date.php +++ /dev/null @@ -1,46 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\Head; - -class Date -{ - /** - * @param \PhpGedcom\Record\Head\Date $date - * @param string $format - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Head\Date &$date, $level) - { - $output = ''; - $_date = $date->getDate(); - if ($_date) { - $output .= $level.' DATE '.$_date."\n"; - } else { - return $output; - } - - // level up - $level++; - // Time - $time = $date->getTime(); - if ($time) { - $output .= $level.' TIME '.$time."\n"; - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Head/Gedc.php b/library/PhpGedcom/Writer/Head/Gedc.php deleted file mode 100644 index 3514c14a..00000000 --- a/library/PhpGedcom/Writer/Head/Gedc.php +++ /dev/null @@ -1,46 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\Head; - -class Gedc -{ - /** - * @param \PhpGedcom\Record\Head\Gedc $gedc - * @param string $format - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Head\Gedc &$gedc, $level) - { - $output = $level." GEDC \n"; - - // level up - $level++; - // VERS - $vers = $gedc->getVersion(); - if ($vers) { - $output .= $level.' VERS '.$vers."\n"; - } - - // FORM - $form = $gedc->getForm(); - if ($form) { - $output .= $level.' FORM '.$form."\n"; - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Head/Plac.php b/library/PhpGedcom/Writer/Head/Plac.php deleted file mode 100644 index ef3a1b8a..00000000 --- a/library/PhpGedcom/Writer/Head/Plac.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\Head; - -class Plac -{ - /** - * @param \PhpGedcom\Record\Head\Plac $plac - * @param string $format - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Head\Plac &$plac, $level) - { - $output = $level." PLAC \n"; - - // level up - $level++; - // FORM - $form = $plac->getForm(); - if ($form) { - $output .= $level.' FORM '.$form."\n"; - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Head/Sour.php b/library/PhpGedcom/Writer/Head/Sour.php deleted file mode 100644 index d5d38258..00000000 --- a/library/PhpGedcom/Writer/Head/Sour.php +++ /dev/null @@ -1,67 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @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, $level) - { - $output = ''; - $_sour = $sour->getSour(); - if ($_sour) { - $output .= $level.' SOUR '.$_sour."\n"; - } else { - return $output; - } - - // level up - $level++; - - // VERS - $vers = $sour->getVersion(); - if ($vers) { - $output .= $level.' VERS '.$vers."\n"; - } - - // NAME - $name = $sour->getName(); - if ($name) { - $output .= $level.' NAME '.$name."\n"; - } - - // CORP - $corp = $sour->getCorp(); - if ($corp) { - $_convert = \PhpGedcom\Writer\Head\Sour\Corp::convert($corp, $level); - $output .= $_convert; - } - - // DATA - $data = $sour->getData(); - if ($data) { - $_convert = \PhpGedcom\Writer\Head\Sour\Data::convert($data, $level); - $output .= $_convert; - } - - 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 07f795c9..00000000 --- a/library/PhpGedcom/Writer/Head/Sour/Corp.php +++ /dev/null @@ -1,59 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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, $level) - { - $output = ''; - $_corp = $corp->getCorp(); - if ($_corp) { - $output .= $level.' CORP '.$_corp."\n"; - } else { - return $output; - } - - // level up - $level++; - - // ADDR - $addr = $corp->getAddr(); - if ($addr) { - $_convert = \PhpGedcom\Writer\Addr::convert($addr, $level); - $output .= $_convert; - } - - // phon - $phon = $corp->getPhon(); - if ($phon && count($phon) > 0) { - foreach ($phon as $item) { - if ($item) { - $_convert = \PhpGedcom\Writer\Phon::convert($item, $level); - $output .= $_convert; - } - } - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Head/Sour/Data.php b/library/PhpGedcom/Writer/Head/Sour/Data.php deleted file mode 100644 index 90307666..00000000 --- a/library/PhpGedcom/Writer/Head/Sour/Data.php +++ /dev/null @@ -1,53 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\Head\Sour; - -class Data -{ - /** - * @param \PhpGedcom\Record\Head\Sour\Data $data - * @param string $format - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Head\Sour\Data &$data, $level) - { - $output = ''; - $_data = $data->getData(); - if ($_data) { - $output .= $level.' DATA '.$_data."\n"; - } else { - return $output; - } - - // level up - $level++; - - // DATE - $date = $corp->getDate(); - if ($date) { - $output .= $level.' DATE '.$date."\n"; - } - - // COPR - $corp = $corp->getCorp(); - if ($corp) { - $output .= $level.' COPR '.$corp."\n"; - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Indi.php b/library/PhpGedcom/Writer/Indi.php deleted file mode 100644 index f29920ea..00000000 --- a/library/PhpGedcom/Writer/Indi.php +++ /dev/null @@ -1,247 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer; - -class Indi -{ - /** - * @param \PhpGedcom\Record\Indi $indi - * @param string $format - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Indi &$indi) - { - $level = 0; - - // id - $id = $indi->getId(); - $output = $level.' @'.$id."@ INDI\n"; - - // increase level after start indi - $level++; - - // name - // $name = $indi->getName(); - // if(!empty($name)){ - // $output.=$level." NAME ".$name."\n"; - // } - - // chan - $chan = $indi->getChan(); - if (!empty($chan)) { - $output .= $level.' CHAN '.$chan."\n"; - } - - // $attr - // PhpGedcom/Record/Attr extend PhpGedcom/Record/Even and there is no change. - // So used convert Even - $attr = $indi->getAllAttr(); - if (!empty($attr) && count($attr) > 0) { - foreach ($attr as $item) { - $_convert = \PhpGedcom\Writer\Indi\Even::convert($item, $level); - $output .= $_convert; - } - } - - // $even - $even = $indi->getAllEven(); - if (!empty($even) && count($even) > 0) { - foreach ($even as $items) { - foreach ($items as $item) { - $_convert = \PhpGedcom\Writer\Indi\Even::convert($item, $level); - $output .= $_convert; - } - } - } - - // $note - - $note = $indi->getNote(); - if (!empty($note) && count($note) > 0) { - foreach ($note as $item) { - $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output .= $_convert; - } - } - - // $obje - $obje = $indi->getObje(); - if (!empty($obje) && count($obje) > 0) { - foreach ($obje as $item) { - $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); - $output .= $_convert; - } - } - - // $sour - $sour = $indi->getSour(); - if (!empty($sour) && count($sour) > 0) { - foreach ($sour as $item) { - $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); - $output .= $_convert; - } - } - - // $name - $name = $indi->getName(); - if (!empty($name) && count($name) > 0) { - foreach ($name as $item) { - $_convert = \PhpGedcom\Writer\Indi\Name::convert($item, $level); - $output .= $_convert; - } - } - - // $alia - $alia = $indi->getAlia(); - if (!empty($alia) && count($alia) > 0) { - foreach ($alia as $item) { - if (!empty($item)) { - $_convert = $level.' ALIA '.$item."\n"; - $output .= $_convert; - } - } - } - - // $sex - $sex = $indi->getSex(); - if (!empty($sex)) { - $output .= $level.' SEX '.$sex."\n"; - } - - // $rin - $rin = $indi->getRin(); - if (!empty($rin)) { - $output .= $level.' RIN '.$rin."\n"; - } - - // $resn - $resn = $indi->getResn(); - if (!empty($resn)) { - $output .= $level.' RESN '.$resn."\n"; - } - - // $rfn - $rfn = $indi->getRfn(); - if (!empty($rfn)) { - $output .= $level.' RFN '.$rfn."\n"; - } - - // $afn - $afn = $indi->getAfn(); - if (!empty($afn)) { - $output .= $level.' AFN '.$afn."\n"; - } - - // Fams[] - $fams = $indi->getFams(); - if (!empty($fams) && count($fams) > 0) { - foreach ($fams as $item) { - $_convert = \PhpGedcom\Writer\Indi\Fams::convert($item, $level); - $output .= $_convert; - } - } - - // Famc[] - $famc = $indi->getFamc(); - if (!empty($famc) && count($famc) > 0) { - foreach ($famc as $item) { - $_convert = \PhpGedcom\Writer\Indi\Famc::convert($item, $level); - $output .= $_convert; - } - } - - // Asso[] - $asso = $indi->getAsso(); - if (!empty($asso) && count($asso) > 0) { - foreach ($asso as $item) { - $_convert = \PhpGedcom\Writer\Indi\Asso::convert($item, $level); - $output .= $_convert; - } - } - - // $subm - $subm = $indi->getSubm(); - if (!empty($subm) && count($subm) > 0) { - foreach ($subm as $item) { - if (!empty($item)) { - $_convert = $level.' SUBM '.$item."\n"; - $output .= $_convert; - } - } - } - - // $anci - $anci = $indi->getAnci(); - if (!empty($anci) && count($anci) > 0) { - foreach ($anci as $item) { - $_convert = $level.' ANCI '.$item."\n"; - $output .= $_convert; - } - } - - // $desi - $desi = $indi->getDesi(); - if (!empty($desi) && count($desi) > 0) { - foreach ($desi as $item) { - $_convert = $level.' DESI '.$item."\n"; - $output .= $_convert; - } - } - - // Refn[] - $refn = $indi->getRefn(); - if (!empty($refn) && count($refn) > 0) { - foreach ($refn as $item) { - $_convert = \PhpGedcom\Writer\Refn::convert($item, $level); - $output .= $_convert; - } - } - - // Bapl - // Currently Bapl is empty - // $bapl = $indi->getBapl(); - // if(!empty($bapl)){ - // $_convert = \PhpGedcom\Writer\Indi\Bapl::convert($bapl, $level); - // $output.=$_convert; - // } - - // Conl - // Currently Conl is empty - // $conl = $indi->getConl(); - // if(!empty($conl)){ - // $_convert = \PhpGedcom\Writer\Indi\Conl::convert($conl, $level); - // $output.=$_convert; - // } - - // Endl - // Currently Endl is empty - // $endl = $indi->getEndl(); - // if(!empty($endl)){ - // $_convert = \PhpGedcom\Writer\Indi\Endl::convert($endl, $level); - // $output.=$_convert; - // } - - // Slgc - // Currently Endl is empty - // $slgc = $indi->getSlgc(); - // if(!empty($slgc)){ - // $_convert = \PhpGedcom\Writer\Indi\Slgc::convert($slgc, $level); - // $output.=$_convert; - // } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Indi/Asso.php b/library/PhpGedcom/Writer/Indi/Asso.php deleted file mode 100644 index dc922e6c..00000000 --- a/library/PhpGedcom/Writer/Indi/Asso.php +++ /dev/null @@ -1,62 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\Indi; - -class Asso -{ - /** - * @param \PhpGedcom\Record\Indi\Asso $attr - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Indi\Asso &$asso, $level = 0) - { - $output = ''; - // _indi - $_indi = $asso->getIndi(); - if (empty($_indi)) { - return $output; - } - $output .= $level.' ASSO '.$_indi."\n"; - // level up - $level++; - - // RELA - $rela = $asso->getRela(); - if (!empty($rela)) { - $output .= $level.' RELA '.$rela."\n"; - } - // sour - $sour = $asso->getSour(); - if (!empty($sour) && count($sour) > 0) { - foreach ($sour as $item) { - $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); - $output .= $_convert; - } - } - - // note - $note = $asso->getSour(); - if (!empty($note) && count($note) > 0) { - foreach ($note as $item) { - $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output .= $_convert; - } - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Indi/Attr.php b/library/PhpGedcom/Writer/Indi/Attr.php deleted file mode 100644 index 5b27b78b..00000000 --- a/library/PhpGedcom/Writer/Indi/Attr.php +++ /dev/null @@ -1,31 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\Indi; - -class Attr -{ - /** - * @param \PhpGedcom\Record\Indi\Attr $attr - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Indi\Attr &$attr, $level = 0) - { - $output = ''; - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Indi/Even.php b/library/PhpGedcom/Writer/Indi/Even.php deleted file mode 100644 index fd3a1ca2..00000000 --- a/library/PhpGedcom/Writer/Indi/Even.php +++ /dev/null @@ -1,157 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\Indi; - -class Even -{ - /** - * Array of special events. - */ - const SPECIAL_EVENTS = [ - 'ADOP', - 'ATTR', - 'BAPM', - 'BARM', - 'BASM', - 'BLES', - 'BURI', - 'CENS', - 'CHR', - 'CHRA', - 'CONF', - 'CREM', - 'DEAT', - 'EMIG', - 'FCOM', - 'GRAD', - 'IMMI', - 'NATU', - 'ORDN', - 'PROB', - 'BIRT', - 'WILL', - 'RETI', - ]; - - /** - * @param \PhpGedcom\Record\Indi\Even $even - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Indi\Even &$even, $level = 0) - { - $output = ''; - - $type = $even->getType(); - $tag = in_array($type, self::SPECIAL_EVENTS, true) ? $type : 'EVEN'; - - // $_attr; - $attr = $even->getAttr(); - if (!empty($attr)) { - $output .= $level.' '.$tag.' '.$attr."\n"; - } else { - $output = $level.' '.$tag."\n"; - } - $level++; - - // $type; - if (!empty($type) && $tag === 'EVEN') { - $output .= $level.' TYPE '.$type."\n"; - } - - // $date; - $date = $even->getDate(); - if (!empty($date)) { - $output .= $level.' DATE '.$date->getDate()."\n"; - } - - // Plac - $plac = $even->getPlac(); - if (!empty($plac)) { - $_convert = \PhpGedcom\Writer\Indi\Even\Plac::convert($plac, $level); - $output .= $_convert; - } - - // $caus; - $caus = $even->getCaus(); - if (!empty($caus)) { - $output .= $level.' CAUS '.$caus."\n"; - } - - // $age; - $age = $even->getAge(); - if (!empty($age)) { - $output .= $level.' AGE '.$age."\n"; - } - - // $addr - $addr = $even->getAddr(); - if (!empty($addr)) { - $_convert = \PhpGedcom\Writer\Addr::convert($addr, $level); - $output .= $_convert; - } - - // $phon = array() - $phon = $even->getPhon(); - if (!empty($phon) && count($phon) > 0) { - foreach ($phon as $item) { - $_convert = \PhpGedcom\Writer\Phon::convert($item, $level); - $output .= $_convert; - } - } - // $agnc - $agnc = $even->getAgnc(); - if (!empty($agnc)) { - $output .= $level.' AGNC '.$agnc."\n"; - } - - // $ref = array(); - // This is not in parser - - // $obje = array(); - $obje = $even->getObje(); - if (!empty($obje) && count($obje) > 0) { - foreach ($obje as $item) { - $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); - $output .= $_convert; - } - } - // $sour = array(); - $sour = $even->getSour(); - if (!empty($sour) && count($sour) > 0) { - foreach ($sour as $item) { - $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); - $output .= $_convert; - } - } - // $note = array(); - $note = $even->getSour(); - if (!empty($note) && count($note) > 0) { - foreach ($note as $item) { - $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output .= $_convert; - } - } - // Record\Chan - $chan = $even->getChan(); - if (!empty($chan)) { - $_convert = \PhpGedcom\Writer\Chan::convert($item, $level); - $output .= $_convert; - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Indi/Even/Plac.php b/library/PhpGedcom/Writer/Indi/Even/Plac.php deleted file mode 100644 index 5d74dc26..00000000 --- a/library/PhpGedcom/Writer/Indi/Even/Plac.php +++ /dev/null @@ -1,65 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\Indi\Even; - -class Plac -{ - /** - * @param \PhpGedcom\Record\Indi\Even\Plac $plac - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Indi\Even\Plac &$plac, $level = 0) - { - $output = ''; - - // $plac - $_plac = $plac->getPlac(); - if (!empty($_plac)) { - $output .= $level.' PLAC '.$_plac."\n"; - } else { - $output .= $level." PLAC\n"; - } - - // level up - $level++; - - // $form - $form = $plac->getForm(); - if (!empty($form)) { - $output .= $level.' FORM '.$form."\n"; - } - - // $note -array - $note = $plac->getNote(); - if ($note && count($note) > 0) { - foreach ($note as $item) { - $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output .= $_convert; - } - } - // $sour -array - $sour = $plac->getSour(); - if ($sour && count($sour) > 0) { - foreach ($sour as $item) { - $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); - $output .= $_convert; - } - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Indi/Famc.php b/library/PhpGedcom/Writer/Indi/Famc.php deleted file mode 100644 index 44f0e39f..00000000 --- a/library/PhpGedcom/Writer/Indi/Famc.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\Indi; - -class Famc -{ - /** - * @param \PhpGedcom\Record\Indi\Famc $attr - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Indi\Famc &$famc, $level = 0) - { - $output = ''; - // NAME - $_famc = $famc->getFamc(); - if (empty($_famc)) { - return $output; - } - $output .= $level.' FAMC @'.$_famc."@\n"; - // level up - $level++; - - // PEDI - $pedi = $famc->getPedi(); - if (!empty($pedi)) { - $output .= $level.' PEDI '.$pedi."\n"; - } - - // note - $note = $famc->getNote(); - if (!empty($note) && count($note) > 0) { - foreach ($note as $item) { - $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output .= $_convert; - } - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Indi/Fams.php b/library/PhpGedcom/Writer/Indi/Fams.php deleted file mode 100644 index 3a29b758..00000000 --- a/library/PhpGedcom/Writer/Indi/Fams.php +++ /dev/null @@ -1,48 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\Indi; - -class Fams -{ - /** - * @param \PhpGedcom\Record\Indi\Fams $attr - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Indi\Fams &$fams, $level = 0) - { - $output = ''; - // NAME - $_fams = $fams->getFams(); - if (empty($_fams)) { - return $output; - } - $output .= $level.' FAMS @'.$_fams."@\n"; - // level up - $level++; - - // note - $note = $fams->getNote(); - if (!empty($note) && count($note) > 0) { - foreach ($note as $item) { - $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output .= $_convert; - } - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Indi/Name.php b/library/PhpGedcom/Writer/Indi/Name.php deleted file mode 100644 index e9c6af1f..00000000 --- a/library/PhpGedcom/Writer/Indi/Name.php +++ /dev/null @@ -1,87 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\Indi; - -class Name -{ - /** - * @param \PhpGedcom\Record\Indi\Name $attr - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Indi\Name &$name, $level = 0) - { - $output = ''; - // NAME - $_name = $name->getName(); - if (empty($_name)) { - return $output; - } - $output .= $level.' NAME '.$_name."\n"; - // level up - $level++; - - // NPFX - $npfx = $name->getNpfx(); - if (!empty($npfx)) { - $output .= $level.' NPFX '.$npfx."\n"; - } - - // GIVN - $givn = $name->getGivn(); - if (!empty($givn)) { - $output .= $level.' GIVN '.$givn."\n"; - } - // NICK - $nick = $name->getNick(); - if (!empty($nick)) { - $output .= $level.' NICK '.$nick."\n"; - } - // SPFX - $spfx = $name->getSpfx(); - if (!empty($spfx)) { - $output .= $level.' SPFX '.$spfx."\n"; - } - // SURN - $surn = $name->getSurn(); - if (!empty($surn)) { - $output .= $level.' SURN '.$surn."\n"; - } - // NSFX - $nsfx = $name->getNsfx(); - if (!empty($nsfx)) { - $output .= $level.' NSFX '.$nsfx."\n"; - } - // SOUR - $sour = $name->getSour(); - if (!empty($sour) && count($sour) > 0) { - foreach ($sour as $item) { - $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); - $output .= $_convert; - } - } - // note - $note = $name->getSour(); - if (!empty($note) && count($note) > 0) { - foreach ($note as $item) { - $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output .= $_convert; - } - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Note.php b/library/PhpGedcom/Writer/Note.php deleted file mode 100644 index f01a8119..00000000 --- a/library/PhpGedcom/Writer/Note.php +++ /dev/null @@ -1,80 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer; - -class Note -{ - /** - * @param \PhpGedcom\Record\Note $sour - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Note &$note) - { - $level = 0; - $output = ''; - $id = $note->getId(); - if (!empty($id)) { - $output .= $level.' '.$id.' '." NOTE \n"; - } else { - return $output; - } - - // Level Up - $level++; - // RIN - $rin = $note->getRin(); - if ($rin) { - $output .= $level.' RIN '.$rin."\n"; - } - - // cont - $cont = $note->getNote(); - if ($cont) { - $output .= $level.' CONT '.$cont."\n"; - } - - // REFN - $refn = $note->getRefn(); - if (!empty($refn) && count($refn) > 0) { - foreach ($refn as $item) { - if ($item) { - $_convert = \PhpGedcom\Writer\Refn::convert($item, $level); - $output .= $_convert; - } - } - } - // CHAN - $chan = $note->getChan(); - if ($chan) { - $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level); - $output .= $_convert; - } - - // SOUR array - $sour = $note->getSour(); - if (!empty($sour) && count($sour) > 0) { - foreach ($sour as $item) { - if ($item) { - $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); - $output .= $_convert; - } - } - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/NoteRef.php b/library/PhpGedcom/Writer/NoteRef.php deleted file mode 100644 index 40825a45..00000000 --- a/library/PhpGedcom/Writer/NoteRef.php +++ /dev/null @@ -1,47 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer; - -class NoteRef -{ - /** - * @param \PhpGedcom\Record\NoteRef $note - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\NoteRef &$note, $level) - { - $output = ''; - - // $_note - $_note = $note->getNote(); - if (!empty($_note)) { - $output .= $level.' NOTE '.$_note."\n"; - } - - $level++; - // $sour - $sour = $note->getSour(); - if ($sour && count($sour) > 0) { - foreach ($sour as $item) { - $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); - $output .= $_convert; - } - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Obje.php b/library/PhpGedcom/Writer/Obje.php deleted file mode 100644 index d26adc2c..00000000 --- a/library/PhpGedcom/Writer/Obje.php +++ /dev/null @@ -1,104 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer; - -class Obje -{ - /** - * @param \PhpGedcom\Record\Obje $sour - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Obje &$obje) - { - $level = 0; - $output = ''; - $id = $obje->getId(); - if ($id) { - $output .= $level.' '.$id." OBJE\n"; - } else { - return $output; - } - - // level up - $level++; - - // FORM - $form = $obje->getName(); - if ($form) { - $output .= $level.' FORM '.$form."\n"; - } - - // TITL - $titl = $obje->getTitl(); - if ($titl) { - $output .= $level.' TITL '.$titl."\n"; - } - - // OBJE - // This is same as FORM - - // RIN - $rin = $obje->getRin(); - if ($rin) { - $output .= $level.' RIN '.$rin."\n"; - } - - // REFN - $refn = $obje->getRefn(); - if (!empty($refn) && count($refn) > 0) { - foreach ($refn as $item) { - if ($item) { - $_convert = \PhpGedcom\Writer\Refn::convert($item, $level); - $output .= $_convert; - } - } - } - - // BLOB - $blob = $obje->getBlob(); - if ($blob) { - $output .= $level.' BLOB '.$blob."\n"; - } - - // NOTE - $note = $obje->getNote(); - if ($note && count($note) > 0) { - foreach ($note as $item) { - if ($item) { - $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output .= $_convert; - } - } - } - - // CHAN - $chan = $obje->getChan(); - if ($chan) { - $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level); - $output .= $_convert; - } - - // FILE - $file = $obje->getFile(); - if ($file) { - $output .= $level.' FILE '.$file."\n"; - } - - // - return $output; - } -} diff --git a/library/PhpGedcom/Writer/ObjeRef.php b/library/PhpGedcom/Writer/ObjeRef.php deleted file mode 100644 index 4d8b20de..00000000 --- a/library/PhpGedcom/Writer/ObjeRef.php +++ /dev/null @@ -1,67 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer; - -class ObjeRef -{ - /** - * @param \PhpGedcom\Record\ObjeRef $note - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\ObjeRef &$obje, $level) - { - $output = ''; - - // $_note - $_obje = $obje->getObje(); - if (!empty($_note)) { - $output .= $level.' OBJE '.$_obje."\n"; - } else { - $output .= $level." OBJE \n"; - } - - $level++; - // _form - $_form = $obje->getForm(); - if (!empty($_form)) { - $output .= $level.' FORM '.$_form."\n"; - } - - // _titl - $_titl = $obje->getTitl(); - if (!empty($_titl)) { - $output .= $level.' TITL '.$_titl."\n"; - } - - // _file - $_file = $obje->getFile(); - if (!empty($_file)) { - $output .= $level.' FILE '.$_file."\n"; - } - - // $_note = array() - $_note = $obje->getNote(); - if (!empty($_note) && count($_note) > 0) { - foreach ($_note as $item) { - $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output .= $_convert; - } - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Phon.php b/library/PhpGedcom/Writer/Phon.php deleted file mode 100644 index fcd60c63..00000000 --- a/library/PhpGedcom/Writer/Phon.php +++ /dev/null @@ -1,32 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Kristopher Wilson - * @license MIT - * - * @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, $level = 1) - { - $output = "{$level} PHON ".$phon."\n"; - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Refn.php b/library/PhpGedcom/Writer/Refn.php deleted file mode 100644 index 8eeed6f4..00000000 --- a/library/PhpGedcom/Writer/Refn.php +++ /dev/null @@ -1,44 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer; - -class Refn -{ - /** - * @param \PhpGedcom\Record\Refn $note - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Refn &$refn, $level) - { - $output = ''; - $_refn = $refn->getRefn(); - if (empty($_refn)) { - return $output; - } else { - $output .= $level.' REFN '.$_refn."\n"; - } - // level up - $level++; - // DATE - $type = $refn->getType(); - if (!empty($type)) { - $output .= $level.' TYPE '.$type."\n"; - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Repo.php b/library/PhpGedcom/Writer/Repo.php deleted file mode 100644 index 6a9797e1..00000000 --- a/library/PhpGedcom/Writer/Repo.php +++ /dev/null @@ -1,96 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer; - -class Repo -{ - /** - * @param \PhpGedcom\Record\Repo $sour - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Repo &$repo) - { - $level = 0; - $output = ''; - $_repo = $repo->getRepo(); - if ($_repo) { - $output .= $level.' '.$_repo." REPO\n"; - } else { - return $output; - } - - // level up - $level++; - - //NAME - $name = $repo->getName(); - if ($name) { - $output .= $level.' NAME '.$name."\n"; - } - - // ADDR - $addr = $repo->getAddr(); - if ($addr) { - $_convert = \PhpGedcom\Writer\Addr::convert($addr, $level); - $output .= $_convert; - } - - // PHON - $phon = $repo->getPhon(); - if ($phon) { - $_convert = \PhpGedcom\Writer\Phon::convert($phon, $level); - $output .= $_convert; - } - - // NOTE array - $note = $repo->getNote(); - if ($note && count($note) > 0) { - foreach ($note as $item) { - if ($item) { - $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output .= $_convert; - } - } - } - - // REFN - $refn = $repo->getRefn(); - if (!empty($refn) && count($refn) > 0) { - foreach ($refn as $item) { - if ($item) { - $_convert = \PhpGedcom\Writer\Refn::convert($item, $level); - $output .= $_convert; - } - } - } - - // CHAN - $chan = $repo->getChan(); - if ($chan) { - $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level); - $output .= $_convert; - } - - // RIN - $rin = $repo->getRin(); - if ($rin) { - $output .= $level.' RIN '.$rin."\n"; - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/RepoRef.php b/library/PhpGedcom/Writer/RepoRef.php deleted file mode 100644 index cba8c1c2..00000000 --- a/library/PhpGedcom/Writer/RepoRef.php +++ /dev/null @@ -1,57 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer; - -class RepoRef -{ - /** - * @param \PhpGedcom\Record\RepoRef $reporef - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\RepoRef &$reporef, $level) - { - $output = ''; - $_repo = $reporef->getRepo(); - if (empty($_sour)) { - return $output; - } else { - $output .= $level.' REPO '.$_repo."\n"; - } - // level up - $level++; - - // Note array - $note = $reporef->getNote(); - if (!empty($note) && count($note) > 0) { - foreach ($note as $item) { - $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output .= $_convert; - } - } - - // _caln array - $_caln = $reporef->getCaln(); - if (!empty($_caln) && count($_caln) > 0) { - foreach ($_caln as $item) { - $_convert = \PhpGedcom\Writer\Caln::convert($item, $level); - $output .= $_convert; - } - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Sour.php b/library/PhpGedcom/Writer/Sour.php deleted file mode 100644 index b4e851c5..00000000 --- a/library/PhpGedcom/Writer/Sour.php +++ /dev/null @@ -1,123 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer; - -class Sour -{ - /** - * @param \PhpGedcom\Record\Sour $sour - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Sour &$sour, $level) - { - $output = ''; - $_sour = $sour->getSour(); - if (empty($_sour)) { - return $output; - } else { - $output .= $level.' '.$_sour.' SOUR '."\n"; - } - // level up - $level++; - - // TITL - $titl = $sour->getType(); - if (!empty($type)) { - $output .= $level.' TITL '.$titl."\n"; - } - - // RIN - $rin = $sour->getRin(); - if (!empty($rin)) { - $output .= $level.' RIN '.$rin."\n"; - } - - // AUTH - $auth = $sour->getAuth(); - if (!empty($auth)) { - $output .= $level.' AUTH '.$auth."\n"; - } - - // TEXT - $text = $sour->getText(); - if (!empty($text)) { - $output .= $level.' TEXT '.$text."\n"; - } - - // PUBL - $publ = $sour->getPubl(); - if (!empty($publ)) { - $output .= $level.' PUBL '.$publ."\n"; - } - - // ABBR - $abbr = $sour->getAbbr(); - if (!empty($abbr)) { - $output .= $level.' ABBR '.$abbr."\n"; - } - - // REPO - $repo = $sour->getRepo(); - if (!empty($repo)) { - $_convert = \PhpGedcom\Writer\RepoRef::convert($repo, $level); - $output .= $_convert; - } - - // NOTE array - $note = $sour->getNote(); - if (!empty($note) && count($note) > 0) { - foreach ($note as $item) { - $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output .= $_convert; - } - } - - // DATA - $data = $sour->getData(); - if (!empty($data)) { - $_convert = \PhpGedcom\Writer\Sour\Data::convert($data, $level); - $output .= $_convert; - } - - // OBJE array - $obje = $sour->getObje(); - if (!empty($obje) && count($obje) > 0) { - foreach ($obje as $item) { - $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); - $output .= $_convert; - } - } - - // REFN array - $refn = $sour->getRefn(); - if (!empty($refn) && count($refn) > 0) { - foreach ($refn as $item) { - $_convert = \PhpGedcom\Writer\Refn::convert($item, $level); - $output .= $_convert; - } - } - - // chan - $chan = $sour->getChan(); - if (!empty($chan)) { - $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level); - $output .= $_convert; - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Sour/Data.php b/library/PhpGedcom/Writer/Sour/Data.php deleted file mode 100644 index 720dc3e3..00000000 --- a/library/PhpGedcom/Writer/Sour/Data.php +++ /dev/null @@ -1,70 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\Sour; - -class Data -{ - /** - * @param \PhpGedcom\Record\Sour\Data $data - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Sour\Data &$data, $level = 0) - { - $output = ''; - - $output = $level." DATA\n"; - $level++; - - // $_date; - $date = $data->getDate(); - if (!empty($date)) { - $output .= $level.' DATE '.$date."\n"; - } - - // $_agnc AGNC - $_agnc = $data->getAgnc(); - if (!empty($_agnc)) { - $output .= $level.' AGNC '.$_agnc."\n"; - } - - // $_text - $_text = $data->getText(); - if (!empty($_text)) { - $output .= $level.' TEXT '.$_text."\n"; - } - - // $_note - $note = $data->getNote(); - if ($note && count($note) > 0) { - foreach ($note as $item) { - $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output .= $_convert; - } - } - - // $_even - $_even = $data->getEven(); - if ($_even && count($_even) > 0) { - foreach ($_even as $item) { - $_convert = \PhpGedcom\Writer\Sour\Data\Even::convert($item, $level); - $output .= $_convert; - } - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Sour/Data/Even.php b/library/PhpGedcom/Writer/Sour/Data/Even.php deleted file mode 100644 index 13dc6c48..00000000 --- a/library/PhpGedcom/Writer/Sour/Data/Even.php +++ /dev/null @@ -1,46 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\Sour\Data; - -class Even -{ - /** - * @param \PhpGedcom\Record\Sour\Data\Even $even - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Sour\Data\Even &$even, $level) - { - $output = ''; - - $output = $level." EVEN\n"; - $level++; - - // $date; - $date = $even->getDate(); - if (!empty($date)) { - $output .= $level.' DATE '.$date."\n"; - } - - // Plac - $plac = $even->getPlac(); - if (!empty($plac)) { - $output .= $level.' PLAC '.$plac."\n"; - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/SourRef.php b/library/PhpGedcom/Writer/SourRef.php deleted file mode 100644 index 921030fe..00000000 --- a/library/PhpGedcom/Writer/SourRef.php +++ /dev/null @@ -1,72 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer; - -class SourRef -{ - /** - * @param \PhpGedcom\Record\SourRef $sour - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\SourRef &$sour, $level) - { - $output = ''; - $_sour = $sour->getSour(); - if (!empty($_sour)) { - $output .= $level.' SOUR '.$_sour."\n"; - } - $level++; - // protected $_text = null; - $_text = $sour->getText(); - if (!empty($_text)) { - $output .= $level.' TEXT '.$_text."\n"; - } - // protected $_note = array(); - $note = $sour->getNote(); - if ($note && count($note) > 0) { - foreach ($note as $item) { - $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output .= $_convert; - } - } - // protected $_data = null; - $_data = $sour->getData(); - if ($_data) { - $_convert = \PhpGedcom\Writer\Sour\Data::convert($_data, $level); - $output .= $_convert; - } - // protected $_page setPage - $_page = $sour->getPage(); - if (!empty($_page)) { - $output .= $level.' PAGE '.$_page."\n"; - } - // protected $_even = null; - $_even = $sour->getData(); - if ($_even) { - $_convert = \PhpGedcom\Writer\SourRef\Even::convert($_even, $level); - $output .= $_convert; - } - // protected $_quay - $_quay = $sour->getQuay(); - if (!empty($_quay)) { - $output .= $level.' QUAY '.$_quay."\n"; - } - // protected $_obje = array(); - // This is not defined in parser. - return $output; - } -} diff --git a/library/PhpGedcom/Writer/SourRef/Even.php b/library/PhpGedcom/Writer/SourRef/Even.php deleted file mode 100644 index a5dc8877..00000000 --- a/library/PhpGedcom/Writer/SourRef/Even.php +++ /dev/null @@ -1,47 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer\SourRef; - -class Even -{ - /** - * @param \PhpGedcom\Record\SourRef\Even $even - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\SourRef\Even &$even, $level = 0) - { - $output = ''; - - // $_date; - $_even = $even->getEven(); - if (!empty($_even)) { - $output .= $level.' EVEN '.$_even."\n"; - } else { - $output = $level." EVEN\n"; - } - // level up - $level++; - - // $_role ROLE - $_role = $data->getRole(); - if (!empty($_role)) { - $output .= $level.' ROLE '.$_role."\n"; - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Subm.php b/library/PhpGedcom/Writer/Subm.php deleted file mode 100644 index 358141f4..00000000 --- a/library/PhpGedcom/Writer/Subm.php +++ /dev/null @@ -1,111 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer; - -class Subm -{ - /** - * @param \PhpGedcom\Record\Subm $note - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Subm &$subm) - { - $level = 0; - $output = ''; - $_subm = $subm->getSubm(); - if (empty($_subm)) { - return $output; - } else { - $output .= $level.' '.$_subm.' SUBM '."\n"; - } - // level up - $level++; - - // NAME - $name = $subm->getName(); - if (!empty($name)) { - $output .= $level.' NAME '.$name."\n"; - } - // $chan - $chan = $subm->getChan(); - if ($chan) { - $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level); - $output .= $_convert; - } - - // $addr - $addr = $subm->getAddr(); - if ($addr) { - $_convert = \PhpGedcom\Writer\Addr::convert($addr, $level); - $output .= $_convert; - } - - // $rin - $rin = $subm->getRin(); - if (!empty($rin)) { - $output .= $level.' RIN '.$rin."\n"; - } - - // $rfn - $rfn = $subm->getRfn(); - if (!empty($rfn)) { - $output .= $level.' RFN '.$rfn."\n"; - } - - // $lang = array() - $langs = $subm->getLang(); - if (!empty($langs) && count($langs) > 0) { - foreach ($langs as $item) { - if ($item) { - $_convert = $level.' LANG '.$item."\n"; - $output .= $_convert; - } - } - } - - // $phon = array() - $phon = $subm->getLang(); - if (!empty($phon) && count($phon) > 0) { - foreach ($phon as $item) { - if ($item) { - $_convert = \PhpGedcom\Writer\Phon::convert($item, $level); - $output .= $_convert; - } - } - } - - // $obje = array() - $obje = $subm->getObje(); - if (!empty($obje) && count($obje) > 0) { - foreach ($obje as $item) { - $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); - $output .= $_convert; - } - } - - // note - $note = $subm->getNote(); - if (!empty($note) && count($note) > 0) { - foreach ($note as $item) { - $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); - $output .= $_convert; - } - } - - return $output; - } -} diff --git a/library/PhpGedcom/Writer/Subn.php b/library/PhpGedcom/Writer/Subn.php deleted file mode 100644 index 9aca13af..00000000 --- a/library/PhpGedcom/Writer/Subn.php +++ /dev/null @@ -1,81 +0,0 @@ - - * @copyright Copyright (c) 2010-2013, Xiang Ming - * @license MIT - * - * @link http://github.com/mrkrstphr/php-gedcom - */ - -namespace PhpGedcom\Writer; - -class Subn -{ - /** - * @param \PhpGedcom\Record\Subn $note - * @param int $level - * - * @return string - */ - public static function convert(\PhpGedcom\Record\Subn &$subn) - { - $level = 0; - $output = ''; - $_subn = $subn->getSubn(); - if (empty($_subn)) { - return $output; - } else { - $output .= $level.' '.$_subn." SUBN \n"; - } - // level up - $level++; - - // SUBM - $subm = $subn->getSubm(); - if (!empty($subm)) { - $output .= $level.' SUBM '.$subm."\n"; - } - - // FAMF - $famf = $subn->getFamf(); - if (!empty($famf)) { - $output .= $level.' FAMF '.$famf."\n"; - } - - // TEMP - $temp = $subn->getTemp(); - if (!empty($temp)) { - $output .= $level.' TEMP '.$temp."\n"; - } - - // ANCE - $ance = $subn->getAnce(); - if (!empty($ance)) { - $output .= $level.' ANCE '.$ance."\n"; - } - - // DESC - $desc = $subn->getDesc(); - if (!empty($desc)) { - $output .= $level.' DESC '.$desc."\n"; - } - // ORDI - $ordi = $subn->getOrdi(); - if (!empty($ordi)) { - $output .= $level.' ORDI '.$ordi."\n"; - } - - // RIN - $rin = $subn->getRin(); - if (!empty($rin)) { - $output .= $level.' RIN '.$rin."\n"; - } - - return $output; - } -} From a56c00a8d8300dfe745cfdccc9167aa8776aaece Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sat, 17 Jul 2021 22:05:50 +0100 Subject: [PATCH 63/99] Update PSR4. --- composer.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 01dd3b64..603642f6 100644 --- a/composer.json +++ b/composer.json @@ -13,8 +13,13 @@ "squizlabs/php_codesniffer": "3.5.*" }, "autoload": { - "psr-0": { - "PhpGedcom\\": "library/" + "psr-4": { + "Gedcom\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "GedcomTest\\": "tests/" } } } From 9d03034a70ec9921af7936292d493d0bc6390970 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sat, 17 Jul 2021 22:10:26 +0100 Subject: [PATCH 64/99] Update PSR4. --- src/Parser/Addr.php | 2 +- src/Parser/Caln.php | 2 +- src/Parser/Chan.php | 2 +- src/Parser/Component.php | 2 +- src/Parser/Date.php | 2 +- src/Parser/Fam.php | 2 +- src/Parser/Fam/Anul.php | 2 +- src/Parser/Fam/Cens.php | 2 +- src/Parser/Fam/Div.php | 2 +- src/Parser/Fam/Divf.php | 2 +- src/Parser/Fam/Enga.php | 2 +- src/Parser/Fam/Even.php | 2 +- src/Parser/Fam/Even/Husb.php | 2 +- src/Parser/Fam/Even/Wife.php | 2 +- src/Parser/Fam/Marb.php | 2 +- src/Parser/Fam/Marc.php | 2 +- src/Parser/Fam/Marl.php | 2 +- src/Parser/Fam/Marr.php | 2 +- src/Parser/Fam/Mars.php | 2 +- src/Parser/Fam/Slgs.php | 2 +- src/Parser/Fam/Slgs/Stat.php | 2 +- src/Parser/Head.php | 2 +- src/Parser/Head/Char.php | 2 +- src/Parser/Head/Date.php | 2 +- src/Parser/Head/Gedc.php | 2 +- src/Parser/Head/Plac.php | 2 +- src/Parser/Head/Sour.php | 2 +- src/Parser/Head/Sour/Corp.php | 2 +- src/Parser/Head/Sour/Data.php | 2 +- src/Parser/Indi.php | 2 +- src/Parser/Indi/Adop.php | 2 +- src/Parser/Indi/Asso.php | 2 +- src/Parser/Indi/Attr.php | 2 +- src/Parser/Indi/Bapl.php | 2 +- src/Parser/Indi/Bapm.php | 2 +- src/Parser/Indi/Barm.php | 2 +- src/Parser/Indi/Basm.php | 2 +- src/Parser/Indi/Birt.php | 2 +- src/Parser/Indi/Bles.php | 2 +- src/Parser/Indi/Buri.php | 2 +- src/Parser/Indi/Cast.php | 2 +- src/Parser/Indi/Cens.php | 2 +- src/Parser/Indi/Chr.php | 2 +- src/Parser/Indi/Chra.php | 2 +- src/Parser/Indi/Conf.php | 2 +- src/Parser/Indi/Conl.php | 2 +- src/Parser/Indi/Crem.php | 2 +- src/Parser/Indi/Deat.php | 2 +- src/Parser/Indi/Dscr.php | 2 +- src/Parser/Indi/Educ.php | 2 +- src/Parser/Indi/Emig.php | 2 +- src/Parser/Indi/Endl.php | 2 +- src/Parser/Indi/Even.php | 2 +- src/Parser/Indi/Even/Plac.php | 2 +- src/Parser/Indi/Famc.php | 2 +- src/Parser/Indi/Fams.php | 2 +- src/Parser/Indi/Fcom.php | 2 +- src/Parser/Indi/Grad.php | 2 +- src/Parser/Indi/Idno.php | 2 +- src/Parser/Indi/Immi.php | 2 +- src/Parser/Indi/Lds.php | 2 +- src/Parser/Indi/Name.php | 2 +- src/Parser/Indi/Name/Fone.php | 2 +- src/Parser/Indi/Name/Romn.php | 2 +- src/Parser/Indi/Nati.php | 2 +- src/Parser/Indi/Natu.php | 2 +- src/Parser/Indi/Nchi.php | 2 +- src/Parser/Indi/Nmr.php | 2 +- src/Parser/Indi/Occu.php | 2 +- src/Parser/Indi/Ordn.php | 2 +- src/Parser/Indi/Prob.php | 2 +- src/Parser/Indi/Prop.php | 2 +- src/Parser/Indi/Reli.php | 2 +- src/Parser/Indi/Resi.php | 2 +- src/Parser/Indi/Reti.php | 2 +- src/Parser/Indi/Slgc.php | 2 +- src/Parser/Indi/Ssn.php | 2 +- src/Parser/Indi/Titl.php | 2 +- src/Parser/Indi/Will.php | 2 +- src/Parser/Note.php | 2 +- src/Parser/NoteRef.php | 2 +- src/Parser/Obje.php | 2 +- src/Parser/ObjeRef.php | 2 +- src/Parser/ObjeRef/File.php | 2 +- src/Parser/ObjeRef/File/Form.php | 2 +- src/Parser/Phon.php | 2 +- src/Parser/Plac.php | 2 +- src/Parser/Plac/Fone.php | 2 +- src/Parser/Plac/Map.php | 2 +- src/Parser/Plac/Romn.php | 2 +- src/Parser/Refn.php | 2 +- src/Parser/Repo.php | 2 +- src/Parser/RepoRef.php | 2 +- src/Parser/Sour.php | 2 +- src/Parser/Sour/Data.php | 2 +- src/Parser/Sour/Data/Even.php | 2 +- src/Parser/Sour/Repo.php | 2 +- src/Parser/Sour/Repo/Caln.php | 2 +- src/Parser/SourRef.php | 2 +- src/Parser/SourRef/Data.php | 2 +- src/Parser/SourRef/Even.php | 2 +- src/Parser/Subm.php | 2 +- src/Parser/Subn.php | 2 +- src/Record/Addr.php | 2 +- src/Record/Caln.php | 2 +- src/Record/Chan.php | 2 +- src/Record/Data.php | 2 +- src/Record/Date.php | 2 +- src/Record/Fam.php | 2 +- src/Record/Fam/Anul.php | 2 +- src/Record/Fam/Cens.php | 2 +- src/Record/Fam/Div.php | 2 +- src/Record/Fam/Enga.php | 2 +- src/Record/Fam/Even.php | 2 +- src/Record/Fam/Even/Husb.php | 2 +- src/Record/Fam/Even/Wife.php | 2 +- src/Record/Fam/Marb.php | 2 +- src/Record/Fam/Marc.php | 2 +- src/Record/Fam/Marl.php | 2 +- src/Record/Fam/Marr.php | 2 +- src/Record/Fam/Mars.php | 2 +- src/Record/Fam/Slgs.php | 2 +- src/Record/Fam/Slgs/Stat.php | 2 +- src/Record/Head.php | 2 +- src/Record/Head/Char.php | 2 +- src/Record/Head/Date.php | 2 +- src/Record/Head/Gedc.php | 2 +- src/Record/Head/Plac.php | 2 +- src/Record/Head/Sour.php | 2 +- src/Record/Head/Sour/Corp.php | 2 +- src/Record/Head/Sour/Data.php | 2 +- src/Record/Indi.php | 2 +- src/Record/Indi/Adop.php | 2 +- src/Record/Indi/Asso.php | 2 +- src/Record/Indi/Attr.php | 2 +- src/Record/Indi/Bapl.php | 2 +- src/Record/Indi/Bapm.php | 2 +- src/Record/Indi/Barm.php | 2 +- src/Record/Indi/Basm.php | 2 +- src/Record/Indi/Birt.php | 2 +- src/Record/Indi/Bles.php | 2 +- src/Record/Indi/Buri.php | 2 +- src/Record/Indi/Cast.php | 2 +- src/Record/Indi/Cens.php | 2 +- src/Record/Indi/Chr.php | 2 +- src/Record/Indi/Chra.php | 2 +- src/Record/Indi/Conf.php | 2 +- src/Record/Indi/Conl.php | 2 +- src/Record/Indi/Crem.php | 2 +- src/Record/Indi/Deat.php | 2 +- src/Record/Indi/Dscr.php | 2 +- src/Record/Indi/Educ.php | 2 +- src/Record/Indi/Emig.php | 2 +- src/Record/Indi/Endl.php | 2 +- src/Record/Indi/Even.php | 2 +- src/Record/Indi/Even/Plac.php | 2 +- src/Record/Indi/Famc.php | 2 +- src/Record/Indi/Fams.php | 2 +- src/Record/Indi/Fcom.php | 2 +- src/Record/Indi/Grad.php | 2 +- src/Record/Indi/Idno.php | 2 +- src/Record/Indi/Immi.php | 2 +- src/Record/Indi/Lds.php | 2 +- src/Record/Indi/Name.php | 2 +- src/Record/Indi/Name/Fone.php | 2 +- src/Record/Indi/Name/Romn.php | 2 +- src/Record/Indi/Nati.php | 2 +- src/Record/Indi/Natu.php | 2 +- src/Record/Indi/Nchi.php | 2 +- src/Record/Indi/Nmr.php | 2 +- src/Record/Indi/Note.php | 2 +- src/Record/Indi/Occu.php | 2 +- src/Record/Indi/Ordn.php | 2 +- src/Record/Indi/Prob.php | 2 +- src/Record/Indi/Prop.php | 2 +- src/Record/Indi/Reli.php | 2 +- src/Record/Indi/Resi.php | 2 +- src/Record/Indi/Reti.php | 2 +- src/Record/Indi/Slgc.php | 2 +- src/Record/Indi/Ssn.php | 2 +- src/Record/Indi/Titl.php | 2 +- src/Record/Indi/Will.php | 2 +- src/Record/Note.php | 2 +- src/Record/NoteRef.php | 2 +- src/Record/Noteable.php | 2 +- src/Record/Obje.php | 2 +- src/Record/ObjeRef.php | 2 +- src/Record/ObjeRef/File.php | 2 +- src/Record/ObjeRef/File/Form.php | 2 +- src/Record/Objectable.php | 2 +- src/Record/Phon.php | 2 +- src/Record/Plac.php | 2 +- src/Record/Plac/Fone.php | 2 +- src/Record/Plac/Map.php | 2 +- src/Record/Plac/Romn.php | 2 +- src/Record/Refn.php | 2 +- src/Record/Repo.php | 2 +- src/Record/RepoRef.php | 2 +- src/Record/Sour.php | 2 +- src/Record/Sour/Data.php | 2 +- src/Record/Sour/Data/Even.php | 2 +- src/Record/Sour/Repo.php | 2 +- src/Record/Sour/Repo/Caln.php | 2 +- src/Record/SourRef.php | 2 +- src/Record/SourRef/Data.php | 2 +- src/Record/SourRef/Even.php | 2 +- src/Record/Sourceable.php | 2 +- src/Record/Subm.php | 2 +- src/Record/Subn.php | 2 +- src/Writer/Addr.php | 2 +- src/Writer/Caln.php | 2 +- src/Writer/Chan.php | 2 +- src/Writer/Fam.php | 2 +- src/Writer/Fam/Even.php | 2 +- src/Writer/Fam/Even/Husb.php | 2 +- src/Writer/Fam/Even/Wife.php | 2 +- src/Writer/Fam/Slgs.php | 2 +- src/Writer/Head.php | 2 +- src/Writer/Head/Char.php | 2 +- src/Writer/Head/Date.php | 2 +- src/Writer/Head/Gedc.php | 2 +- src/Writer/Head/Plac.php | 2 +- src/Writer/Head/Sour.php | 2 +- src/Writer/Head/Sour/Corp.php | 2 +- src/Writer/Head/Sour/Data.php | 2 +- src/Writer/Indi.php | 2 +- src/Writer/Indi/Asso.php | 2 +- src/Writer/Indi/Attr.php | 2 +- src/Writer/Indi/Even.php | 2 +- src/Writer/Indi/Even/Plac.php | 2 +- src/Writer/Indi/Famc.php | 2 +- src/Writer/Indi/Fams.php | 2 +- src/Writer/Indi/Name.php | 2 +- src/Writer/Note.php | 2 +- src/Writer/NoteRef.php | 2 +- src/Writer/Obje.php | 2 +- src/Writer/ObjeRef.php | 2 +- src/Writer/Phon.php | 2 +- src/Writer/Refn.php | 2 +- src/Writer/Repo.php | 2 +- src/Writer/RepoRef.php | 2 +- src/Writer/Sour.php | 2 +- src/Writer/Sour/Data.php | 2 +- src/Writer/Sour/Data/Even.php | 2 +- src/Writer/SourRef.php | 2 +- src/Writer/SourRef/Even.php | 2 +- src/Writer/Subm.php | 2 +- src/Writer/Subn.php | 2 +- 248 files changed, 248 insertions(+), 248 deletions(-) diff --git a/src/Parser/Addr.php b/src/Parser/Addr.php index 9ca44cb8..c6c0bd46 100644 --- a/src/Parser/Addr.php +++ b/src/Parser/Addr.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; class Addr extends \Parser\Component { diff --git a/src/Parser/Caln.php b/src/Parser/Caln.php index 8721c4a1..574da698 100644 --- a/src/Parser/Caln.php +++ b/src/Parser/Caln.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; class Caln extends \Parser\Component { diff --git a/src/Parser/Chan.php b/src/Parser/Chan.php index 9f7dbbe8..47087e96 100644 --- a/src/Parser/Chan.php +++ b/src/Parser/Chan.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; class Chan extends \Parser\Component { diff --git a/src/Parser/Component.php b/src/Parser/Component.php index b30b1a0c..3660e82d 100644 --- a/src/Parser/Component.php +++ b/src/Parser/Component.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; abstract class Component { diff --git a/src/Parser/Date.php b/src/Parser/Date.php index 82a5ed71..bac89dd4 100644 --- a/src/Parser/Date.php +++ b/src/Parser/Date.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; class Date extends \Parser\Component { diff --git a/src/Parser/Fam.php b/src/Parser/Fam.php index 0b1eab82..2d22a279 100644 --- a/src/Parser/Fam.php +++ b/src/Parser/Fam.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; class Fam extends \Parser\Component { diff --git a/src/Parser/Fam/Anul.php b/src/Parser/Fam/Anul.php index 48e107f9..ad54cfef 100644 --- a/src/Parser/Fam/Anul.php +++ b/src/Parser/Fam/Anul.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Fam; +namespace Gedcom\Parser\Fam; class Anul extends \Parser\Fam\Even { diff --git a/src/Parser/Fam/Cens.php b/src/Parser/Fam/Cens.php index 9a9b0fef..6385b45d 100644 --- a/src/Parser/Fam/Cens.php +++ b/src/Parser/Fam/Cens.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Fam; +namespace Gedcom\Parser\Fam; class Cens extends \Parser\Fam\Even { diff --git a/src/Parser/Fam/Div.php b/src/Parser/Fam/Div.php index 83ce27ac..63b19617 100644 --- a/src/Parser/Fam/Div.php +++ b/src/Parser/Fam/Div.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Fam; +namespace Gedcom\Parser\Fam; class Div extends \Parser\Fam\Even { diff --git a/src/Parser/Fam/Divf.php b/src/Parser/Fam/Divf.php index 6c3fa1b1..4180c153 100644 --- a/src/Parser/Fam/Divf.php +++ b/src/Parser/Fam/Divf.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Fam; +namespace Gedcom\Parser\Fam; class Divf extends \Parser\Fam\Even { diff --git a/src/Parser/Fam/Enga.php b/src/Parser/Fam/Enga.php index 90ff7b5d..c8b6638d 100644 --- a/src/Parser/Fam/Enga.php +++ b/src/Parser/Fam/Enga.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Fam; +namespace Gedcom\Parser\Fam; class Enga extends \Parser\Fam\Even { diff --git a/src/Parser/Fam/Even.php b/src/Parser/Fam/Even.php index f7d629c9..9b207190 100644 --- a/src/Parser/Fam/Even.php +++ b/src/Parser/Fam/Even.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Fam; +namespace Gedcom\Parser\Fam; class Even extends \Parser\Component { diff --git a/src/Parser/Fam/Even/Husb.php b/src/Parser/Fam/Even/Husb.php index 954e4005..ecee61c0 100644 --- a/src/Parser/Fam/Even/Husb.php +++ b/src/Parser/Fam/Even/Husb.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Fam\Even; +namespace Gedcom\Parser\Fam\Even; class Husb extends \Parser\Component { diff --git a/src/Parser/Fam/Even/Wife.php b/src/Parser/Fam/Even/Wife.php index ea8b03a8..bc203f14 100644 --- a/src/Parser/Fam/Even/Wife.php +++ b/src/Parser/Fam/Even/Wife.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Fam\Even; +namespace Gedcom\Parser\Fam\Even; class Wife extends \Parser\Component { diff --git a/src/Parser/Fam/Marb.php b/src/Parser/Fam/Marb.php index f1f5acd2..bdb5fbe6 100644 --- a/src/Parser/Fam/Marb.php +++ b/src/Parser/Fam/Marb.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Fam; +namespace Gedcom\Parser\Fam; class Marb extends \Parser\Fam\Even { diff --git a/src/Parser/Fam/Marc.php b/src/Parser/Fam/Marc.php index f3f920b6..bdc8996c 100644 --- a/src/Parser/Fam/Marc.php +++ b/src/Parser/Fam/Marc.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Fam; +namespace Gedcom\Parser\Fam; class Marc extends \Parser\Fam\Even { diff --git a/src/Parser/Fam/Marl.php b/src/Parser/Fam/Marl.php index 0c1bd560..43dd298e 100644 --- a/src/Parser/Fam/Marl.php +++ b/src/Parser/Fam/Marl.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Fam; +namespace Gedcom\Parser\Fam; class Marl extends \Parser\Fam\Even { diff --git a/src/Parser/Fam/Marr.php b/src/Parser/Fam/Marr.php index a090efc9..dc497f35 100644 --- a/src/Parser/Fam/Marr.php +++ b/src/Parser/Fam/Marr.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Fam; +namespace Gedcom\Parser\Fam; class Marr extends \Parser\Fam\Even { diff --git a/src/Parser/Fam/Mars.php b/src/Parser/Fam/Mars.php index 459e1ebf..9fb07e6c 100644 --- a/src/Parser/Fam/Mars.php +++ b/src/Parser/Fam/Mars.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Fam; +namespace Gedcom\Parser\Fam; class Mars extends \Parser\Fam\Even { diff --git a/src/Parser/Fam/Slgs.php b/src/Parser/Fam/Slgs.php index eea2a825..eee3c140 100644 --- a/src/Parser/Fam/Slgs.php +++ b/src/Parser/Fam/Slgs.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Fam; +namespace Gedcom\Parser\Fam; class Slgs extends \Parser\Component { diff --git a/src/Parser/Fam/Slgs/Stat.php b/src/Parser/Fam/Slgs/Stat.php index 58dcce31..ba470654 100644 --- a/src/Parser/Fam/Slgs/Stat.php +++ b/src/Parser/Fam/Slgs/Stat.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Fam\Slgs; +namespace Gedcom\Parser\Fam\Slgs; class Stat extends \Parser\Component { diff --git a/src/Parser/Head.php b/src/Parser/Head.php index 4488de39..30d0ced9 100644 --- a/src/Parser/Head.php +++ b/src/Parser/Head.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; class Head extends \Parser\Component { diff --git a/src/Parser/Head/Char.php b/src/Parser/Head/Char.php index 985ea1f9..0b58822c 100644 --- a/src/Parser/Head/Char.php +++ b/src/Parser/Head/Char.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Head; +namespace Gedcom\Parser\Head; class Char extends \Parser\Component { diff --git a/src/Parser/Head/Date.php b/src/Parser/Head/Date.php index 350888a8..987169d4 100644 --- a/src/Parser/Head/Date.php +++ b/src/Parser/Head/Date.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Head; +namespace Gedcom\Parser\Head; class Date extends \Parser\Component { diff --git a/src/Parser/Head/Gedc.php b/src/Parser/Head/Gedc.php index b5c1865f..64dd911d 100644 --- a/src/Parser/Head/Gedc.php +++ b/src/Parser/Head/Gedc.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Head; +namespace Gedcom\Parser\Head; class Gedc extends \Parser\Component { diff --git a/src/Parser/Head/Plac.php b/src/Parser/Head/Plac.php index c476cb02..17eb268e 100644 --- a/src/Parser/Head/Plac.php +++ b/src/Parser/Head/Plac.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Head; +namespace Gedcom\Parser\Head; class Plac extends \Parser\Component { diff --git a/src/Parser/Head/Sour.php b/src/Parser/Head/Sour.php index 5e877d3d..4ad41968 100644 --- a/src/Parser/Head/Sour.php +++ b/src/Parser/Head/Sour.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Head; +namespace Gedcom\Parser\Head; class Sour extends \Parser\Component { diff --git a/src/Parser/Head/Sour/Corp.php b/src/Parser/Head/Sour/Corp.php index 729f541c..7471e10e 100644 --- a/src/Parser/Head/Sour/Corp.php +++ b/src/Parser/Head/Sour/Corp.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Head\Sour; +namespace Gedcom\Parser\Head\Sour; class Corp extends \Parser\Component { diff --git a/src/Parser/Head/Sour/Data.php b/src/Parser/Head/Sour/Data.php index 7e9ec14f..93c6b17b 100644 --- a/src/Parser/Head/Sour/Data.php +++ b/src/Parser/Head/Sour/Data.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Head\Sour; +namespace Gedcom\Parser\Head\Sour; class Data extends \Parser\Component { diff --git a/src/Parser/Indi.php b/src/Parser/Indi.php index bdc79c30..fd8d092d 100644 --- a/src/Parser/Indi.php +++ b/src/Parser/Indi.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; class Indi extends \Parser\Component { diff --git a/src/Parser/Indi/Adop.php b/src/Parser/Indi/Adop.php index 5bb84ebf..9e8437fb 100644 --- a/src/Parser/Indi/Adop.php +++ b/src/Parser/Indi/Adop.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Adop extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Asso.php b/src/Parser/Indi/Asso.php index 4b4f3d5d..32bcb905 100644 --- a/src/Parser/Indi/Asso.php +++ b/src/Parser/Indi/Asso.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Asso extends \Parser\Component { diff --git a/src/Parser/Indi/Attr.php b/src/Parser/Indi/Attr.php index ff1f3f6c..032e25c3 100644 --- a/src/Parser/Indi/Attr.php +++ b/src/Parser/Indi/Attr.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; abstract class Attr extends \Parser\Component { diff --git a/src/Parser/Indi/Bapl.php b/src/Parser/Indi/Bapl.php index 2cc8296b..90cf2e3f 100644 --- a/src/Parser/Indi/Bapl.php +++ b/src/Parser/Indi/Bapl.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Bapl extends Lds { diff --git a/src/Parser/Indi/Bapm.php b/src/Parser/Indi/Bapm.php index b27edd7a..37672a00 100644 --- a/src/Parser/Indi/Bapm.php +++ b/src/Parser/Indi/Bapm.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Bapm extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Barm.php b/src/Parser/Indi/Barm.php index e7b1736b..81474562 100644 --- a/src/Parser/Indi/Barm.php +++ b/src/Parser/Indi/Barm.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Barm extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Basm.php b/src/Parser/Indi/Basm.php index 3265d3bb..26db8cbb 100644 --- a/src/Parser/Indi/Basm.php +++ b/src/Parser/Indi/Basm.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Basm extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Birt.php b/src/Parser/Indi/Birt.php index 26dab437..ac3d9b11 100644 --- a/src/Parser/Indi/Birt.php +++ b/src/Parser/Indi/Birt.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Birt extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Bles.php b/src/Parser/Indi/Bles.php index d3c09c55..d54dbcaf 100644 --- a/src/Parser/Indi/Bles.php +++ b/src/Parser/Indi/Bles.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Bles extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Buri.php b/src/Parser/Indi/Buri.php index 5d2fadd7..e35838c0 100644 --- a/src/Parser/Indi/Buri.php +++ b/src/Parser/Indi/Buri.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Buri extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Cast.php b/src/Parser/Indi/Cast.php index 38452c93..51daebd0 100644 --- a/src/Parser/Indi/Cast.php +++ b/src/Parser/Indi/Cast.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Cast extends \Parser\Indi\Attr { diff --git a/src/Parser/Indi/Cens.php b/src/Parser/Indi/Cens.php index 9ea80446..90ce776a 100644 --- a/src/Parser/Indi/Cens.php +++ b/src/Parser/Indi/Cens.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Cens extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Chr.php b/src/Parser/Indi/Chr.php index af028600..522913d6 100644 --- a/src/Parser/Indi/Chr.php +++ b/src/Parser/Indi/Chr.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Chr extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Chra.php b/src/Parser/Indi/Chra.php index cae82714..8c3575ab 100644 --- a/src/Parser/Indi/Chra.php +++ b/src/Parser/Indi/Chra.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Chra extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Conf.php b/src/Parser/Indi/Conf.php index 9ebc7849..5dd8154c 100644 --- a/src/Parser/Indi/Conf.php +++ b/src/Parser/Indi/Conf.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Conf extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Conl.php b/src/Parser/Indi/Conl.php index 952e976a..0a770c5c 100644 --- a/src/Parser/Indi/Conl.php +++ b/src/Parser/Indi/Conl.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Conl extends Lds { diff --git a/src/Parser/Indi/Crem.php b/src/Parser/Indi/Crem.php index 44c5ca58..262816b7 100644 --- a/src/Parser/Indi/Crem.php +++ b/src/Parser/Indi/Crem.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Crem extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Deat.php b/src/Parser/Indi/Deat.php index a1da3de8..c8b27fc3 100644 --- a/src/Parser/Indi/Deat.php +++ b/src/Parser/Indi/Deat.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Deat extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Dscr.php b/src/Parser/Indi/Dscr.php index 90b7bbff..09c96c26 100644 --- a/src/Parser/Indi/Dscr.php +++ b/src/Parser/Indi/Dscr.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Dscr extends \Parser\Indi\Attr { diff --git a/src/Parser/Indi/Educ.php b/src/Parser/Indi/Educ.php index f90d7784..d92bd6f0 100644 --- a/src/Parser/Indi/Educ.php +++ b/src/Parser/Indi/Educ.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Educ extends \Parser\Indi\Attr { diff --git a/src/Parser/Indi/Emig.php b/src/Parser/Indi/Emig.php index 2fb99fe6..91ffd25c 100644 --- a/src/Parser/Indi/Emig.php +++ b/src/Parser/Indi/Emig.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Emig extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Endl.php b/src/Parser/Indi/Endl.php index 2d0fbd22..bc0552a7 100644 --- a/src/Parser/Indi/Endl.php +++ b/src/Parser/Indi/Endl.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Endl extends Lds { diff --git a/src/Parser/Indi/Even.php b/src/Parser/Indi/Even.php index 55ccfaa1..b7c6118d 100644 --- a/src/Parser/Indi/Even.php +++ b/src/Parser/Indi/Even.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; use Parser\Chan; diff --git a/src/Parser/Indi/Even/Plac.php b/src/Parser/Indi/Even/Plac.php index 4e519a8b..2cb8bd78 100644 --- a/src/Parser/Indi/Even/Plac.php +++ b/src/Parser/Indi/Even/Plac.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi\Even; +namespace Gedcom\Parser\Indi\Even; class Plac extends \Parser\Component { diff --git a/src/Parser/Indi/Famc.php b/src/Parser/Indi/Famc.php index 1c22e039..361d0760 100644 --- a/src/Parser/Indi/Famc.php +++ b/src/Parser/Indi/Famc.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Famc extends \Parser\Component { diff --git a/src/Parser/Indi/Fams.php b/src/Parser/Indi/Fams.php index 815be836..568e3532 100644 --- a/src/Parser/Indi/Fams.php +++ b/src/Parser/Indi/Fams.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Fams extends \Parser\Component { diff --git a/src/Parser/Indi/Fcom.php b/src/Parser/Indi/Fcom.php index 00acd2cb..32f34346 100644 --- a/src/Parser/Indi/Fcom.php +++ b/src/Parser/Indi/Fcom.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Fcom extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Grad.php b/src/Parser/Indi/Grad.php index a053890e..76361858 100644 --- a/src/Parser/Indi/Grad.php +++ b/src/Parser/Indi/Grad.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Grad extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Idno.php b/src/Parser/Indi/Idno.php index 87bb3de7..61f089c2 100644 --- a/src/Parser/Indi/Idno.php +++ b/src/Parser/Indi/Idno.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Idno extends \Parser\Indi\Attr { diff --git a/src/Parser/Indi/Immi.php b/src/Parser/Indi/Immi.php index 818dfdde..582bd64b 100644 --- a/src/Parser/Indi/Immi.php +++ b/src/Parser/Indi/Immi.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Immi extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Lds.php b/src/Parser/Indi/Lds.php index 0a405702..3c381392 100644 --- a/src/Parser/Indi/Lds.php +++ b/src/Parser/Indi/Lds.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; abstract class Lds extends \Parser\Component { diff --git a/src/Parser/Indi/Name.php b/src/Parser/Indi/Name.php index 5d22c880..c9d7f3d3 100644 --- a/src/Parser/Indi/Name.php +++ b/src/Parser/Indi/Name.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Name extends \Parser\Component { diff --git a/src/Parser/Indi/Name/Fone.php b/src/Parser/Indi/Name/Fone.php index 798dc1ff..fab93515 100644 --- a/src/Parser/Indi/Name/Fone.php +++ b/src/Parser/Indi/Name/Fone.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi\Name; +namespace Gedcom\Parser\Indi\Name; class Fone extends \Parser\Component { diff --git a/src/Parser/Indi/Name/Romn.php b/src/Parser/Indi/Name/Romn.php index 23cf1888..59c1b77d 100644 --- a/src/Parser/Indi/Name/Romn.php +++ b/src/Parser/Indi/Name/Romn.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi\Name; +namespace Gedcom\Parser\Indi\Name; class Romn extends \Parser\Component { diff --git a/src/Parser/Indi/Nati.php b/src/Parser/Indi/Nati.php index a297e36e..69493891 100644 --- a/src/Parser/Indi/Nati.php +++ b/src/Parser/Indi/Nati.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Nati extends \Parser\Indi\Attr { diff --git a/src/Parser/Indi/Natu.php b/src/Parser/Indi/Natu.php index c2d6008a..169f9f23 100644 --- a/src/Parser/Indi/Natu.php +++ b/src/Parser/Indi/Natu.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Natu extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Nchi.php b/src/Parser/Indi/Nchi.php index ec827298..080daf98 100644 --- a/src/Parser/Indi/Nchi.php +++ b/src/Parser/Indi/Nchi.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Nchi extends \Parser\Indi\Attr { diff --git a/src/Parser/Indi/Nmr.php b/src/Parser/Indi/Nmr.php index f741e864..5ffd6720 100644 --- a/src/Parser/Indi/Nmr.php +++ b/src/Parser/Indi/Nmr.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Nmr extends \Parser\Indi\Attr { diff --git a/src/Parser/Indi/Occu.php b/src/Parser/Indi/Occu.php index fba0a51d..1c2a5d36 100644 --- a/src/Parser/Indi/Occu.php +++ b/src/Parser/Indi/Occu.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Occu extends \Parser\Indi\Attr { diff --git a/src/Parser/Indi/Ordn.php b/src/Parser/Indi/Ordn.php index 3f5f3e49..e492ce3c 100644 --- a/src/Parser/Indi/Ordn.php +++ b/src/Parser/Indi/Ordn.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Ordn extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Prob.php b/src/Parser/Indi/Prob.php index 7204d8cd..df8b115a 100644 --- a/src/Parser/Indi/Prob.php +++ b/src/Parser/Indi/Prob.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Prob extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Prop.php b/src/Parser/Indi/Prop.php index 8098532b..61a2ded4 100644 --- a/src/Parser/Indi/Prop.php +++ b/src/Parser/Indi/Prop.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Prop extends \Parser\Indi\Attr { diff --git a/src/Parser/Indi/Reli.php b/src/Parser/Indi/Reli.php index e1c0e68a..d1810ecf 100644 --- a/src/Parser/Indi/Reli.php +++ b/src/Parser/Indi/Reli.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Reli extends \Parser\Indi\Attr { diff --git a/src/Parser/Indi/Resi.php b/src/Parser/Indi/Resi.php index e679d9a7..7d3f02fc 100644 --- a/src/Parser/Indi/Resi.php +++ b/src/Parser/Indi/Resi.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Resi extends \Parser\Indi\Attr { diff --git a/src/Parser/Indi/Reti.php b/src/Parser/Indi/Reti.php index e75ccb5a..1cd4c039 100644 --- a/src/Parser/Indi/Reti.php +++ b/src/Parser/Indi/Reti.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Reti extends \Parser\Indi\Even { diff --git a/src/Parser/Indi/Slgc.php b/src/Parser/Indi/Slgc.php index dfa3d409..b358d341 100644 --- a/src/Parser/Indi/Slgc.php +++ b/src/Parser/Indi/Slgc.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Slgc extends Lds { diff --git a/src/Parser/Indi/Ssn.php b/src/Parser/Indi/Ssn.php index 42fcc0c2..47b72514 100644 --- a/src/Parser/Indi/Ssn.php +++ b/src/Parser/Indi/Ssn.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Ssn extends \Parser\Indi\Attr { diff --git a/src/Parser/Indi/Titl.php b/src/Parser/Indi/Titl.php index 00a0ca88..29a9e591 100644 --- a/src/Parser/Indi/Titl.php +++ b/src/Parser/Indi/Titl.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Titl extends \Parser\Indi\Attr { diff --git a/src/Parser/Indi/Will.php b/src/Parser/Indi/Will.php index 60ce052c..d38fc9ca 100644 --- a/src/Parser/Indi/Will.php +++ b/src/Parser/Indi/Will.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Indi; +namespace Gedcom\Parser\Indi; class Will extends \Parser\Indi\Even { diff --git a/src/Parser/Note.php b/src/Parser/Note.php index 477546e0..9e6fd0af 100644 --- a/src/Parser/Note.php +++ b/src/Parser/Note.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; class Note extends \Parser\Component { diff --git a/src/Parser/NoteRef.php b/src/Parser/NoteRef.php index 921ff9fc..d47d3b94 100644 --- a/src/Parser/NoteRef.php +++ b/src/Parser/NoteRef.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; class NoteRef extends \Parser\Component { diff --git a/src/Parser/Obje.php b/src/Parser/Obje.php index 5f14e4be..588fa3e3 100644 --- a/src/Parser/Obje.php +++ b/src/Parser/Obje.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; class Obje extends \Parser\Component { diff --git a/src/Parser/ObjeRef.php b/src/Parser/ObjeRef.php index de9785f8..9891342e 100644 --- a/src/Parser/ObjeRef.php +++ b/src/Parser/ObjeRef.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; class ObjeRef extends \Parser\Component { diff --git a/src/Parser/ObjeRef/File.php b/src/Parser/ObjeRef/File.php index bcdccebd..06a8142d 100644 --- a/src/Parser/ObjeRef/File.php +++ b/src/Parser/ObjeRef/File.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\ObjeRef; +namespace Gedcom\Parser\ObjeRef; class File extends \Parser\Component { diff --git a/src/Parser/ObjeRef/File/Form.php b/src/Parser/ObjeRef/File/Form.php index 111dfaee..6d0236c4 100644 --- a/src/Parser/ObjeRef/File/Form.php +++ b/src/Parser/ObjeRef/File/Form.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\ObjeRef\File; +namespace Gedcom\Parser\ObjeRef\File; class Form extends \Parser\Component { diff --git a/src/Parser/Phon.php b/src/Parser/Phon.php index e6222694..b36bf5a1 100644 --- a/src/Parser/Phon.php +++ b/src/Parser/Phon.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; class Phon extends \Parser\Component { diff --git a/src/Parser/Plac.php b/src/Parser/Plac.php index e9f7ab8d..167db311 100644 --- a/src/Parser/Plac.php +++ b/src/Parser/Plac.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; class Plac extends \Parser\Component { diff --git a/src/Parser/Plac/Fone.php b/src/Parser/Plac/Fone.php index 128614a3..eef7a43b 100644 --- a/src/Parser/Plac/Fone.php +++ b/src/Parser/Plac/Fone.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Plac; +namespace Gedcom\Parser\Plac; class Fone extends \Parser\Component { diff --git a/src/Parser/Plac/Map.php b/src/Parser/Plac/Map.php index 9497f2ad..a688f434 100644 --- a/src/Parser/Plac/Map.php +++ b/src/Parser/Plac/Map.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Plac; +namespace Gedcom\Parser\Plac; class Map extends \Parser\Component { diff --git a/src/Parser/Plac/Romn.php b/src/Parser/Plac/Romn.php index 96aead0f..78d521db 100644 --- a/src/Parser/Plac/Romn.php +++ b/src/Parser/Plac/Romn.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Plac; +namespace Gedcom\Parser\Plac; class Romn extends \Parser\Component { diff --git a/src/Parser/Refn.php b/src/Parser/Refn.php index 2162d29a..86d01b93 100644 --- a/src/Parser/Refn.php +++ b/src/Parser/Refn.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; class Refn extends \Parser\Component { diff --git a/src/Parser/Repo.php b/src/Parser/Repo.php index 4e8b0745..d61ed3fc 100644 --- a/src/Parser/Repo.php +++ b/src/Parser/Repo.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; class Repo extends \Parser\Component { diff --git a/src/Parser/RepoRef.php b/src/Parser/RepoRef.php index ec291449..b9860f91 100644 --- a/src/Parser/RepoRef.php +++ b/src/Parser/RepoRef.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; class RepoRef extends \Parser\Component { diff --git a/src/Parser/Sour.php b/src/Parser/Sour.php index dce63247..0497cc1a 100644 --- a/src/Parser/Sour.php +++ b/src/Parser/Sour.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; class Sour extends \Parser\Component { diff --git a/src/Parser/Sour/Data.php b/src/Parser/Sour/Data.php index 174c09ec..f1910e57 100644 --- a/src/Parser/Sour/Data.php +++ b/src/Parser/Sour/Data.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Sour; +namespace Gedcom\Parser\Sour; class Data extends \Parser\Component { diff --git a/src/Parser/Sour/Data/Even.php b/src/Parser/Sour/Data/Even.php index c15273be..28adcff9 100644 --- a/src/Parser/Sour/Data/Even.php +++ b/src/Parser/Sour/Data/Even.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Sour\Data; +namespace Gedcom\Parser\Sour\Data; class Even extends \Parser\Component { diff --git a/src/Parser/Sour/Repo.php b/src/Parser/Sour/Repo.php index 3bad0431..01fe3e83 100644 --- a/src/Parser/Sour/Repo.php +++ b/src/Parser/Sour/Repo.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Sour; +namespace Gedcom\Parser\Sour; class Repo extends \Parser\Component { diff --git a/src/Parser/Sour/Repo/Caln.php b/src/Parser/Sour/Repo/Caln.php index 7abbd60a..a55f6037 100644 --- a/src/Parser/Sour/Repo/Caln.php +++ b/src/Parser/Sour/Repo/Caln.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\Sour\Repo; +namespace Gedcom\Parser\Sour\Repo; class Caln extends \Parser\Component { diff --git a/src/Parser/SourRef.php b/src/Parser/SourRef.php index ded2f93b..9802678d 100644 --- a/src/Parser/SourRef.php +++ b/src/Parser/SourRef.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; class SourRef extends \Parser\Component { diff --git a/src/Parser/SourRef/Data.php b/src/Parser/SourRef/Data.php index c9666eee..20e9afc9 100644 --- a/src/Parser/SourRef/Data.php +++ b/src/Parser/SourRef/Data.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\SourRef; +namespace Gedcom\Parser\SourRef; class Data extends \Parser\Component { diff --git a/src/Parser/SourRef/Even.php b/src/Parser/SourRef/Even.php index 7fa8b217..5e889f5b 100644 --- a/src/Parser/SourRef/Even.php +++ b/src/Parser/SourRef/Even.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser\SourRef; +namespace Gedcom\Parser\SourRef; class Even extends \Parser\Component { diff --git a/src/Parser/Subm.php b/src/Parser/Subm.php index b8ed53e5..64bdad1d 100644 --- a/src/Parser/Subm.php +++ b/src/Parser/Subm.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; class Subm extends \Parser\Component { diff --git a/src/Parser/Subn.php b/src/Parser/Subn.php index feb6f5fd..6930df58 100644 --- a/src/Parser/Subn.php +++ b/src/Parser/Subn.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Parser; +namespace Gedcom\Parser; class Subn extends \Parser\Component { diff --git a/src/Record/Addr.php b/src/Record/Addr.php index f8a3cd02..d00a35f0 100644 --- a/src/Record/Addr.php +++ b/src/Record/Addr.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; use Record; diff --git a/src/Record/Caln.php b/src/Record/Caln.php index bf917a1f..2012d8aa 100644 --- a/src/Record/Caln.php +++ b/src/Record/Caln.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; use Record; diff --git a/src/Record/Chan.php b/src/Record/Chan.php index a6e5f7a9..fd233a73 100644 --- a/src/Record/Chan.php +++ b/src/Record/Chan.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; use Record; diff --git a/src/Record/Data.php b/src/Record/Data.php index dc404be7..42066926 100644 --- a/src/Record/Data.php +++ b/src/Record/Data.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; use Record; diff --git a/src/Record/Date.php b/src/Record/Date.php index d7bc22ca..b238db54 100644 --- a/src/Record/Date.php +++ b/src/Record/Date.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; use Record; diff --git a/src/Record/Fam.php b/src/Record/Fam.php index 4ce76663..b8eafe7f 100644 --- a/src/Record/Fam.php +++ b/src/Record/Fam.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; class Fam extends \Gedcom\Record implements Noteable, Sourceable, Objectable { diff --git a/src/Record/Fam/Anul.php b/src/Record/Fam/Anul.php index 9a63e87a..0b8b9525 100644 --- a/src/Record/Fam/Anul.php +++ b/src/Record/Fam/Anul.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Fam; +namespace Gedcom\Record\Fam; class Anul extends \Record\Fam\Even { diff --git a/src/Record/Fam/Cens.php b/src/Record/Fam/Cens.php index 901df6e7..01211c4e 100644 --- a/src/Record/Fam/Cens.php +++ b/src/Record/Fam/Cens.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Fam; +namespace Gedcom\Record\Fam; class Cens extends \Record\Fam\Even { diff --git a/src/Record/Fam/Div.php b/src/Record/Fam/Div.php index 9c27b220..5b6a2d59 100644 --- a/src/Record/Fam/Div.php +++ b/src/Record/Fam/Div.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Fam; +namespace Gedcom\Record\Fam; class Div extends \Record\Fam\Even { diff --git a/src/Record/Fam/Enga.php b/src/Record/Fam/Enga.php index b760da25..9d4eaa8e 100644 --- a/src/Record/Fam/Enga.php +++ b/src/Record/Fam/Enga.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Fam; +namespace Gedcom\Record\Fam; class Enga extends \Record\Fam\Even { diff --git a/src/Record/Fam/Even.php b/src/Record/Fam/Even.php index 6108783a..126e68b2 100644 --- a/src/Record/Fam/Even.php +++ b/src/Record/Fam/Even.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Fam; +namespace Gedcom\Record\Fam; use Record\Noteable; use Record\Objectable; diff --git a/src/Record/Fam/Even/Husb.php b/src/Record/Fam/Even/Husb.php index be5b4659..a7a9f8de 100644 --- a/src/Record/Fam/Even/Husb.php +++ b/src/Record/Fam/Even/Husb.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Fam\Even; +namespace Gedcom\Record\Fam\Even; class Husb extends \Gedcom\Record { diff --git a/src/Record/Fam/Even/Wife.php b/src/Record/Fam/Even/Wife.php index b0e19e02..3f618a9a 100644 --- a/src/Record/Fam/Even/Wife.php +++ b/src/Record/Fam/Even/Wife.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Fam\Even; +namespace Gedcom\Record\Fam\Even; class Wife extends \Gedcom\Record { diff --git a/src/Record/Fam/Marb.php b/src/Record/Fam/Marb.php index 0f904925..68a66009 100644 --- a/src/Record/Fam/Marb.php +++ b/src/Record/Fam/Marb.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Fam; +namespace Gedcom\Record\Fam; class Marb extends \Record\Fam\Even { diff --git a/src/Record/Fam/Marc.php b/src/Record/Fam/Marc.php index 819a37b2..5700ca70 100644 --- a/src/Record/Fam/Marc.php +++ b/src/Record/Fam/Marc.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Fam; +namespace Gedcom\Record\Fam; class Marc extends \Record\Fam\Even { diff --git a/src/Record/Fam/Marl.php b/src/Record/Fam/Marl.php index 9ee65c39..1b7183cd 100644 --- a/src/Record/Fam/Marl.php +++ b/src/Record/Fam/Marl.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Fam; +namespace Gedcom\Record\Fam; class Marl extends \Record\Fam\Even { diff --git a/src/Record/Fam/Marr.php b/src/Record/Fam/Marr.php index c8bd791d..b180e0ac 100644 --- a/src/Record/Fam/Marr.php +++ b/src/Record/Fam/Marr.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Fam; +namespace Gedcom\Record\Fam; class Marr extends \Record\Fam\Even { diff --git a/src/Record/Fam/Mars.php b/src/Record/Fam/Mars.php index 483ff47b..74b8a365 100644 --- a/src/Record/Fam/Mars.php +++ b/src/Record/Fam/Mars.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Fam; +namespace Gedcom\Record\Fam; class Mars extends \Record\Fam\Even { diff --git a/src/Record/Fam/Slgs.php b/src/Record/Fam/Slgs.php index a4d9ad8d..a4d234e7 100644 --- a/src/Record/Fam/Slgs.php +++ b/src/Record/Fam/Slgs.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Fam; +namespace Gedcom\Record\Fam; use Record\Noteable; use Record\Sourceable; diff --git a/src/Record/Fam/Slgs/Stat.php b/src/Record/Fam/Slgs/Stat.php index f91ebf42..c312f8c7 100644 --- a/src/Record/Fam/Slgs/Stat.php +++ b/src/Record/Fam/Slgs/Stat.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Fam\Slgs; +namespace Gedcom\Record\Fam\Slgs; class Stat extends \Gedcom\Record { diff --git a/src/Record/Head.php b/src/Record/Head.php index 8269f22e..75d917cc 100644 --- a/src/Record/Head.php +++ b/src/Record/Head.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; use Record; diff --git a/src/Record/Head/Char.php b/src/Record/Head/Char.php index 4b359ae3..e671cf27 100644 --- a/src/Record/Head/Char.php +++ b/src/Record/Head/Char.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Head; +namespace Gedcom\Record\Head; class Char extends \Gedcom\Record { diff --git a/src/Record/Head/Date.php b/src/Record/Head/Date.php index 37f99bd6..3d827035 100644 --- a/src/Record/Head/Date.php +++ b/src/Record/Head/Date.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Head; +namespace Gedcom\Record\Head; class Date extends \Gedcom\Record { diff --git a/src/Record/Head/Gedc.php b/src/Record/Head/Gedc.php index ba69fc4e..28e5c0fb 100644 --- a/src/Record/Head/Gedc.php +++ b/src/Record/Head/Gedc.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Head; +namespace Gedcom\Record\Head; class Gedc extends \Gedcom\Record { diff --git a/src/Record/Head/Plac.php b/src/Record/Head/Plac.php index 8beacea9..95b45e27 100644 --- a/src/Record/Head/Plac.php +++ b/src/Record/Head/Plac.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Head; +namespace Gedcom\Record\Head; class Plac extends \Gedcom\Record { diff --git a/src/Record/Head/Sour.php b/src/Record/Head/Sour.php index e33d4548..6f25f907 100644 --- a/src/Record/Head/Sour.php +++ b/src/Record/Head/Sour.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Head; +namespace Gedcom\Record\Head; class Sour extends \Gedcom\Record { diff --git a/src/Record/Head/Sour/Corp.php b/src/Record/Head/Sour/Corp.php index 3ef1384b..c8b5d581 100644 --- a/src/Record/Head/Sour/Corp.php +++ b/src/Record/Head/Sour/Corp.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Head\Sour; +namespace Gedcom\Record\Head\Sour; class Corp extends \Gedcom\Record { diff --git a/src/Record/Head/Sour/Data.php b/src/Record/Head/Sour/Data.php index ba28269c..a8f90912 100644 --- a/src/Record/Head/Sour/Data.php +++ b/src/Record/Head/Sour/Data.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Head\Sour; +namespace Gedcom\Record\Head\Sour; class Data extends \Gedcom\Record { diff --git a/src/Record/Indi.php b/src/Record/Indi.php index 03e3b3ae..945c9fa7 100644 --- a/src/Record/Indi.php +++ b/src/Record/Indi.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; use Record; diff --git a/src/Record/Indi/Adop.php b/src/Record/Indi/Adop.php index 19f5174a..0672cbe9 100644 --- a/src/Record/Indi/Adop.php +++ b/src/Record/Indi/Adop.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Adop extends \Record\Indi\Even { diff --git a/src/Record/Indi/Asso.php b/src/Record/Indi/Asso.php index e214417c..a1476821 100644 --- a/src/Record/Indi/Asso.php +++ b/src/Record/Indi/Asso.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; use Record\Noteable; use Record\Sourceable; diff --git a/src/Record/Indi/Attr.php b/src/Record/Indi/Attr.php index bff0e4a3..1fefbd2b 100644 --- a/src/Record/Indi/Attr.php +++ b/src/Record/Indi/Attr.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; use Record\Noteable; use Record\Objectable; diff --git a/src/Record/Indi/Bapl.php b/src/Record/Indi/Bapl.php index 1578996d..e5d2dcc9 100644 --- a/src/Record/Indi/Bapl.php +++ b/src/Record/Indi/Bapl.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Bapl extends Lds { diff --git a/src/Record/Indi/Bapm.php b/src/Record/Indi/Bapm.php index 304f8d5e..a4f596f5 100644 --- a/src/Record/Indi/Bapm.php +++ b/src/Record/Indi/Bapm.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Bapm extends \Record\Indi\Even { diff --git a/src/Record/Indi/Barm.php b/src/Record/Indi/Barm.php index ae67d986..3f5cc0c9 100644 --- a/src/Record/Indi/Barm.php +++ b/src/Record/Indi/Barm.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Barm extends \Record\Indi\Even { diff --git a/src/Record/Indi/Basm.php b/src/Record/Indi/Basm.php index ac0728b0..e87794eb 100644 --- a/src/Record/Indi/Basm.php +++ b/src/Record/Indi/Basm.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Basm extends \Record\Indi\Even { diff --git a/src/Record/Indi/Birt.php b/src/Record/Indi/Birt.php index 44dd7277..5ba17a50 100644 --- a/src/Record/Indi/Birt.php +++ b/src/Record/Indi/Birt.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; /** * Class Birt. diff --git a/src/Record/Indi/Bles.php b/src/Record/Indi/Bles.php index 566b6b9a..6c93ab64 100644 --- a/src/Record/Indi/Bles.php +++ b/src/Record/Indi/Bles.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Bles extends \Record\Indi\Even { diff --git a/src/Record/Indi/Buri.php b/src/Record/Indi/Buri.php index 33c991bc..4a67dfe4 100644 --- a/src/Record/Indi/Buri.php +++ b/src/Record/Indi/Buri.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Buri extends \Record\Indi\Even { diff --git a/src/Record/Indi/Cast.php b/src/Record/Indi/Cast.php index db5a03c2..a2a3afa4 100644 --- a/src/Record/Indi/Cast.php +++ b/src/Record/Indi/Cast.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Cast extends \Record\Indi\Attr { diff --git a/src/Record/Indi/Cens.php b/src/Record/Indi/Cens.php index 806c435e..7fd560aa 100644 --- a/src/Record/Indi/Cens.php +++ b/src/Record/Indi/Cens.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Cens extends \Record\Indi\Even { diff --git a/src/Record/Indi/Chr.php b/src/Record/Indi/Chr.php index 4708b283..c990b6b5 100644 --- a/src/Record/Indi/Chr.php +++ b/src/Record/Indi/Chr.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Chr extends \Record\Indi\Even { diff --git a/src/Record/Indi/Chra.php b/src/Record/Indi/Chra.php index 4d65bd87..1d1e4715 100644 --- a/src/Record/Indi/Chra.php +++ b/src/Record/Indi/Chra.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Chra extends \Record\Indi\Even { diff --git a/src/Record/Indi/Conf.php b/src/Record/Indi/Conf.php index 688891d3..9e7fb90f 100644 --- a/src/Record/Indi/Conf.php +++ b/src/Record/Indi/Conf.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Conf extends \Record\Indi\Even { diff --git a/src/Record/Indi/Conl.php b/src/Record/Indi/Conl.php index e6efc210..5e96638b 100644 --- a/src/Record/Indi/Conl.php +++ b/src/Record/Indi/Conl.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Conl extends Lds { diff --git a/src/Record/Indi/Crem.php b/src/Record/Indi/Crem.php index 5012a7a5..64040499 100644 --- a/src/Record/Indi/Crem.php +++ b/src/Record/Indi/Crem.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Crem extends \Record\Indi\Even { diff --git a/src/Record/Indi/Deat.php b/src/Record/Indi/Deat.php index 926ae56c..4f5eefef 100644 --- a/src/Record/Indi/Deat.php +++ b/src/Record/Indi/Deat.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Deat extends \Record\Indi\Even { diff --git a/src/Record/Indi/Dscr.php b/src/Record/Indi/Dscr.php index 0f5496b9..e76992ca 100644 --- a/src/Record/Indi/Dscr.php +++ b/src/Record/Indi/Dscr.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Dscr extends \Record\Indi\Attr { diff --git a/src/Record/Indi/Educ.php b/src/Record/Indi/Educ.php index 66c24c5e..c7d948f3 100644 --- a/src/Record/Indi/Educ.php +++ b/src/Record/Indi/Educ.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Educ extends \Record\Indi\Attr { diff --git a/src/Record/Indi/Emig.php b/src/Record/Indi/Emig.php index 0076f4cb..f64d0ec9 100644 --- a/src/Record/Indi/Emig.php +++ b/src/Record/Indi/Emig.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Emig extends \Record\Indi\Even { diff --git a/src/Record/Indi/Endl.php b/src/Record/Indi/Endl.php index 63152d8c..552e2d7d 100644 --- a/src/Record/Indi/Endl.php +++ b/src/Record/Indi/Endl.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Endl extends Lds { diff --git a/src/Record/Indi/Even.php b/src/Record/Indi/Even.php index ed7bd1d1..cfe352b1 100644 --- a/src/Record/Indi/Even.php +++ b/src/Record/Indi/Even.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; use Record; diff --git a/src/Record/Indi/Even/Plac.php b/src/Record/Indi/Even/Plac.php index 6d6f73c9..b063fe6f 100644 --- a/src/Record/Indi/Even/Plac.php +++ b/src/Record/Indi/Even/Plac.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi\Even; +namespace Gedcom\Record\Indi\Even; use Record; diff --git a/src/Record/Indi/Famc.php b/src/Record/Indi/Famc.php index 7e6578f1..d63e3b37 100644 --- a/src/Record/Indi/Famc.php +++ b/src/Record/Indi/Famc.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; use Record\Noteable; diff --git a/src/Record/Indi/Fams.php b/src/Record/Indi/Fams.php index e6b494ad..9489d52e 100644 --- a/src/Record/Indi/Fams.php +++ b/src/Record/Indi/Fams.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; use Record\Noteable; diff --git a/src/Record/Indi/Fcom.php b/src/Record/Indi/Fcom.php index 5141b87e..b721ceb1 100644 --- a/src/Record/Indi/Fcom.php +++ b/src/Record/Indi/Fcom.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Fcom extends \Record\Indi\Even { diff --git a/src/Record/Indi/Grad.php b/src/Record/Indi/Grad.php index 0d3d359e..c602c989 100644 --- a/src/Record/Indi/Grad.php +++ b/src/Record/Indi/Grad.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Grad extends \Record\Indi\Even { diff --git a/src/Record/Indi/Idno.php b/src/Record/Indi/Idno.php index 2dcbb594..cecaf9b8 100644 --- a/src/Record/Indi/Idno.php +++ b/src/Record/Indi/Idno.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Idno extends \Record\Indi\Attr { diff --git a/src/Record/Indi/Immi.php b/src/Record/Indi/Immi.php index d565238f..c1a632e8 100644 --- a/src/Record/Indi/Immi.php +++ b/src/Record/Indi/Immi.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Immi extends \Record\Indi\Even { diff --git a/src/Record/Indi/Lds.php b/src/Record/Indi/Lds.php index e344452d..0f8236f7 100644 --- a/src/Record/Indi/Lds.php +++ b/src/Record/Indi/Lds.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; use Record\Noteable; use Record\Sourceable; diff --git a/src/Record/Indi/Name.php b/src/Record/Indi/Name.php index 2d7e7747..60101e81 100644 --- a/src/Record/Indi/Name.php +++ b/src/Record/Indi/Name.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; /** * @method string getName() diff --git a/src/Record/Indi/Name/Fone.php b/src/Record/Indi/Name/Fone.php index e7d0ed9b..c7422fb1 100644 --- a/src/Record/Indi/Name/Fone.php +++ b/src/Record/Indi/Name/Fone.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi\Name; +namespace Gedcom\Record\Indi\Name; use Record; diff --git a/src/Record/Indi/Name/Romn.php b/src/Record/Indi/Name/Romn.php index 27de4d73..8d05ec56 100644 --- a/src/Record/Indi/Name/Romn.php +++ b/src/Record/Indi/Name/Romn.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi\Name; +namespace Gedcom\Record\Indi\Name; use Record; diff --git a/src/Record/Indi/Nati.php b/src/Record/Indi/Nati.php index 77ac6dec..a1cc80ee 100644 --- a/src/Record/Indi/Nati.php +++ b/src/Record/Indi/Nati.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Nati extends \Record\Indi\Attr { diff --git a/src/Record/Indi/Natu.php b/src/Record/Indi/Natu.php index 938e2bee..92774bfb 100644 --- a/src/Record/Indi/Natu.php +++ b/src/Record/Indi/Natu.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Natu extends \Record\Indi\Even { diff --git a/src/Record/Indi/Nchi.php b/src/Record/Indi/Nchi.php index 687821c1..7962f0f9 100644 --- a/src/Record/Indi/Nchi.php +++ b/src/Record/Indi/Nchi.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Nchi extends \Record\Indi\Attr { diff --git a/src/Record/Indi/Nmr.php b/src/Record/Indi/Nmr.php index d73235eb..89c06a13 100644 --- a/src/Record/Indi/Nmr.php +++ b/src/Record/Indi/Nmr.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Nmr extends \Record\Indi\Attr { diff --git a/src/Record/Indi/Note.php b/src/Record/Indi/Note.php index b79e322d..0861102c 100644 --- a/src/Record/Indi/Note.php +++ b/src/Record/Indi/Note.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Note extends \Record\NoteRefAbstract { diff --git a/src/Record/Indi/Occu.php b/src/Record/Indi/Occu.php index 0307f344..859e3c2c 100644 --- a/src/Record/Indi/Occu.php +++ b/src/Record/Indi/Occu.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Occu extends \Record\Indi\Attr { diff --git a/src/Record/Indi/Ordn.php b/src/Record/Indi/Ordn.php index dc1e0f4a..f8bd1c6b 100644 --- a/src/Record/Indi/Ordn.php +++ b/src/Record/Indi/Ordn.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Ordn extends \Record\Indi\Even { diff --git a/src/Record/Indi/Prob.php b/src/Record/Indi/Prob.php index a0b4e457..a2d950dd 100644 --- a/src/Record/Indi/Prob.php +++ b/src/Record/Indi/Prob.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Prob extends \Record\Indi\Even { diff --git a/src/Record/Indi/Prop.php b/src/Record/Indi/Prop.php index c4fdc192..4eeb90ef 100644 --- a/src/Record/Indi/Prop.php +++ b/src/Record/Indi/Prop.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Prop extends \Record\Indi\Attr { diff --git a/src/Record/Indi/Reli.php b/src/Record/Indi/Reli.php index 55aaaa7a..6ae556f1 100644 --- a/src/Record/Indi/Reli.php +++ b/src/Record/Indi/Reli.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Reli extends \Record\Indi\Attr { diff --git a/src/Record/Indi/Resi.php b/src/Record/Indi/Resi.php index 945b71e5..78bf5721 100644 --- a/src/Record/Indi/Resi.php +++ b/src/Record/Indi/Resi.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Resi extends \Record\Indi\Attr { diff --git a/src/Record/Indi/Reti.php b/src/Record/Indi/Reti.php index 2a7f2a10..efbb7e2b 100644 --- a/src/Record/Indi/Reti.php +++ b/src/Record/Indi/Reti.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Reti extends \Record\Indi\Even { diff --git a/src/Record/Indi/Slgc.php b/src/Record/Indi/Slgc.php index 964f5c8a..6dc1e6c0 100644 --- a/src/Record/Indi/Slgc.php +++ b/src/Record/Indi/Slgc.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Slgc extends Lds { diff --git a/src/Record/Indi/Ssn.php b/src/Record/Indi/Ssn.php index 2e157d97..f09115f5 100644 --- a/src/Record/Indi/Ssn.php +++ b/src/Record/Indi/Ssn.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Ssn extends \Record\Indi\Attr { diff --git a/src/Record/Indi/Titl.php b/src/Record/Indi/Titl.php index 43326743..2d7b27e8 100644 --- a/src/Record/Indi/Titl.php +++ b/src/Record/Indi/Titl.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Titl extends \Record\Indi\Attr { diff --git a/src/Record/Indi/Will.php b/src/Record/Indi/Will.php index 848b2f2c..fd259a20 100644 --- a/src/Record/Indi/Will.php +++ b/src/Record/Indi/Will.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Indi; +namespace Gedcom\Record\Indi; class Will extends \Record\Indi\Even { diff --git a/src/Record/Note.php b/src/Record/Note.php index 78cae0d5..3a6b9a9e 100644 --- a/src/Record/Note.php +++ b/src/Record/Note.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; class Note extends \Gedcom\Record implements Sourceable { diff --git a/src/Record/NoteRef.php b/src/Record/NoteRef.php index 754db9bf..aafcec43 100644 --- a/src/Record/NoteRef.php +++ b/src/Record/NoteRef.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; class NoteRef extends \Gedcom\Record implements Sourceable { diff --git a/src/Record/Noteable.php b/src/Record/Noteable.php index fef38ed1..03f06954 100644 --- a/src/Record/Noteable.php +++ b/src/Record/Noteable.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; interface Noteable { diff --git a/src/Record/Obje.php b/src/Record/Obje.php index c91152bc..e660f0ae 100644 --- a/src/Record/Obje.php +++ b/src/Record/Obje.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; class Obje extends \Gedcom\Record implements Noteable { diff --git a/src/Record/ObjeRef.php b/src/Record/ObjeRef.php index 86c7d742..9781ec9e 100644 --- a/src/Record/ObjeRef.php +++ b/src/Record/ObjeRef.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; class ObjeRef extends \Gedcom\Record { diff --git a/src/Record/ObjeRef/File.php b/src/Record/ObjeRef/File.php index 015b05c5..8712f69d 100644 --- a/src/Record/ObjeRef/File.php +++ b/src/Record/ObjeRef/File.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\ObjeRef; +namespace Gedcom\Record\ObjeRef; use Record; diff --git a/src/Record/ObjeRef/File/Form.php b/src/Record/ObjeRef/File/Form.php index 7b20c468..8a003593 100644 --- a/src/Record/ObjeRef/File/Form.php +++ b/src/Record/ObjeRef/File/Form.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\ObjeRef\File; +namespace Gedcom\Record\ObjeRef\File; use Record; diff --git a/src/Record/Objectable.php b/src/Record/Objectable.php index 6e1e09f9..3b070d5f 100644 --- a/src/Record/Objectable.php +++ b/src/Record/Objectable.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; interface Objectable { diff --git a/src/Record/Phon.php b/src/Record/Phon.php index a1aa98a7..945851f0 100644 --- a/src/Record/Phon.php +++ b/src/Record/Phon.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; use Record; diff --git a/src/Record/Plac.php b/src/Record/Plac.php index 9c2835a9..749dbb14 100644 --- a/src/Record/Plac.php +++ b/src/Record/Plac.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; class Plac extends \Gedcom\Record implements Noteable { diff --git a/src/Record/Plac/Fone.php b/src/Record/Plac/Fone.php index 0e3c98e6..d1f1d4f5 100644 --- a/src/Record/Plac/Fone.php +++ b/src/Record/Plac/Fone.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Plac; +namespace Gedcom\Record\Plac; use Record; diff --git a/src/Record/Plac/Map.php b/src/Record/Plac/Map.php index 41827d75..b37c668d 100644 --- a/src/Record/Plac/Map.php +++ b/src/Record/Plac/Map.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Plac; +namespace Gedcom\Record\Plac; use Record; diff --git a/src/Record/Plac/Romn.php b/src/Record/Plac/Romn.php index 650c547e..cd06e45d 100644 --- a/src/Record/Plac/Romn.php +++ b/src/Record/Plac/Romn.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Plac; +namespace Gedcom\Record\Plac; use Record; diff --git a/src/Record/Refn.php b/src/Record/Refn.php index eff75f15..d9178de7 100644 --- a/src/Record/Refn.php +++ b/src/Record/Refn.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; use Record; diff --git a/src/Record/Repo.php b/src/Record/Repo.php index 31294b32..a587f22b 100644 --- a/src/Record/Repo.php +++ b/src/Record/Repo.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; use Record; diff --git a/src/Record/RepoRef.php b/src/Record/RepoRef.php index 4dd20fba..70580625 100644 --- a/src/Record/RepoRef.php +++ b/src/Record/RepoRef.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; class RepoRef extends \Gedcom\Record implements Noteable { diff --git a/src/Record/Sour.php b/src/Record/Sour.php index 88a17730..74984a54 100644 --- a/src/Record/Sour.php +++ b/src/Record/Sour.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; use Record; diff --git a/src/Record/Sour/Data.php b/src/Record/Sour/Data.php index 3d7683b3..dd711b3d 100644 --- a/src/Record/Sour/Data.php +++ b/src/Record/Sour/Data.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Sour; +namespace Gedcom\Record\Sour; use Record\Noteable; diff --git a/src/Record/Sour/Data/Even.php b/src/Record/Sour/Data/Even.php index 4ea9d845..7cd96073 100644 --- a/src/Record/Sour/Data/Even.php +++ b/src/Record/Sour/Data/Even.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Sour\Data; +namespace Gedcom\Record\Sour\Data; class Even extends \Gedcom\Record { diff --git a/src/Record/Sour/Repo.php b/src/Record/Sour/Repo.php index 773cd43e..231d8d8d 100644 --- a/src/Record/Sour/Repo.php +++ b/src/Record/Sour/Repo.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Sour; +namespace Gedcom\Record\Sour; use Record\Noteable; diff --git a/src/Record/Sour/Repo/Caln.php b/src/Record/Sour/Repo/Caln.php index b1e2e5e3..f2291a8b 100644 --- a/src/Record/Sour/Repo/Caln.php +++ b/src/Record/Sour/Repo/Caln.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\Sour\Repo; +namespace Gedcom\Record\Sour\Repo; class Caln extends \Gedcom\Record { diff --git a/src/Record/SourRef.php b/src/Record/SourRef.php index b6befc68..e495f57e 100644 --- a/src/Record/SourRef.php +++ b/src/Record/SourRef.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; class SourRef extends \Gedcom\Record { diff --git a/src/Record/SourRef/Data.php b/src/Record/SourRef/Data.php index 61dc51f1..1b73550c 100644 --- a/src/Record/SourRef/Data.php +++ b/src/Record/SourRef/Data.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\SourRef; +namespace Gedcom\Record\SourRef; class Data extends \Gedcom\Record { diff --git a/src/Record/SourRef/Even.php b/src/Record/SourRef/Even.php index 8120bee5..dc902604 100644 --- a/src/Record/SourRef/Even.php +++ b/src/Record/SourRef/Even.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record\SourRef; +namespace Gedcom\Record\SourRef; class Even extends \Gedcom\Record { diff --git a/src/Record/Sourceable.php b/src/Record/Sourceable.php index e2ee9ad8..d9b9612a 100644 --- a/src/Record/Sourceable.php +++ b/src/Record/Sourceable.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; interface Sourceable { diff --git a/src/Record/Subm.php b/src/Record/Subm.php index feb36c67..adc58084 100644 --- a/src/Record/Subm.php +++ b/src/Record/Subm.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; use Record; diff --git a/src/Record/Subn.php b/src/Record/Subn.php index beb91484..21d584d4 100644 --- a/src/Record/Subn.php +++ b/src/Record/Subn.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Record; +namespace Gedcom\Record; use Record; diff --git a/src/Writer/Addr.php b/src/Writer/Addr.php index cce90182..955a8e1a 100644 --- a/src/Writer/Addr.php +++ b/src/Writer/Addr.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer; +namespace Gedcom\Writer; class Addr { diff --git a/src/Writer/Caln.php b/src/Writer/Caln.php index 4f526c3b..db7f21cc 100644 --- a/src/Writer/Caln.php +++ b/src/Writer/Caln.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer; +namespace Gedcom\Writer; class Caln { diff --git a/src/Writer/Chan.php b/src/Writer/Chan.php index d825e76e..a3f82b1b 100644 --- a/src/Writer/Chan.php +++ b/src/Writer/Chan.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer; +namespace Gedcom\Writer; class Chan { diff --git a/src/Writer/Fam.php b/src/Writer/Fam.php index 661bedf1..9a3d7d3c 100644 --- a/src/Writer/Fam.php +++ b/src/Writer/Fam.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer; +namespace Gedcom\Writer; class Fam { diff --git a/src/Writer/Fam/Even.php b/src/Writer/Fam/Even.php index 085c99fe..518c66ec 100644 --- a/src/Writer/Fam/Even.php +++ b/src/Writer/Fam/Even.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\Fam; +namespace Gedcom\Writer\Fam; class Even { diff --git a/src/Writer/Fam/Even/Husb.php b/src/Writer/Fam/Even/Husb.php index 5e5554ea..ec14911b 100644 --- a/src/Writer/Fam/Even/Husb.php +++ b/src/Writer/Fam/Even/Husb.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\Fam\Even; +namespace Gedcom\Writer\Fam\Even; class Husb { diff --git a/src/Writer/Fam/Even/Wife.php b/src/Writer/Fam/Even/Wife.php index 47ccd8d9..65059df6 100644 --- a/src/Writer/Fam/Even/Wife.php +++ b/src/Writer/Fam/Even/Wife.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\Fam\Even; +namespace Gedcom\Writer\Fam\Even; class Wife { diff --git a/src/Writer/Fam/Slgs.php b/src/Writer/Fam/Slgs.php index d43851cd..95727b05 100644 --- a/src/Writer/Fam/Slgs.php +++ b/src/Writer/Fam/Slgs.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\Fam; +namespace Gedcom\Writer\Fam; class Slgs { diff --git a/src/Writer/Head.php b/src/Writer/Head.php index 25a3a923..38e310b8 100644 --- a/src/Writer/Head.php +++ b/src/Writer/Head.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer; +namespace Gedcom\Writer; class Head { diff --git a/src/Writer/Head/Char.php b/src/Writer/Head/Char.php index 505401b5..38dd35bb 100644 --- a/src/Writer/Head/Char.php +++ b/src/Writer/Head/Char.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\Head; +namespace Gedcom\Writer\Head; class Char { diff --git a/src/Writer/Head/Date.php b/src/Writer/Head/Date.php index 247ebc86..11909c57 100644 --- a/src/Writer/Head/Date.php +++ b/src/Writer/Head/Date.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\Head; +namespace Gedcom\Writer\Head; class Date { diff --git a/src/Writer/Head/Gedc.php b/src/Writer/Head/Gedc.php index 4833a7d8..ddea7755 100644 --- a/src/Writer/Head/Gedc.php +++ b/src/Writer/Head/Gedc.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\Head; +namespace Gedcom\Writer\Head; class Gedc { diff --git a/src/Writer/Head/Plac.php b/src/Writer/Head/Plac.php index 7f78c659..46baeb2c 100644 --- a/src/Writer/Head/Plac.php +++ b/src/Writer/Head/Plac.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\Head; +namespace Gedcom\Writer\Head; class Plac { diff --git a/src/Writer/Head/Sour.php b/src/Writer/Head/Sour.php index 92c98485..9a692ccf 100644 --- a/src/Writer/Head/Sour.php +++ b/src/Writer/Head/Sour.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\Head; +namespace Gedcom\Writer\Head; class Sour { diff --git a/src/Writer/Head/Sour/Corp.php b/src/Writer/Head/Sour/Corp.php index accaa62a..10dac0b6 100644 --- a/src/Writer/Head/Sour/Corp.php +++ b/src/Writer/Head/Sour/Corp.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\Head\Sour; +namespace Gedcom\Writer\Head\Sour; class Corp { diff --git a/src/Writer/Head/Sour/Data.php b/src/Writer/Head/Sour/Data.php index 9095e6d5..17097756 100644 --- a/src/Writer/Head/Sour/Data.php +++ b/src/Writer/Head/Sour/Data.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\Head\Sour; +namespace Gedcom\Writer\Head\Sour; class Data { diff --git a/src/Writer/Indi.php b/src/Writer/Indi.php index 92a35d16..28bc8cd5 100644 --- a/src/Writer/Indi.php +++ b/src/Writer/Indi.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer; +namespace Gedcom\Writer; class Indi { diff --git a/src/Writer/Indi/Asso.php b/src/Writer/Indi/Asso.php index 5efcf33e..cf862f8c 100644 --- a/src/Writer/Indi/Asso.php +++ b/src/Writer/Indi/Asso.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\Indi; +namespace Gedcom\Writer\Indi; class Asso { diff --git a/src/Writer/Indi/Attr.php b/src/Writer/Indi/Attr.php index 0e718eb8..2cc7ff37 100644 --- a/src/Writer/Indi/Attr.php +++ b/src/Writer/Indi/Attr.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\Indi; +namespace Gedcom\Writer\Indi; class Attr { diff --git a/src/Writer/Indi/Even.php b/src/Writer/Indi/Even.php index 162f37d3..473514ab 100644 --- a/src/Writer/Indi/Even.php +++ b/src/Writer/Indi/Even.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\Indi; +namespace Gedcom\Writer\Indi; class Even { diff --git a/src/Writer/Indi/Even/Plac.php b/src/Writer/Indi/Even/Plac.php index fc6601af..15cbbd84 100644 --- a/src/Writer/Indi/Even/Plac.php +++ b/src/Writer/Indi/Even/Plac.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\Indi\Even; +namespace Gedcom\Writer\Indi\Even; class Plac { diff --git a/src/Writer/Indi/Famc.php b/src/Writer/Indi/Famc.php index 61bea234..cb46f259 100644 --- a/src/Writer/Indi/Famc.php +++ b/src/Writer/Indi/Famc.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\Indi; +namespace Gedcom\Writer\Indi; class Famc { diff --git a/src/Writer/Indi/Fams.php b/src/Writer/Indi/Fams.php index e6654ad3..3bc51bbb 100644 --- a/src/Writer/Indi/Fams.php +++ b/src/Writer/Indi/Fams.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\Indi; +namespace Gedcom\Writer\Indi; class Fams { diff --git a/src/Writer/Indi/Name.php b/src/Writer/Indi/Name.php index 502a1f37..3caf48b9 100644 --- a/src/Writer/Indi/Name.php +++ b/src/Writer/Indi/Name.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\Indi; +namespace Gedcom\Writer\Indi; class Name { diff --git a/src/Writer/Note.php b/src/Writer/Note.php index fb0d5673..d090adbf 100644 --- a/src/Writer/Note.php +++ b/src/Writer/Note.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer; +namespace Gedcom\Writer; class Note { diff --git a/src/Writer/NoteRef.php b/src/Writer/NoteRef.php index 46c9f877..41850c28 100644 --- a/src/Writer/NoteRef.php +++ b/src/Writer/NoteRef.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer; +namespace Gedcom\Writer; class NoteRef { diff --git a/src/Writer/Obje.php b/src/Writer/Obje.php index acbd13b8..5b2caed5 100644 --- a/src/Writer/Obje.php +++ b/src/Writer/Obje.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer; +namespace Gedcom\Writer; class Obje { diff --git a/src/Writer/ObjeRef.php b/src/Writer/ObjeRef.php index cf1d842e..05a40736 100644 --- a/src/Writer/ObjeRef.php +++ b/src/Writer/ObjeRef.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer; +namespace Gedcom\Writer; class ObjeRef { diff --git a/src/Writer/Phon.php b/src/Writer/Phon.php index 86cc7c91..97827445 100644 --- a/src/Writer/Phon.php +++ b/src/Writer/Phon.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer; +namespace Gedcom\Writer; class Phon { diff --git a/src/Writer/Refn.php b/src/Writer/Refn.php index 59762838..930d11ca 100644 --- a/src/Writer/Refn.php +++ b/src/Writer/Refn.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer; +namespace Gedcom\Writer; class Refn { diff --git a/src/Writer/Repo.php b/src/Writer/Repo.php index da671736..f6ab589d 100644 --- a/src/Writer/Repo.php +++ b/src/Writer/Repo.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer; +namespace Gedcom\Writer; class Repo { diff --git a/src/Writer/RepoRef.php b/src/Writer/RepoRef.php index 2f919c5c..f54e15e4 100644 --- a/src/Writer/RepoRef.php +++ b/src/Writer/RepoRef.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer; +namespace Gedcom\Writer; class RepoRef { diff --git a/src/Writer/Sour.php b/src/Writer/Sour.php index dc9b4448..d51c1c30 100644 --- a/src/Writer/Sour.php +++ b/src/Writer/Sour.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer; +namespace Gedcom\Writer; class Sour { diff --git a/src/Writer/Sour/Data.php b/src/Writer/Sour/Data.php index 1e168e20..daa01af9 100644 --- a/src/Writer/Sour/Data.php +++ b/src/Writer/Sour/Data.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\Sour; +namespace Gedcom\Writer\Sour; class Data { diff --git a/src/Writer/Sour/Data/Even.php b/src/Writer/Sour/Data/Even.php index 30289ab4..120bff37 100644 --- a/src/Writer/Sour/Data/Even.php +++ b/src/Writer/Sour/Data/Even.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\Sour\Data; +namespace Gedcom\Writer\Sour\Data; class Even { diff --git a/src/Writer/SourRef.php b/src/Writer/SourRef.php index 9043d030..454fb5e5 100644 --- a/src/Writer/SourRef.php +++ b/src/Writer/SourRef.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer; +namespace Gedcom\Writer; class SourRef { diff --git a/src/Writer/SourRef/Even.php b/src/Writer/SourRef/Even.php index 22c3d4d2..b1f6f812 100644 --- a/src/Writer/SourRef/Even.php +++ b/src/Writer/SourRef/Even.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer\SourRef; +namespace Gedcom\Writer\SourRef; class Even { diff --git a/src/Writer/Subm.php b/src/Writer/Subm.php index a7ee4bd8..e5c3537a 100644 --- a/src/Writer/Subm.php +++ b/src/Writer/Subm.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer; +namespace Gedcom\Writer; class Subm { diff --git a/src/Writer/Subn.php b/src/Writer/Subn.php index 8f656e32..b49dbe33 100644 --- a/src/Writer/Subn.php +++ b/src/Writer/Subn.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Writer; +namespace Gedcom\Writer; class Subn { From ff9071d95c1fd80b177b31a7d53b8a125c104b83 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sat, 17 Jul 2021 22:13:47 +0100 Subject: [PATCH 65/99] Update PSR4. --- src/Parser/Addr.php | 2 +- src/Parser/Caln.php | 2 +- src/Parser/Chan.php | 2 +- src/Parser/Date.php | 2 +- src/Parser/Fam.php | 2 +- src/Parser/Fam/Anul.php | 2 +- src/Parser/Fam/Cens.php | 2 +- src/Parser/Fam/Div.php | 2 +- src/Parser/Fam/Divf.php | 2 +- src/Parser/Fam/Enga.php | 2 +- src/Parser/Fam/Even.php | 2 +- src/Parser/Fam/Even/Husb.php | 2 +- src/Parser/Fam/Even/Wife.php | 2 +- src/Parser/Fam/Marb.php | 2 +- src/Parser/Fam/Marc.php | 2 +- src/Parser/Fam/Marl.php | 2 +- src/Parser/Fam/Marr.php | 2 +- src/Parser/Fam/Mars.php | 2 +- src/Parser/Fam/Slgs.php | 2 +- src/Parser/Fam/Slgs/Stat.php | 2 +- src/Parser/Head.php | 2 +- src/Parser/Head/Char.php | 2 +- src/Parser/Head/Date.php | 2 +- src/Parser/Head/Gedc.php | 2 +- src/Parser/Head/Plac.php | 2 +- src/Parser/Head/Sour.php | 2 +- src/Parser/Head/Sour/Corp.php | 2 +- src/Parser/Head/Sour/Data.php | 2 +- src/Parser/Indi.php | 2 +- src/Parser/Indi/Adop.php | 2 +- src/Parser/Indi/Asso.php | 2 +- src/Parser/Indi/Attr.php | 2 +- src/Parser/Indi/Bapm.php | 2 +- src/Parser/Indi/Barm.php | 2 +- src/Parser/Indi/Basm.php | 2 +- src/Parser/Indi/Birt.php | 2 +- src/Parser/Indi/Bles.php | 2 +- src/Parser/Indi/Buri.php | 2 +- src/Parser/Indi/Cast.php | 2 +- src/Parser/Indi/Cens.php | 2 +- src/Parser/Indi/Chr.php | 2 +- src/Parser/Indi/Chra.php | 2 +- src/Parser/Indi/Conf.php | 2 +- src/Parser/Indi/Crem.php | 2 +- src/Parser/Indi/Deat.php | 2 +- src/Parser/Indi/Dscr.php | 2 +- src/Parser/Indi/Educ.php | 2 +- src/Parser/Indi/Emig.php | 2 +- src/Parser/Indi/Even.php | 2 +- src/Parser/Indi/Even/Plac.php | 2 +- src/Parser/Indi/Famc.php | 2 +- src/Parser/Indi/Fams.php | 2 +- src/Parser/Indi/Fcom.php | 2 +- src/Parser/Indi/Grad.php | 2 +- src/Parser/Indi/Idno.php | 2 +- src/Parser/Indi/Immi.php | 2 +- src/Parser/Indi/Lds.php | 2 +- src/Parser/Indi/Name.php | 2 +- src/Parser/Indi/Name/Fone.php | 2 +- src/Parser/Indi/Name/Romn.php | 2 +- src/Parser/Indi/Nati.php | 2 +- src/Parser/Indi/Natu.php | 2 +- src/Parser/Indi/Nchi.php | 2 +- src/Parser/Indi/Nmr.php | 2 +- src/Parser/Indi/Occu.php | 2 +- src/Parser/Indi/Ordn.php | 2 +- src/Parser/Indi/Prob.php | 2 +- src/Parser/Indi/Prop.php | 2 +- src/Parser/Indi/Reli.php | 2 +- src/Parser/Indi/Resi.php | 2 +- src/Parser/Indi/Reti.php | 2 +- src/Parser/Indi/Ssn.php | 2 +- src/Parser/Indi/Titl.php | 2 +- src/Parser/Indi/Will.php | 2 +- src/Parser/Note.php | 2 +- src/Parser/NoteRef.php | 2 +- src/Parser/Obje.php | 2 +- src/Parser/ObjeRef.php | 2 +- src/Parser/ObjeRef/File.php | 2 +- src/Parser/ObjeRef/File/Form.php | 2 +- src/Parser/Phon.php | 2 +- src/Parser/Plac.php | 2 +- src/Parser/Plac/Fone.php | 2 +- src/Parser/Plac/Map.php | 2 +- src/Parser/Plac/Romn.php | 2 +- src/Parser/Refn.php | 2 +- src/Parser/Repo.php | 2 +- src/Parser/RepoRef.php | 2 +- src/Parser/Sour.php | 2 +- src/Parser/Sour/Data.php | 2 +- src/Parser/Sour/Data/Even.php | 2 +- src/Parser/Sour/Repo.php | 2 +- src/Parser/Sour/Repo/Caln.php | 2 +- src/Parser/SourRef.php | 2 +- src/Parser/SourRef/Data.php | 2 +- src/Parser/SourRef/Even.php | 2 +- src/Parser/Subm.php | 2 +- src/Parser/Subn.php | 2 +- src/Record/Addr.php | 2 +- src/Record/Caln.php | 2 +- src/Record/Chan.php | 2 +- src/Record/Data.php | 2 +- src/Record/Date.php | 2 +- src/Record/Head.php | 2 +- src/Record/Indi.php | 2 +- src/Record/Indi/Even.php | 2 +- src/Record/Indi/Even/Plac.php | 2 +- src/Record/Indi/Name/Fone.php | 2 +- src/Record/Indi/Name/Romn.php | 2 +- src/Record/ObjeRef/File.php | 2 +- src/Record/ObjeRef/File/Form.php | 2 +- src/Record/Phon.php | 2 +- src/Record/Plac/Fone.php | 2 +- src/Record/Plac/Map.php | 2 +- src/Record/Plac/Romn.php | 2 +- src/Record/Refn.php | 2 +- src/Record/Repo.php | 2 +- src/Record/Sour.php | 2 +- src/Record/Subm.php | 2 +- src/Record/Subn.php | 2 +- 120 files changed, 120 insertions(+), 120 deletions(-) diff --git a/src/Parser/Addr.php b/src/Parser/Addr.php index c6c0bd46..956af97c 100644 --- a/src/Parser/Addr.php +++ b/src/Parser/Addr.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser; -class Addr extends \Parser\Component +class Addr extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Caln.php b/src/Parser/Caln.php index 574da698..eb0c4ecb 100644 --- a/src/Parser/Caln.php +++ b/src/Parser/Caln.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser; -class Caln extends \Parser\Component +class Caln extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Chan.php b/src/Parser/Chan.php index 47087e96..b3f57b4f 100644 --- a/src/Parser/Chan.php +++ b/src/Parser/Chan.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser; -class Chan extends \Parser\Component +class Chan extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Date.php b/src/Parser/Date.php index bac89dd4..5b6f8465 100644 --- a/src/Parser/Date.php +++ b/src/Parser/Date.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser; -class Date extends \Parser\Component +class Date extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Fam.php b/src/Parser/Fam.php index 2d22a279..e44f5d22 100644 --- a/src/Parser/Fam.php +++ b/src/Parser/Fam.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser; -class Fam extends \Parser\Component +class Fam extends Gedcom\Parser\Component { protected static $_eventTypes = [ 'ANUL', diff --git a/src/Parser/Fam/Anul.php b/src/Parser/Fam/Anul.php index ad54cfef..fe724653 100644 --- a/src/Parser/Fam/Anul.php +++ b/src/Parser/Fam/Anul.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Fam; -class Anul extends \Parser\Fam\Even +class Anul extends Gedcom\Parser\Fam\Even { } diff --git a/src/Parser/Fam/Cens.php b/src/Parser/Fam/Cens.php index 6385b45d..1c38249f 100644 --- a/src/Parser/Fam/Cens.php +++ b/src/Parser/Fam/Cens.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Fam; -class Cens extends \Parser\Fam\Even +class Cens extends Gedcom\Parser\Fam\Even { } diff --git a/src/Parser/Fam/Div.php b/src/Parser/Fam/Div.php index 63b19617..96c65832 100644 --- a/src/Parser/Fam/Div.php +++ b/src/Parser/Fam/Div.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Fam; -class Div extends \Parser\Fam\Even +class Div extends Gedcom\Parser\Fam\Even { } diff --git a/src/Parser/Fam/Divf.php b/src/Parser/Fam/Divf.php index 4180c153..eb2fdd48 100644 --- a/src/Parser/Fam/Divf.php +++ b/src/Parser/Fam/Divf.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Fam; -class Divf extends \Parser\Fam\Even +class Divf extends Gedcom\Parser\Fam\Even { } diff --git a/src/Parser/Fam/Enga.php b/src/Parser/Fam/Enga.php index c8b6638d..e515b640 100644 --- a/src/Parser/Fam/Enga.php +++ b/src/Parser/Fam/Enga.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Fam; -class Enga extends \Parser\Fam\Even +class Enga extends Gedcom\Parser\Fam\Even { } diff --git a/src/Parser/Fam/Even.php b/src/Parser/Fam/Even.php index 9b207190..40965f1c 100644 --- a/src/Parser/Fam/Even.php +++ b/src/Parser/Fam/Even.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Fam; -class Even extends \Parser\Component +class Even extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Fam/Even/Husb.php b/src/Parser/Fam/Even/Husb.php index ecee61c0..a63fd3ae 100644 --- a/src/Parser/Fam/Even/Husb.php +++ b/src/Parser/Fam/Even/Husb.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Fam\Even; -class Husb extends \Parser\Component +class Husb extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Fam/Even/Wife.php b/src/Parser/Fam/Even/Wife.php index bc203f14..07b4046e 100644 --- a/src/Parser/Fam/Even/Wife.php +++ b/src/Parser/Fam/Even/Wife.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Fam\Even; -class Wife extends \Parser\Component +class Wife extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Fam/Marb.php b/src/Parser/Fam/Marb.php index bdb5fbe6..18f542dc 100644 --- a/src/Parser/Fam/Marb.php +++ b/src/Parser/Fam/Marb.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Fam; -class Marb extends \Parser\Fam\Even +class Marb extends Gedcom\Parser\Fam\Even { } diff --git a/src/Parser/Fam/Marc.php b/src/Parser/Fam/Marc.php index bdc8996c..49364148 100644 --- a/src/Parser/Fam/Marc.php +++ b/src/Parser/Fam/Marc.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Fam; -class Marc extends \Parser\Fam\Even +class Marc extends Gedcom\Parser\Fam\Even { } diff --git a/src/Parser/Fam/Marl.php b/src/Parser/Fam/Marl.php index 43dd298e..ca5be6e7 100644 --- a/src/Parser/Fam/Marl.php +++ b/src/Parser/Fam/Marl.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Fam; -class Marl extends \Parser\Fam\Even +class Marl extends Gedcom\Parser\Fam\Even { } diff --git a/src/Parser/Fam/Marr.php b/src/Parser/Fam/Marr.php index dc497f35..56cb8b2b 100644 --- a/src/Parser/Fam/Marr.php +++ b/src/Parser/Fam/Marr.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Fam; -class Marr extends \Parser\Fam\Even +class Marr extends Gedcom\Parser\Fam\Even { } diff --git a/src/Parser/Fam/Mars.php b/src/Parser/Fam/Mars.php index 9fb07e6c..02cba23e 100644 --- a/src/Parser/Fam/Mars.php +++ b/src/Parser/Fam/Mars.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Fam; -class Mars extends \Parser\Fam\Even +class Mars extends Gedcom\Parser\Fam\Even { } diff --git a/src/Parser/Fam/Slgs.php b/src/Parser/Fam/Slgs.php index eee3c140..ba9f36a2 100644 --- a/src/Parser/Fam/Slgs.php +++ b/src/Parser/Fam/Slgs.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Fam; -class Slgs extends \Parser\Component +class Slgs extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Fam/Slgs/Stat.php b/src/Parser/Fam/Slgs/Stat.php index ba470654..16457ca4 100644 --- a/src/Parser/Fam/Slgs/Stat.php +++ b/src/Parser/Fam/Slgs/Stat.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Fam\Slgs; -class Stat extends \Parser\Component +class Stat extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Head.php b/src/Parser/Head.php index 30d0ced9..bb298cc5 100644 --- a/src/Parser/Head.php +++ b/src/Parser/Head.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser; -class Head extends \Parser\Component +class Head extends Gedcom\Parser\Component { /** * @param \Gedcom\Parser $parser diff --git a/src/Parser/Head/Char.php b/src/Parser/Head/Char.php index 0b58822c..b396e520 100644 --- a/src/Parser/Head/Char.php +++ b/src/Parser/Head/Char.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Head; -class Char extends \Parser\Component +class Char extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Head/Date.php b/src/Parser/Head/Date.php index 987169d4..12d66376 100644 --- a/src/Parser/Head/Date.php +++ b/src/Parser/Head/Date.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Head; -class Date extends \Parser\Component +class Date extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Head/Gedc.php b/src/Parser/Head/Gedc.php index 64dd911d..7c86451e 100644 --- a/src/Parser/Head/Gedc.php +++ b/src/Parser/Head/Gedc.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Head; -class Gedc extends \Parser\Component +class Gedc extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Head/Plac.php b/src/Parser/Head/Plac.php index 17eb268e..41baaf59 100644 --- a/src/Parser/Head/Plac.php +++ b/src/Parser/Head/Plac.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Head; -class Plac extends \Parser\Component +class Plac extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Head/Sour.php b/src/Parser/Head/Sour.php index 4ad41968..c66000af 100644 --- a/src/Parser/Head/Sour.php +++ b/src/Parser/Head/Sour.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Head; -class Sour extends \Parser\Component +class Sour extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Head/Sour/Corp.php b/src/Parser/Head/Sour/Corp.php index 7471e10e..93f28d98 100644 --- a/src/Parser/Head/Sour/Corp.php +++ b/src/Parser/Head/Sour/Corp.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Head\Sour; -class Corp extends \Parser\Component +class Corp extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Head/Sour/Data.php b/src/Parser/Head/Sour/Data.php index 93c6b17b..39cae89e 100644 --- a/src/Parser/Head/Sour/Data.php +++ b/src/Parser/Head/Sour/Data.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Head\Sour; -class Data extends \Parser\Component +class Data extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Indi.php b/src/Parser/Indi.php index fd8d092d..739278b1 100644 --- a/src/Parser/Indi.php +++ b/src/Parser/Indi.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser; -class Indi extends \Parser\Component +class Indi extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Indi/Adop.php b/src/Parser/Indi/Adop.php index 9e8437fb..f31bbc25 100644 --- a/src/Parser/Indi/Adop.php +++ b/src/Parser/Indi/Adop.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Indi; -class Adop extends \Parser\Indi\Even +class Adop extends Gedcom\Parser\Indi\Even { public static function parseAdop($parser, $even) { diff --git a/src/Parser/Indi/Asso.php b/src/Parser/Indi/Asso.php index 32bcb905..173b776a 100644 --- a/src/Parser/Indi/Asso.php +++ b/src/Parser/Indi/Asso.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Indi; -class Asso extends \Parser\Component +class Asso extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Indi/Attr.php b/src/Parser/Indi/Attr.php index 032e25c3..3200fa2e 100644 --- a/src/Parser/Indi/Attr.php +++ b/src/Parser/Indi/Attr.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Indi; -abstract class Attr extends \Parser\Component +abstract class Attr extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Indi/Bapm.php b/src/Parser/Indi/Bapm.php index 37672a00..6332b6e5 100644 --- a/src/Parser/Indi/Bapm.php +++ b/src/Parser/Indi/Bapm.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Bapm extends \Parser\Indi\Even +class Bapm extends Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Barm.php b/src/Parser/Indi/Barm.php index 81474562..ebc9be50 100644 --- a/src/Parser/Indi/Barm.php +++ b/src/Parser/Indi/Barm.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Barm extends \Parser\Indi\Even +class Barm extends Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Basm.php b/src/Parser/Indi/Basm.php index 26db8cbb..bde50d03 100644 --- a/src/Parser/Indi/Basm.php +++ b/src/Parser/Indi/Basm.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Basm extends \Parser\Indi\Even +class Basm extends Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Birt.php b/src/Parser/Indi/Birt.php index ac3d9b11..9df3508c 100644 --- a/src/Parser/Indi/Birt.php +++ b/src/Parser/Indi/Birt.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Indi; -class Birt extends \Parser\Indi\Even +class Birt extends Gedcom\Parser\Indi\Even { public static function parseFamc($parser, $even) { diff --git a/src/Parser/Indi/Bles.php b/src/Parser/Indi/Bles.php index d54dbcaf..2021fe38 100644 --- a/src/Parser/Indi/Bles.php +++ b/src/Parser/Indi/Bles.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Bles extends \Parser\Indi\Even +class Bles extends Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Buri.php b/src/Parser/Indi/Buri.php index e35838c0..96c13541 100644 --- a/src/Parser/Indi/Buri.php +++ b/src/Parser/Indi/Buri.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Buri extends \Parser\Indi\Even +class Buri extends Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Cast.php b/src/Parser/Indi/Cast.php index 51daebd0..de64304b 100644 --- a/src/Parser/Indi/Cast.php +++ b/src/Parser/Indi/Cast.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Cast extends \Parser\Indi\Attr +class Cast extends Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Cens.php b/src/Parser/Indi/Cens.php index 90ce776a..c79afd6a 100644 --- a/src/Parser/Indi/Cens.php +++ b/src/Parser/Indi/Cens.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Cens extends \Parser\Indi\Even +class Cens extends Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Chr.php b/src/Parser/Indi/Chr.php index 522913d6..0e0c466c 100644 --- a/src/Parser/Indi/Chr.php +++ b/src/Parser/Indi/Chr.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Indi; -class Chr extends \Parser\Indi\Even +class Chr extends Gedcom\Parser\Indi\Even { public static function parseFamc($parser, $even) { diff --git a/src/Parser/Indi/Chra.php b/src/Parser/Indi/Chra.php index 8c3575ab..2d18f188 100644 --- a/src/Parser/Indi/Chra.php +++ b/src/Parser/Indi/Chra.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Chra extends \Parser\Indi\Even +class Chra extends Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Conf.php b/src/Parser/Indi/Conf.php index 5dd8154c..a0712aa7 100644 --- a/src/Parser/Indi/Conf.php +++ b/src/Parser/Indi/Conf.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Conf extends \Parser\Indi\Even +class Conf extends Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Crem.php b/src/Parser/Indi/Crem.php index 262816b7..3a0c60ad 100644 --- a/src/Parser/Indi/Crem.php +++ b/src/Parser/Indi/Crem.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Crem extends \Parser\Indi\Even +class Crem extends Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Deat.php b/src/Parser/Indi/Deat.php index c8b27fc3..bc4c6af6 100644 --- a/src/Parser/Indi/Deat.php +++ b/src/Parser/Indi/Deat.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Deat extends \Parser\Indi\Even +class Deat extends Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Dscr.php b/src/Parser/Indi/Dscr.php index 09c96c26..c956b033 100644 --- a/src/Parser/Indi/Dscr.php +++ b/src/Parser/Indi/Dscr.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Dscr extends \Parser\Indi\Attr +class Dscr extends Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Educ.php b/src/Parser/Indi/Educ.php index d92bd6f0..4f92de5e 100644 --- a/src/Parser/Indi/Educ.php +++ b/src/Parser/Indi/Educ.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Educ extends \Parser\Indi\Attr +class Educ extends Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Emig.php b/src/Parser/Indi/Emig.php index 91ffd25c..d51cf8fa 100644 --- a/src/Parser/Indi/Emig.php +++ b/src/Parser/Indi/Emig.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Emig extends \Parser\Indi\Even +class Emig extends Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Even.php b/src/Parser/Indi/Even.php index b7c6118d..7fcd79b3 100644 --- a/src/Parser/Indi/Even.php +++ b/src/Parser/Indi/Even.php @@ -16,7 +16,7 @@ use Parser\Chan; -class Even extends \Parser\Component +class Even extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Indi/Even/Plac.php b/src/Parser/Indi/Even/Plac.php index 2cb8bd78..4cb6d8ed 100644 --- a/src/Parser/Indi/Even/Plac.php +++ b/src/Parser/Indi/Even/Plac.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Indi\Even; -class Plac extends \Parser\Component +class Plac extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Indi/Famc.php b/src/Parser/Indi/Famc.php index 361d0760..c44b7e59 100644 --- a/src/Parser/Indi/Famc.php +++ b/src/Parser/Indi/Famc.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Indi; -class Famc extends \Parser\Component +class Famc extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Indi/Fams.php b/src/Parser/Indi/Fams.php index 568e3532..a87011c0 100644 --- a/src/Parser/Indi/Fams.php +++ b/src/Parser/Indi/Fams.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Indi; -class Fams extends \Parser\Component +class Fams extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Indi/Fcom.php b/src/Parser/Indi/Fcom.php index 32f34346..0e9a0e66 100644 --- a/src/Parser/Indi/Fcom.php +++ b/src/Parser/Indi/Fcom.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Fcom extends \Parser\Indi\Even +class Fcom extends Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Grad.php b/src/Parser/Indi/Grad.php index 76361858..a2f3dfe8 100644 --- a/src/Parser/Indi/Grad.php +++ b/src/Parser/Indi/Grad.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Grad extends \Parser\Indi\Even +class Grad extends Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Idno.php b/src/Parser/Indi/Idno.php index 61f089c2..04d579f5 100644 --- a/src/Parser/Indi/Idno.php +++ b/src/Parser/Indi/Idno.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Idno extends \Parser\Indi\Attr +class Idno extends Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Immi.php b/src/Parser/Indi/Immi.php index 582bd64b..ea8aa07b 100644 --- a/src/Parser/Indi/Immi.php +++ b/src/Parser/Indi/Immi.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Immi extends \Parser\Indi\Even +class Immi extends Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Lds.php b/src/Parser/Indi/Lds.php index 3c381392..60d726f3 100644 --- a/src/Parser/Indi/Lds.php +++ b/src/Parser/Indi/Lds.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Indi; -abstract class Lds extends \Parser\Component +abstract class Lds extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Indi/Name.php b/src/Parser/Indi/Name.php index c9d7f3d3..7538c0e1 100644 --- a/src/Parser/Indi/Name.php +++ b/src/Parser/Indi/Name.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Indi; -class Name extends \Parser\Component +class Name extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Indi/Name/Fone.php b/src/Parser/Indi/Name/Fone.php index fab93515..58a00250 100644 --- a/src/Parser/Indi/Name/Fone.php +++ b/src/Parser/Indi/Name/Fone.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Indi\Name; -class Fone extends \Parser\Component +class Fone extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Indi/Name/Romn.php b/src/Parser/Indi/Name/Romn.php index 59c1b77d..db616f0c 100644 --- a/src/Parser/Indi/Name/Romn.php +++ b/src/Parser/Indi/Name/Romn.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Indi\Name; -class Romn extends \Parser\Component +class Romn extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Indi/Nati.php b/src/Parser/Indi/Nati.php index 69493891..a94338a8 100644 --- a/src/Parser/Indi/Nati.php +++ b/src/Parser/Indi/Nati.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Nati extends \Parser\Indi\Attr +class Nati extends Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Natu.php b/src/Parser/Indi/Natu.php index 169f9f23..320827ec 100644 --- a/src/Parser/Indi/Natu.php +++ b/src/Parser/Indi/Natu.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Natu extends \Parser\Indi\Even +class Natu extends Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Nchi.php b/src/Parser/Indi/Nchi.php index 080daf98..3f69a34f 100644 --- a/src/Parser/Indi/Nchi.php +++ b/src/Parser/Indi/Nchi.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Nchi extends \Parser\Indi\Attr +class Nchi extends Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Nmr.php b/src/Parser/Indi/Nmr.php index 5ffd6720..ca79f04e 100644 --- a/src/Parser/Indi/Nmr.php +++ b/src/Parser/Indi/Nmr.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Nmr extends \Parser\Indi\Attr +class Nmr extends Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Occu.php b/src/Parser/Indi/Occu.php index 1c2a5d36..9d37c587 100644 --- a/src/Parser/Indi/Occu.php +++ b/src/Parser/Indi/Occu.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Occu extends \Parser\Indi\Attr +class Occu extends Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Ordn.php b/src/Parser/Indi/Ordn.php index e492ce3c..0ac1b66f 100644 --- a/src/Parser/Indi/Ordn.php +++ b/src/Parser/Indi/Ordn.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Ordn extends \Parser\Indi\Even +class Ordn extends Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Prob.php b/src/Parser/Indi/Prob.php index df8b115a..57e78b48 100644 --- a/src/Parser/Indi/Prob.php +++ b/src/Parser/Indi/Prob.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Prob extends \Parser\Indi\Even +class Prob extends Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Prop.php b/src/Parser/Indi/Prop.php index 61a2ded4..ae492ba5 100644 --- a/src/Parser/Indi/Prop.php +++ b/src/Parser/Indi/Prop.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Prop extends \Parser\Indi\Attr +class Prop extends Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Reli.php b/src/Parser/Indi/Reli.php index d1810ecf..a72c5a3e 100644 --- a/src/Parser/Indi/Reli.php +++ b/src/Parser/Indi/Reli.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Reli extends \Parser\Indi\Attr +class Reli extends Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Resi.php b/src/Parser/Indi/Resi.php index 7d3f02fc..471e59fc 100644 --- a/src/Parser/Indi/Resi.php +++ b/src/Parser/Indi/Resi.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Resi extends \Parser\Indi\Attr +class Resi extends Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Reti.php b/src/Parser/Indi/Reti.php index 1cd4c039..0be54dc5 100644 --- a/src/Parser/Indi/Reti.php +++ b/src/Parser/Indi/Reti.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Reti extends \Parser\Indi\Even +class Reti extends Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Ssn.php b/src/Parser/Indi/Ssn.php index 47b72514..28a50c6b 100644 --- a/src/Parser/Indi/Ssn.php +++ b/src/Parser/Indi/Ssn.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Ssn extends \Parser\Indi\Attr +class Ssn extends Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Titl.php b/src/Parser/Indi/Titl.php index 29a9e591..0782fc31 100644 --- a/src/Parser/Indi/Titl.php +++ b/src/Parser/Indi/Titl.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Titl extends \Parser\Indi\Attr +class Titl extends Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Will.php b/src/Parser/Indi/Will.php index d38fc9ca..90d195a9 100644 --- a/src/Parser/Indi/Will.php +++ b/src/Parser/Indi/Will.php @@ -14,6 +14,6 @@ namespace Gedcom\Parser\Indi; -class Will extends \Parser\Indi\Even +class Will extends Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Note.php b/src/Parser/Note.php index 9e6fd0af..32c2ea92 100644 --- a/src/Parser/Note.php +++ b/src/Parser/Note.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser; -class Note extends \Parser\Component +class Note extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/NoteRef.php b/src/Parser/NoteRef.php index d47d3b94..166b9313 100644 --- a/src/Parser/NoteRef.php +++ b/src/Parser/NoteRef.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser; -class NoteRef extends \Parser\Component +class NoteRef extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Obje.php b/src/Parser/Obje.php index 588fa3e3..b8a83637 100644 --- a/src/Parser/Obje.php +++ b/src/Parser/Obje.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser; -class Obje extends \Parser\Component +class Obje extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/ObjeRef.php b/src/Parser/ObjeRef.php index 9891342e..66ff9a5e 100644 --- a/src/Parser/ObjeRef.php +++ b/src/Parser/ObjeRef.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser; -class ObjeRef extends \Parser\Component +class ObjeRef extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/ObjeRef/File.php b/src/Parser/ObjeRef/File.php index 06a8142d..3ae76529 100644 --- a/src/Parser/ObjeRef/File.php +++ b/src/Parser/ObjeRef/File.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\ObjeRef; -class File extends \Parser\Component +class File extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/ObjeRef/File/Form.php b/src/Parser/ObjeRef/File/Form.php index 6d0236c4..8f026e87 100644 --- a/src/Parser/ObjeRef/File/Form.php +++ b/src/Parser/ObjeRef/File/Form.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\ObjeRef\File; -class Form extends \Parser\Component +class Form extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Phon.php b/src/Parser/Phon.php index b36bf5a1..c15a56b3 100644 --- a/src/Parser/Phon.php +++ b/src/Parser/Phon.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser; -class Phon extends \Parser\Component +class Phon extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Plac.php b/src/Parser/Plac.php index 167db311..6e61ef61 100644 --- a/src/Parser/Plac.php +++ b/src/Parser/Plac.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser; -class Plac extends \Parser\Component +class Plac extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Plac/Fone.php b/src/Parser/Plac/Fone.php index eef7a43b..9d028ec1 100644 --- a/src/Parser/Plac/Fone.php +++ b/src/Parser/Plac/Fone.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Plac; -class Fone extends \Parser\Component +class Fone extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Plac/Map.php b/src/Parser/Plac/Map.php index a688f434..6e55b7f8 100644 --- a/src/Parser/Plac/Map.php +++ b/src/Parser/Plac/Map.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Plac; -class Map extends \Parser\Component +class Map extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Plac/Romn.php b/src/Parser/Plac/Romn.php index 78d521db..ddd6f74c 100644 --- a/src/Parser/Plac/Romn.php +++ b/src/Parser/Plac/Romn.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Plac; -class Romn extends \Parser\Component +class Romn extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Refn.php b/src/Parser/Refn.php index 86d01b93..77a15ebb 100644 --- a/src/Parser/Refn.php +++ b/src/Parser/Refn.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser; -class Refn extends \Parser\Component +class Refn extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Repo.php b/src/Parser/Repo.php index d61ed3fc..87d7ae8a 100644 --- a/src/Parser/Repo.php +++ b/src/Parser/Repo.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser; -class Repo extends \Parser\Component +class Repo extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/RepoRef.php b/src/Parser/RepoRef.php index b9860f91..407219d4 100644 --- a/src/Parser/RepoRef.php +++ b/src/Parser/RepoRef.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser; -class RepoRef extends \Parser\Component +class RepoRef extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Sour.php b/src/Parser/Sour.php index 0497cc1a..1e9914a3 100644 --- a/src/Parser/Sour.php +++ b/src/Parser/Sour.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser; -class Sour extends \Parser\Component +class Sour extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Sour/Data.php b/src/Parser/Sour/Data.php index f1910e57..02507279 100644 --- a/src/Parser/Sour/Data.php +++ b/src/Parser/Sour/Data.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Sour; -class Data extends \Parser\Component +class Data extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Sour/Data/Even.php b/src/Parser/Sour/Data/Even.php index 28adcff9..685fdd9b 100644 --- a/src/Parser/Sour/Data/Even.php +++ b/src/Parser/Sour/Data/Even.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Sour\Data; -class Even extends \Parser\Component +class Even extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Sour/Repo.php b/src/Parser/Sour/Repo.php index 01fe3e83..f14e6dab 100644 --- a/src/Parser/Sour/Repo.php +++ b/src/Parser/Sour/Repo.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Sour; -class Repo extends \Parser\Component +class Repo extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Sour/Repo/Caln.php b/src/Parser/Sour/Repo/Caln.php index a55f6037..2dbf513a 100644 --- a/src/Parser/Sour/Repo/Caln.php +++ b/src/Parser/Sour/Repo/Caln.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Sour\Repo; -class Caln extends \Parser\Component +class Caln extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/SourRef.php b/src/Parser/SourRef.php index 9802678d..1644fe9c 100644 --- a/src/Parser/SourRef.php +++ b/src/Parser/SourRef.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser; -class SourRef extends \Parser\Component +class SourRef extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/SourRef/Data.php b/src/Parser/SourRef/Data.php index 20e9afc9..d7889ced 100644 --- a/src/Parser/SourRef/Data.php +++ b/src/Parser/SourRef/Data.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\SourRef; -class Data extends \Parser\Component +class Data extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/SourRef/Even.php b/src/Parser/SourRef/Even.php index 5e889f5b..7a5039b5 100644 --- a/src/Parser/SourRef/Even.php +++ b/src/Parser/SourRef/Even.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\SourRef; -class Even extends \Parser\Component +class Even extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Subm.php b/src/Parser/Subm.php index 64bdad1d..3f324cf7 100644 --- a/src/Parser/Subm.php +++ b/src/Parser/Subm.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser; -class Subm extends \Parser\Component +class Subm extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Parser/Subn.php b/src/Parser/Subn.php index 6930df58..e26f5d6e 100644 --- a/src/Parser/Subn.php +++ b/src/Parser/Subn.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser; -class Subn extends \Parser\Component +class Subn extends Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) { diff --git a/src/Record/Addr.php b/src/Record/Addr.php index d00a35f0..a367a7e2 100644 --- a/src/Record/Addr.php +++ b/src/Record/Addr.php @@ -19,7 +19,7 @@ /** * Class Addr. */ -class Addr extends Record +class Addr extends Gedcom\Record { /** * @var string diff --git a/src/Record/Caln.php b/src/Record/Caln.php index 2012d8aa..48fb2ce2 100644 --- a/src/Record/Caln.php +++ b/src/Record/Caln.php @@ -19,7 +19,7 @@ /** * Class Caln. */ -class Caln extends Record +class Caln extends Gedcom\Record { /** * @var string diff --git a/src/Record/Chan.php b/src/Record/Chan.php index fd233a73..6f108632 100644 --- a/src/Record/Chan.php +++ b/src/Record/Chan.php @@ -19,7 +19,7 @@ /** * Class Chan. */ -class Chan extends Record +class Chan extends Gedcom\Record { /** * @var string diff --git a/src/Record/Data.php b/src/Record/Data.php index 42066926..793bd587 100644 --- a/src/Record/Data.php +++ b/src/Record/Data.php @@ -19,7 +19,7 @@ /** * Class Data. */ -class Data extends Record +class Data extends Gedcom\Record { /** * @var string diff --git a/src/Record/Date.php b/src/Record/Date.php index b238db54..b0ae21b8 100644 --- a/src/Record/Date.php +++ b/src/Record/Date.php @@ -19,7 +19,7 @@ /** * Class Date. */ -class Date extends Record +class Date extends Gedcom\Record { /** * @var string diff --git a/src/Record/Head.php b/src/Record/Head.php index 75d917cc..834b8c16 100644 --- a/src/Record/Head.php +++ b/src/Record/Head.php @@ -19,7 +19,7 @@ /** * Stores the data from the HEAD section of a GEDCOM 5.5 file. */ -class Head extends Record +class Head extends Gedcom\Record { /** * @var Head\Sour diff --git a/src/Record/Indi.php b/src/Record/Indi.php index 945c9fa7..83f14ee9 100644 --- a/src/Record/Indi.php +++ b/src/Record/Indi.php @@ -20,7 +20,7 @@ /** * Class Indi. */ -class Indi extends Record implements Noteable, Objectable, Sourceable +class Indi extends Gedcom\Record implements Noteable, Objectable, Sourceable { /** * @var string diff --git a/src/Record/Indi/Even.php b/src/Record/Indi/Even.php index cfe352b1..75498986 100644 --- a/src/Record/Indi/Even.php +++ b/src/Record/Indi/Even.php @@ -19,7 +19,7 @@ /** * Class Even. */ -class Even extends Record implements Record\Objectable, Record\Sourceable, Record\Noteable +class Even extends Gedcom\Record implements Record\Objectable, Record\Sourceable, Record\Noteable { /** * @var string diff --git a/src/Record/Indi/Even/Plac.php b/src/Record/Indi/Even/Plac.php index b063fe6f..67c73852 100644 --- a/src/Record/Indi/Even/Plac.php +++ b/src/Record/Indi/Even/Plac.php @@ -19,7 +19,7 @@ /** * Class Plac. */ -class Plac extends Record implements Record\Noteable, Record\Sourceable +class Plac extends Gedcom\Record implements Record\Noteable, Record\Sourceable { /** * @var string diff --git a/src/Record/Indi/Name/Fone.php b/src/Record/Indi/Name/Fone.php index c7422fb1..33069e11 100644 --- a/src/Record/Indi/Name/Fone.php +++ b/src/Record/Indi/Name/Fone.php @@ -19,7 +19,7 @@ /** * Class Refn. */ -class Fone extends Record +class Fone extends Gedcom\Record { /** * @var string phonetic_variation diff --git a/src/Record/Indi/Name/Romn.php b/src/Record/Indi/Name/Romn.php index 8d05ec56..832e1db1 100644 --- a/src/Record/Indi/Name/Romn.php +++ b/src/Record/Indi/Name/Romn.php @@ -19,7 +19,7 @@ /** * Class Refn. */ -class Romn extends Record +class Romn extends Gedcom\Record { /** * @var string romanized_variation diff --git a/src/Record/ObjeRef/File.php b/src/Record/ObjeRef/File.php index 8712f69d..65ce4ec2 100644 --- a/src/Record/ObjeRef/File.php +++ b/src/Record/ObjeRef/File.php @@ -19,7 +19,7 @@ /** * Class Refn. */ -class File extends Record +class File extends Gedcom\Record { /** * @var string multimedia_file_refn diff --git a/src/Record/ObjeRef/File/Form.php b/src/Record/ObjeRef/File/Form.php index 8a003593..1649f195 100644 --- a/src/Record/ObjeRef/File/Form.php +++ b/src/Record/ObjeRef/File/Form.php @@ -19,7 +19,7 @@ /** * Class Refn. */ -class Form extends Record +class Form extends Gedcom\Record { /** * @var string multimedia_format diff --git a/src/Record/Phon.php b/src/Record/Phon.php index 945851f0..ec7721d9 100644 --- a/src/Record/Phon.php +++ b/src/Record/Phon.php @@ -19,7 +19,7 @@ /** * Class Phon. */ -class Phon extends Record +class Phon extends Gedcom\Record { /** * @var string diff --git a/src/Record/Plac/Fone.php b/src/Record/Plac/Fone.php index d1f1d4f5..9632cbaa 100644 --- a/src/Record/Plac/Fone.php +++ b/src/Record/Plac/Fone.php @@ -19,7 +19,7 @@ /** * Class Refn. */ -class Fone extends Record +class Fone extends Gedcom\Record { /** * @var string phonetic_variation diff --git a/src/Record/Plac/Map.php b/src/Record/Plac/Map.php index b37c668d..ac0660ea 100644 --- a/src/Record/Plac/Map.php +++ b/src/Record/Plac/Map.php @@ -19,7 +19,7 @@ /** * Class Refn. */ -class Map extends Record +class Map extends Gedcom\Record { /** * @var string place_latitude diff --git a/src/Record/Plac/Romn.php b/src/Record/Plac/Romn.php index cd06e45d..192996bc 100644 --- a/src/Record/Plac/Romn.php +++ b/src/Record/Plac/Romn.php @@ -19,7 +19,7 @@ /** * Class Refn. */ -class Romn extends Record +class Romn extends Gedcom\Record { /** * @var string romanized_variation diff --git a/src/Record/Refn.php b/src/Record/Refn.php index d9178de7..259e2b1f 100644 --- a/src/Record/Refn.php +++ b/src/Record/Refn.php @@ -19,7 +19,7 @@ /** * Class Refn. */ -class Refn extends Record +class Refn extends Gedcom\Record { /** * @var string diff --git a/src/Record/Repo.php b/src/Record/Repo.php index a587f22b..3d2001f8 100644 --- a/src/Record/Repo.php +++ b/src/Record/Repo.php @@ -19,7 +19,7 @@ /** * Class Repo. */ -class Repo extends Record implements Noteable +class Repo extends Gedcom\Record implements Noteable { /** * @var string diff --git a/src/Record/Sour.php b/src/Record/Sour.php index 74984a54..cfaa88ec 100644 --- a/src/Record/Sour.php +++ b/src/Record/Sour.php @@ -19,7 +19,7 @@ /** * Class Sour. */ -class Sour extends Record implements Noteable, Objectable +class Sour extends Gedcom\Record implements Noteable, Objectable { /** * @var string diff --git a/src/Record/Subm.php b/src/Record/Subm.php index adc58084..8a1e287e 100644 --- a/src/Record/Subm.php +++ b/src/Record/Subm.php @@ -19,7 +19,7 @@ /** * Class Subm. */ -class Subm extends Record implements Objectable +class Subm extends Gedcom\Record implements Objectable { /** * @var string diff --git a/src/Record/Subn.php b/src/Record/Subn.php index 21d584d4..c980fa85 100644 --- a/src/Record/Subn.php +++ b/src/Record/Subn.php @@ -19,7 +19,7 @@ /** * Class Subn. */ -class Subn extends Record +class Subn extends Gedcom\Record { /** * @var string From e94d46047f940b7dd6a5f6f60251306ac01b1bde Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sat, 17 Jul 2021 22:18:11 +0100 Subject: [PATCH 66/99] Update PSR4. --- src/Parser/Head.php | 10 +++++----- src/Parser/Head/Sour.php | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Parser/Head.php b/src/Parser/Head.php index bb298cc5..1a5c7cc9 100644 --- a/src/Parser/Head.php +++ b/src/Parser/Head.php @@ -51,7 +51,7 @@ public static function parse(\Gedcom\Parser $parser) switch ($recordType) { case 'SOUR': - $sour = \Parser\Head\Sour::parse($parser); + $sour = \Gedcom\Parser\Head\Sour::parse($parser); $head->setSour($sour); break; case 'DEST': @@ -76,19 +76,19 @@ public static function parse(\Gedcom\Parser $parser) $head->setLang(trim($record[2])); break; case 'DATE': - $date = \Parser\Head\Date::parse($parser); + $date = \Gedcom\Parser\Head\Date::parse($parser); $head->setDate($date); break; case 'GEDC': - $gedc = \Parser\Head\Gedc::parse($parser); + $gedc = \Gedcom\Parser\Head\Gedc::parse($parser); $head->setGedc($gedc); break; case 'CHAR': - $char = \Parser\Head\Char::parse($parser); + $char = \Gedcom\Parser\Head\Char::parse($parser); $head->setChar($char); break; case 'PLAC': - $plac = \Parser\Head\Plac::parse($parser); + $plac = \Gedcom\Parser\Head\Plac::parse($parser); $head->setPlac($plac); break; case 'NOTE': diff --git a/src/Parser/Head/Sour.php b/src/Parser/Head/Sour.php index c66000af..a3691346 100644 --- a/src/Parser/Head/Sour.php +++ b/src/Parser/Head/Sour.php @@ -49,11 +49,11 @@ public static function parse(\Gedcom\Parser $parser) $source->setName(trim($record[2])); break; case 'CORP': - $corp = \Parser\Head\Sour\Corp::parse($parser); + $corp = \Gedcom\Parser\Head\Sour\Corp::parse($parser); $source->setCorp($corp); break; case 'DATA': - $data = \Parser\Head\Sour\Data::parse($parser); + $data = \Gedcom\Parser\Head\Sour\Data::parse($parser); $source->setData($data); break; default: From f9abe7f319fea2aa830c9cd7940631e33c77014d Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sat, 17 Jul 2021 22:20:31 +0100 Subject: [PATCH 67/99] Update PSR4. --- src/Parser.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Parser.php b/src/Parser.php index 3f8c8779..57f9ed85 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -240,23 +240,23 @@ public function parse($fileName) } if (isset($record[1]) && trim($record[1]) == 'HEAD') { - \Parser\Head::parse($this); + \Gedcom\Parser\Head::parse($this); } elseif (isset($record[2]) && trim($record[2]) == 'SUBN') { - \Parser\Subn::parse($this); + \Gedcom\Parser\Subn::parse($this); } elseif (isset($record[2]) && trim($record[2]) == 'SUBM') { - \Parser\Subm::parse($this); + \Gedcom\Parser\Subm::parse($this); } elseif (isset($record[2]) && $record[2] == 'SOUR') { - \Parser\Sour::parse($this); + \Gedcom\Parser\Sour::parse($this); } elseif (isset($record[2]) && $record[2] == 'INDI') { - \Parser\Indi::parse($this); + \Gedcom\Parser\Indi::parse($this); } elseif (isset($record[2]) && $record[2] == 'FAM') { - \Parser\Fam::parse($this); + \Gedcom\Parser\Fam::parse($this); } elseif (isset($record[2]) && substr(trim($record[2]), 0, 4) == 'NOTE') { - \Parser\Note::parse($this); + \Gedcom\Parser\Note::parse($this); } elseif (isset($record[2]) && $record[2] == 'REPO') { - \Parser\Repo::parse($this); + \Gedcom\Parser\Repo::parse($this); } elseif (isset($record[2]) && $record[2] == 'OBJE') { - \Parser\Obje::parse($this); + \Gedcom\Parser\Obje::parse($this); } elseif (isset($record[1]) && trim($record[1]) == 'TRLR') { // EOF break; From 48083b54dc9296221bdcab58360cdc926523ee2f Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sat, 17 Jul 2021 22:29:37 +0100 Subject: [PATCH 68/99] Update PSR4. --- src/Parser/Addr.php | 6 +++--- src/Parser/Caln.php | 6 +++--- src/Parser/Chan.php | 6 +++--- src/Parser/Component.php | 4 ++-- src/Parser/Date.php | 6 +++--- src/Parser/Fam.php | 8 ++++---- src/Parser/Fam/Anul.php | 4 ++-- src/Parser/Fam/Cens.php | 4 ++-- src/Parser/Fam/Div.php | 4 ++-- src/Parser/Fam/Divf.php | 4 ++-- src/Parser/Fam/Enga.php | 4 ++-- src/Parser/Fam/Even.php | 6 +++--- src/Parser/Fam/Even/Husb.php | 6 +++--- src/Parser/Fam/Even/Wife.php | 6 +++--- src/Parser/Fam/Marb.php | 4 ++-- src/Parser/Fam/Marc.php | 4 ++-- src/Parser/Fam/Marl.php | 4 ++-- src/Parser/Fam/Marr.php | 4 ++-- src/Parser/Fam/Mars.php | 4 ++-- src/Parser/Fam/Slgs.php | 6 +++--- src/Parser/Fam/Slgs/Stat.php | 6 +++--- src/Parser/Head.php | 18 +++++++++--------- src/Parser/Head/Char.php | 6 +++--- src/Parser/Head/Date.php | 6 +++--- src/Parser/Head/Gedc.php | 6 +++--- src/Parser/Head/Plac.php | 6 +++--- src/Parser/Head/Sour.php | 10 +++++----- src/Parser/Head/Sour/Corp.php | 6 +++--- src/Parser/Head/Sour/Data.php | 6 +++--- src/Parser/Indi.php | 12 ++++++------ src/Parser/Indi/Adop.php | 4 ++-- src/Parser/Indi/Asso.php | 6 +++--- src/Parser/Indi/Attr.php | 8 ++++---- src/Parser/Indi/Bapl.php | 2 +- src/Parser/Indi/Bapm.php | 4 ++-- src/Parser/Indi/Barm.php | 4 ++-- src/Parser/Indi/Basm.php | 4 ++-- src/Parser/Indi/Birt.php | 4 ++-- src/Parser/Indi/Bles.php | 4 ++-- src/Parser/Indi/Buri.php | 4 ++-- src/Parser/Indi/Cast.php | 4 ++-- src/Parser/Indi/Cens.php | 4 ++-- src/Parser/Indi/Chr.php | 4 ++-- src/Parser/Indi/Chra.php | 4 ++-- src/Parser/Indi/Conf.php | 4 ++-- src/Parser/Indi/Conl.php | 2 +- src/Parser/Indi/Crem.php | 4 ++-- src/Parser/Indi/Deat.php | 4 ++-- src/Parser/Indi/Dscr.php | 4 ++-- src/Parser/Indi/Educ.php | 4 ++-- src/Parser/Indi/Emig.php | 4 ++-- src/Parser/Indi/Endl.php | 2 +- src/Parser/Indi/Even.php | 8 ++++---- src/Parser/Indi/Even/Plac.php | 6 +++--- src/Parser/Indi/Famc.php | 6 +++--- src/Parser/Indi/Fams.php | 6 +++--- src/Parser/Indi/Fcom.php | 4 ++-- src/Parser/Indi/Grad.php | 4 ++-- src/Parser/Indi/Idno.php | 4 ++-- src/Parser/Indi/Immi.php | 4 ++-- src/Parser/Indi/Lds.php | 8 ++++---- src/Parser/Indi/Name.php | 6 +++--- src/Parser/Indi/Name/Fone.php | 6 +++--- src/Parser/Indi/Name/Romn.php | 6 +++--- src/Parser/Indi/Nati.php | 4 ++-- src/Parser/Indi/Natu.php | 4 ++-- src/Parser/Indi/Nchi.php | 4 ++-- src/Parser/Indi/Nmr.php | 4 ++-- src/Parser/Indi/Occu.php | 4 ++-- src/Parser/Indi/Ordn.php | 4 ++-- src/Parser/Indi/Prob.php | 4 ++-- src/Parser/Indi/Prop.php | 4 ++-- src/Parser/Indi/Reli.php | 4 ++-- src/Parser/Indi/Resi.php | 4 ++-- src/Parser/Indi/Reti.php | 4 ++-- src/Parser/Indi/Slgc.php | 2 +- src/Parser/Indi/Ssn.php | 4 ++-- src/Parser/Indi/Titl.php | 4 ++-- src/Parser/Indi/Will.php | 4 ++-- src/Parser/Note.php | 6 +++--- src/Parser/NoteRef.php | 6 +++--- src/Parser/Obje.php | 6 +++--- src/Parser/ObjeRef.php | 6 +++--- src/Parser/ObjeRef/File.php | 6 +++--- src/Parser/ObjeRef/File/Form.php | 6 +++--- src/Parser/Phon.php | 6 +++--- src/Parser/Plac.php | 6 +++--- src/Parser/Plac/Fone.php | 6 +++--- src/Parser/Plac/Map.php | 6 +++--- src/Parser/Plac/Romn.php | 6 +++--- src/Parser/Refn.php | 6 +++--- src/Parser/Repo.php | 6 +++--- src/Parser/RepoRef.php | 6 +++--- src/Parser/Sour.php | 6 +++--- src/Parser/Sour/Data.php | 6 +++--- src/Parser/Sour/Data/Even.php | 6 +++--- src/Parser/Sour/Repo.php | 6 +++--- src/Parser/Sour/Repo/Caln.php | 6 +++--- src/Parser/SourRef.php | 6 +++--- src/Parser/SourRef/Data.php | 6 +++--- src/Parser/SourRef/Even.php | 6 +++--- src/Parser/Subm.php | 6 +++--- src/Parser/Subn.php | 6 +++--- src/Record/Addr.php | 2 +- src/Record/Caln.php | 2 +- src/Record/Chan.php | 2 +- src/Record/Data.php | 2 +- src/Record/Date.php | 2 +- src/Record/Head.php | 2 +- src/Record/Indi.php | 2 +- src/Record/Indi/Even.php | 2 +- src/Record/Indi/Even/Plac.php | 2 +- src/Record/Indi/Name/Fone.php | 2 +- src/Record/Indi/Name/Romn.php | 2 +- src/Record/ObjeRef/File.php | 2 +- src/Record/ObjeRef/File/Form.php | 2 +- src/Record/Phon.php | 2 +- src/Record/Plac/Fone.php | 2 +- src/Record/Plac/Map.php | 2 +- src/Record/Plac/Romn.php | 2 +- src/Record/Refn.php | 2 +- src/Record/Repo.php | 2 +- src/Record/Sour.php | 2 +- src/Record/Subm.php | 2 +- src/Record/Subn.php | 2 +- 125 files changed, 292 insertions(+), 292 deletions(-) diff --git a/src/Parser/Addr.php b/src/Parser/Addr.php index 956af97c..c6702c2c 100644 --- a/src/Parser/Addr.php +++ b/src/Parser/Addr.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; -class Addr extends Gedcom\Parser\Component +class Addr extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Caln.php b/src/Parser/Caln.php index eb0c4ecb..0aa0ac08 100644 --- a/src/Parser/Caln.php +++ b/src/Parser/Caln.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; -class Caln extends Gedcom\Parser\Component +class Caln extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Chan.php b/src/Parser/Chan.php index b3f57b4f..27bd599b 100644 --- a/src/Parser/Chan.php +++ b/src/Parser/Chan.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; -class Chan extends Gedcom\Parser\Component +class Chan extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Component.php b/src/Parser/Component.php index 3660e82d..16c9da48 100644 --- a/src/Parser/Component.php +++ b/src/Parser/Component.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; abstract class Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { } } diff --git a/src/Parser/Date.php b/src/Parser/Date.php index 5b6f8465..5dbe15a9 100644 --- a/src/Parser/Date.php +++ b/src/Parser/Date.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; -class Date extends Gedcom\Parser\Component +class Date extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Fam.php b/src/Parser/Fam.php index e44f5d22..f8dedc1e 100644 --- a/src/Parser/Fam.php +++ b/src/Parser/Fam.php @@ -12,9 +12,9 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; -class Fam extends Gedcom\Parser\Component +class Fam extends \Gedcom\Parser\Component { protected static $_eventTypes = [ 'ANUL', @@ -29,7 +29,7 @@ class Fam extends Gedcom\Parser\Component 'MARS', ]; - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -74,7 +74,7 @@ public static function parse(\Gedcom\Parser $parser) case 'MARL': case 'MARS': $className = ucfirst(strtolower($recordType)); - $class = '\\Gedcom\\Parser\\Fam\\'.$className; + $class = 'GedcomzParserzFamz'.$className; $even = $class::parse($parser); $fam->addEven($even); diff --git a/src/Parser/Fam/Anul.php b/src/Parser/Fam/Anul.php index fe724653..46327e54 100644 --- a/src/Parser/Fam/Anul.php +++ b/src/Parser/Fam/Anul.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Fam; +namespaceGedcom\Parser\Fam; -class Anul extends Gedcom\Parser\Fam\Even +class Anul extends \Gedcom\Parser\Fam\Even { } diff --git a/src/Parser/Fam/Cens.php b/src/Parser/Fam/Cens.php index 1c38249f..efde8de4 100644 --- a/src/Parser/Fam/Cens.php +++ b/src/Parser/Fam/Cens.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Fam; +namespaceGedcom\Parser\Fam; -class Cens extends Gedcom\Parser\Fam\Even +class Cens extends \Gedcom\Parser\Fam\Even { } diff --git a/src/Parser/Fam/Div.php b/src/Parser/Fam/Div.php index 96c65832..ec893f30 100644 --- a/src/Parser/Fam/Div.php +++ b/src/Parser/Fam/Div.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Fam; +namespaceGedcom\Parser\Fam; -class Div extends Gedcom\Parser\Fam\Even +class Div extends \Gedcom\Parser\Fam\Even { } diff --git a/src/Parser/Fam/Divf.php b/src/Parser/Fam/Divf.php index eb2fdd48..ab17314e 100644 --- a/src/Parser/Fam/Divf.php +++ b/src/Parser/Fam/Divf.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Fam; +namespaceGedcom\Parser\Fam; -class Divf extends Gedcom\Parser\Fam\Even +class Divf extends \Gedcom\Parser\Fam\Even { } diff --git a/src/Parser/Fam/Enga.php b/src/Parser/Fam/Enga.php index e515b640..a6e26752 100644 --- a/src/Parser/Fam/Enga.php +++ b/src/Parser/Fam/Enga.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Fam; +namespaceGedcom\Parser\Fam; -class Enga extends Gedcom\Parser\Fam\Even +class Enga extends \Gedcom\Parser\Fam\Even { } diff --git a/src/Parser/Fam/Even.php b/src/Parser/Fam/Even.php index 40965f1c..4231e784 100644 --- a/src/Parser/Fam/Even.php +++ b/src/Parser/Fam/Even.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Fam; +namespaceGedcom\Parser\Fam; -class Even extends Gedcom\Parser\Component +class Even extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Fam/Even/Husb.php b/src/Parser/Fam/Even/Husb.php index a63fd3ae..710d8467 100644 --- a/src/Parser/Fam/Even/Husb.php +++ b/src/Parser/Fam/Even/Husb.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Fam\Even; +namespaceGedcom\Parser\Fam\Even; -class Husb extends Gedcom\Parser\Component +class Husb extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Fam/Even/Wife.php b/src/Parser/Fam/Even/Wife.php index 07b4046e..7a5be57b 100644 --- a/src/Parser/Fam/Even/Wife.php +++ b/src/Parser/Fam/Even/Wife.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Fam\Even; +namespaceGedcom\Parser\Fam\Even; -class Wife extends Gedcom\Parser\Component +class Wife extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Fam/Marb.php b/src/Parser/Fam/Marb.php index 18f542dc..02120fee 100644 --- a/src/Parser/Fam/Marb.php +++ b/src/Parser/Fam/Marb.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Fam; +namespaceGedcom\Parser\Fam; -class Marb extends Gedcom\Parser\Fam\Even +class Marb extends \Gedcom\Parser\Fam\Even { } diff --git a/src/Parser/Fam/Marc.php b/src/Parser/Fam/Marc.php index 49364148..ef5f4e3d 100644 --- a/src/Parser/Fam/Marc.php +++ b/src/Parser/Fam/Marc.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Fam; +namespaceGedcom\Parser\Fam; -class Marc extends Gedcom\Parser\Fam\Even +class Marc extends \Gedcom\Parser\Fam\Even { } diff --git a/src/Parser/Fam/Marl.php b/src/Parser/Fam/Marl.php index ca5be6e7..19aab8a1 100644 --- a/src/Parser/Fam/Marl.php +++ b/src/Parser/Fam/Marl.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Fam; +namespaceGedcom\Parser\Fam; -class Marl extends Gedcom\Parser\Fam\Even +class Marl extends \Gedcom\Parser\Fam\Even { } diff --git a/src/Parser/Fam/Marr.php b/src/Parser/Fam/Marr.php index 56cb8b2b..40c96a71 100644 --- a/src/Parser/Fam/Marr.php +++ b/src/Parser/Fam/Marr.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Fam; +namespaceGedcom\Parser\Fam; -class Marr extends Gedcom\Parser\Fam\Even +class Marr extends \Gedcom\Parser\Fam\Even { } diff --git a/src/Parser/Fam/Mars.php b/src/Parser/Fam/Mars.php index 02cba23e..b1e94150 100644 --- a/src/Parser/Fam/Mars.php +++ b/src/Parser/Fam/Mars.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Fam; +namespaceGedcom\Parser\Fam; -class Mars extends Gedcom\Parser\Fam\Even +class Mars extends \Gedcom\Parser\Fam\Even { } diff --git a/src/Parser/Fam/Slgs.php b/src/Parser/Fam/Slgs.php index ba9f36a2..2e141d92 100644 --- a/src/Parser/Fam/Slgs.php +++ b/src/Parser/Fam/Slgs.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Fam; +namespaceGedcom\Parser\Fam; -class Slgs extends Gedcom\Parser\Component +class Slgs extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Fam/Slgs/Stat.php b/src/Parser/Fam/Slgs/Stat.php index 16457ca4..07845b8c 100644 --- a/src/Parser/Fam/Slgs/Stat.php +++ b/src/Parser/Fam/Slgs/Stat.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Fam\Slgs; +namespaceGedcom\Parser\Fam\Slgs; -class Stat extends Gedcom\Parser\Component +class Stat extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Head.php b/src/Parser/Head.php index 1a5c7cc9..ab969d0a 100644 --- a/src/Parser/Head.php +++ b/src/Parser/Head.php @@ -12,16 +12,16 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; -class Head extends Gedcom\Parser\Component +class Head extends \Gedcom\Parser\Component { /** - * @param \Gedcom\Parser $parser + * @param Gedcom\Parser $parser * * @return \Record\Head */ - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -51,7 +51,7 @@ public static function parse(\Gedcom\Parser $parser) switch ($recordType) { case 'SOUR': - $sour = \Gedcom\Parser\Head\Sour::parse($parser); + $sour = Gedcom\Parser\Head\Sour::parse($parser); $head->setSour($sour); break; case 'DEST': @@ -76,19 +76,19 @@ public static function parse(\Gedcom\Parser $parser) $head->setLang(trim($record[2])); break; case 'DATE': - $date = \Gedcom\Parser\Head\Date::parse($parser); + $date = Gedcom\Parser\Head\Date::parse($parser); $head->setDate($date); break; case 'GEDC': - $gedc = \Gedcom\Parser\Head\Gedc::parse($parser); + $gedc = Gedcom\Parser\Head\Gedc::parse($parser); $head->setGedc($gedc); break; case 'CHAR': - $char = \Gedcom\Parser\Head\Char::parse($parser); + $char = Gedcom\Parser\Head\Char::parse($parser); $head->setChar($char); break; case 'PLAC': - $plac = \Gedcom\Parser\Head\Plac::parse($parser); + $plac = Gedcom\Parser\Head\Plac::parse($parser); $head->setPlac($plac); break; case 'NOTE': diff --git a/src/Parser/Head/Char.php b/src/Parser/Head/Char.php index b396e520..2503e2ec 100644 --- a/src/Parser/Head/Char.php +++ b/src/Parser/Head/Char.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Head; +namespaceGedcom\Parser\Head; -class Char extends Gedcom\Parser\Component +class Char extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Head/Date.php b/src/Parser/Head/Date.php index 12d66376..057d4a86 100644 --- a/src/Parser/Head/Date.php +++ b/src/Parser/Head/Date.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Head; +namespaceGedcom\Parser\Head; -class Date extends Gedcom\Parser\Component +class Date extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Head/Gedc.php b/src/Parser/Head/Gedc.php index 7c86451e..05eac7c1 100644 --- a/src/Parser/Head/Gedc.php +++ b/src/Parser/Head/Gedc.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Head; +namespaceGedcom\Parser\Head; -class Gedc extends Gedcom\Parser\Component +class Gedc extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Head/Plac.php b/src/Parser/Head/Plac.php index 41baaf59..a8bac658 100644 --- a/src/Parser/Head/Plac.php +++ b/src/Parser/Head/Plac.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Head; +namespaceGedcom\Parser\Head; -class Plac extends Gedcom\Parser\Component +class Plac extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Head/Sour.php b/src/Parser/Head/Sour.php index a3691346..7e12514c 100644 --- a/src/Parser/Head/Sour.php +++ b/src/Parser/Head/Sour.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Head; +namespaceGedcom\Parser\Head; -class Sour extends Gedcom\Parser\Component +class Sour extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -49,11 +49,11 @@ public static function parse(\Gedcom\Parser $parser) $source->setName(trim($record[2])); break; case 'CORP': - $corp = \Gedcom\Parser\Head\Sour\Corp::parse($parser); + $corp = Gedcom\Parser\Head\Sour\Corp::parse($parser); $source->setCorp($corp); break; case 'DATA': - $data = \Gedcom\Parser\Head\Sour\Data::parse($parser); + $data = Gedcom\Parser\Head\Sour\Data::parse($parser); $source->setData($data); break; default: diff --git a/src/Parser/Head/Sour/Corp.php b/src/Parser/Head/Sour/Corp.php index 93f28d98..8b7c8b2a 100644 --- a/src/Parser/Head/Sour/Corp.php +++ b/src/Parser/Head/Sour/Corp.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Head\Sour; +namespaceGedcom\Parser\Head\Sour; -class Corp extends Gedcom\Parser\Component +class Corp extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Head/Sour/Data.php b/src/Parser/Head/Sour/Data.php index 39cae89e..9533efbc 100644 --- a/src/Parser/Head/Sour/Data.php +++ b/src/Parser/Head/Sour/Data.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Head\Sour; +namespaceGedcom\Parser\Head\Sour; -class Data extends Gedcom\Parser\Component +class Data extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Indi.php b/src/Parser/Indi.php index 739278b1..f5a235bd 100644 --- a/src/Parser/Indi.php +++ b/src/Parser/Indi.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; -class Indi extends Gedcom\Parser\Component +class Indi extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -83,7 +83,7 @@ public static function parse(\Gedcom\Parser $parser) case 'WILL': case 'EVEN': $className = ucfirst(strtolower($recordType)); - $class = '\\Gedcom\\Parser\\Indi\\'.$className; + $class = 'GedcomzParserzIndiz'.$className; $event = $class::parse($parser); $indi->addEven($event); @@ -102,7 +102,7 @@ public static function parse(\Gedcom\Parser $parser) case 'SSN': case 'TITL': $className = ucfirst(strtolower($recordType)); - $class = '\\Gedcom\\Parser\\Indi\\'.$className; + $class = 'GedcomzParserzIndiz'.$className; $att = $class::parse($parser); $indi->addAttr($att); @@ -112,7 +112,7 @@ public static function parse(\Gedcom\Parser $parser) case 'ENDL': case 'SLGC': $className = ucfirst(strtolower($recordType)); - $class = '\\Gedcom\\Parser\\Indi\\'.$className; + $class = 'GedcomzParserzIndiz'.$className; $lds = $class::parse($parser); $indi->{'add'.$recordType}[] = $lds; diff --git a/src/Parser/Indi/Adop.php b/src/Parser/Indi/Adop.php index f31bbc25..6e7fbe5b 100644 --- a/src/Parser/Indi/Adop.php +++ b/src/Parser/Indi/Adop.php @@ -12,9 +12,9 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Adop extends Gedcom\Parser\Indi\Even +class Adop extends \Gedcom\Parser\Indi\Even { public static function parseAdop($parser, $even) { diff --git a/src/Parser/Indi/Asso.php b/src/Parser/Indi/Asso.php index 173b776a..ae7ce6dd 100644 --- a/src/Parser/Indi/Asso.php +++ b/src/Parser/Indi/Asso.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Asso extends Gedcom\Parser\Component +class Asso extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Indi/Attr.php b/src/Parser/Indi/Attr.php index 3200fa2e..a4ad1cbd 100644 --- a/src/Parser/Indi/Attr.php +++ b/src/Parser/Indi/Attr.php @@ -12,16 +12,16 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -abstract class Attr extends Gedcom\Parser\Component +abstract class Attr extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[1])) { - $className = '\\Gedcom\\Record\\Indi\\'.ucfirst(strtolower(trim($record[1]))); + $className = 'GedcomzRecordzIndiz'.ucfirst(strtolower(trim($record[1]))); $attr = new $className(); $attr->setType(trim($record[1])); diff --git a/src/Parser/Indi/Bapl.php b/src/Parser/Indi/Bapl.php index 90cf2e3f..c04eb9ea 100644 --- a/src/Parser/Indi/Bapl.php +++ b/src/Parser/Indi/Bapl.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; class Bapl extends Lds { diff --git a/src/Parser/Indi/Bapm.php b/src/Parser/Indi/Bapm.php index 6332b6e5..6cff1028 100644 --- a/src/Parser/Indi/Bapm.php +++ b/src/Parser/Indi/Bapm.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Bapm extends Gedcom\Parser\Indi\Even +class Bapm extends \Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Barm.php b/src/Parser/Indi/Barm.php index ebc9be50..306cb094 100644 --- a/src/Parser/Indi/Barm.php +++ b/src/Parser/Indi/Barm.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Barm extends Gedcom\Parser\Indi\Even +class Barm extends \Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Basm.php b/src/Parser/Indi/Basm.php index bde50d03..f5f81878 100644 --- a/src/Parser/Indi/Basm.php +++ b/src/Parser/Indi/Basm.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Basm extends Gedcom\Parser\Indi\Even +class Basm extends \Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Birt.php b/src/Parser/Indi/Birt.php index 9df3508c..cca7c707 100644 --- a/src/Parser/Indi/Birt.php +++ b/src/Parser/Indi/Birt.php @@ -12,9 +12,9 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Birt extends Gedcom\Parser\Indi\Even +class Birt extends \Gedcom\Parser\Indi\Even { public static function parseFamc($parser, $even) { diff --git a/src/Parser/Indi/Bles.php b/src/Parser/Indi/Bles.php index 2021fe38..b151cf1b 100644 --- a/src/Parser/Indi/Bles.php +++ b/src/Parser/Indi/Bles.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Bles extends Gedcom\Parser\Indi\Even +class Bles extends \Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Buri.php b/src/Parser/Indi/Buri.php index 96c13541..95f4f70d 100644 --- a/src/Parser/Indi/Buri.php +++ b/src/Parser/Indi/Buri.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Buri extends Gedcom\Parser\Indi\Even +class Buri extends \Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Cast.php b/src/Parser/Indi/Cast.php index de64304b..6fd2ea75 100644 --- a/src/Parser/Indi/Cast.php +++ b/src/Parser/Indi/Cast.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Cast extends Gedcom\Parser\Indi\Attr +class Cast extends \Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Cens.php b/src/Parser/Indi/Cens.php index c79afd6a..316a9026 100644 --- a/src/Parser/Indi/Cens.php +++ b/src/Parser/Indi/Cens.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Cens extends Gedcom\Parser\Indi\Even +class Cens extends \Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Chr.php b/src/Parser/Indi/Chr.php index 0e0c466c..d8bd77c1 100644 --- a/src/Parser/Indi/Chr.php +++ b/src/Parser/Indi/Chr.php @@ -12,9 +12,9 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Chr extends Gedcom\Parser\Indi\Even +class Chr extends \Gedcom\Parser\Indi\Even { public static function parseFamc($parser, $even) { diff --git a/src/Parser/Indi/Chra.php b/src/Parser/Indi/Chra.php index 2d18f188..b8d1dd59 100644 --- a/src/Parser/Indi/Chra.php +++ b/src/Parser/Indi/Chra.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Chra extends Gedcom\Parser\Indi\Even +class Chra extends \Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Conf.php b/src/Parser/Indi/Conf.php index a0712aa7..fcee0832 100644 --- a/src/Parser/Indi/Conf.php +++ b/src/Parser/Indi/Conf.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Conf extends Gedcom\Parser\Indi\Even +class Conf extends \Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Conl.php b/src/Parser/Indi/Conl.php index 0a770c5c..71344d85 100644 --- a/src/Parser/Indi/Conl.php +++ b/src/Parser/Indi/Conl.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; class Conl extends Lds { diff --git a/src/Parser/Indi/Crem.php b/src/Parser/Indi/Crem.php index 3a0c60ad..57de64eb 100644 --- a/src/Parser/Indi/Crem.php +++ b/src/Parser/Indi/Crem.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Crem extends Gedcom\Parser\Indi\Even +class Crem extends \Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Deat.php b/src/Parser/Indi/Deat.php index bc4c6af6..bb2c8244 100644 --- a/src/Parser/Indi/Deat.php +++ b/src/Parser/Indi/Deat.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Deat extends Gedcom\Parser\Indi\Even +class Deat extends \Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Dscr.php b/src/Parser/Indi/Dscr.php index c956b033..6a1d4859 100644 --- a/src/Parser/Indi/Dscr.php +++ b/src/Parser/Indi/Dscr.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Dscr extends Gedcom\Parser\Indi\Attr +class Dscr extends \Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Educ.php b/src/Parser/Indi/Educ.php index 4f92de5e..22dbe7f3 100644 --- a/src/Parser/Indi/Educ.php +++ b/src/Parser/Indi/Educ.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Educ extends Gedcom\Parser\Indi\Attr +class Educ extends \Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Emig.php b/src/Parser/Indi/Emig.php index d51cf8fa..e284b707 100644 --- a/src/Parser/Indi/Emig.php +++ b/src/Parser/Indi/Emig.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Emig extends Gedcom\Parser\Indi\Even +class Emig extends \Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Endl.php b/src/Parser/Indi/Endl.php index bc0552a7..f0a11c42 100644 --- a/src/Parser/Indi/Endl.php +++ b/src/Parser/Indi/Endl.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; class Endl extends Lds { diff --git a/src/Parser/Indi/Even.php b/src/Parser/Indi/Even.php index 7fcd79b3..a6e7a484 100644 --- a/src/Parser/Indi/Even.php +++ b/src/Parser/Indi/Even.php @@ -12,13 +12,13 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; use Parser\Chan; -class Even extends Gedcom\Parser\Component +class Even extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -31,7 +31,7 @@ public static function parse(\Gedcom\Parser $parser) $even = null; if (strtoupper(trim($record[1])) != 'EVEN') { - $className = '\\Gedcom\\Record\\Indi\\'.ucfirst(strtolower(trim($record[1]))); + $className = 'GedcomzRecordzIndiz'.ucfirst(strtolower(trim($record[1]))); $even = new $className(); } else { $even = new \Record\Indi\Even(); diff --git a/src/Parser/Indi/Even/Plac.php b/src/Parser/Indi/Even/Plac.php index 4cb6d8ed..c2b6a8cd 100644 --- a/src/Parser/Indi/Even/Plac.php +++ b/src/Parser/Indi/Even/Plac.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi\Even; +namespaceGedcom\Parser\Indi\Even; -class Plac extends Gedcom\Parser\Component +class Plac extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Indi/Famc.php b/src/Parser/Indi/Famc.php index c44b7e59..67ca389c 100644 --- a/src/Parser/Indi/Famc.php +++ b/src/Parser/Indi/Famc.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Famc extends Gedcom\Parser\Component +class Famc extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Indi/Fams.php b/src/Parser/Indi/Fams.php index a87011c0..39527d6e 100644 --- a/src/Parser/Indi/Fams.php +++ b/src/Parser/Indi/Fams.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Fams extends Gedcom\Parser\Component +class Fams extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Indi/Fcom.php b/src/Parser/Indi/Fcom.php index 0e9a0e66..ed10d3b6 100644 --- a/src/Parser/Indi/Fcom.php +++ b/src/Parser/Indi/Fcom.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Fcom extends Gedcom\Parser\Indi\Even +class Fcom extends \Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Grad.php b/src/Parser/Indi/Grad.php index a2f3dfe8..08f8cc7b 100644 --- a/src/Parser/Indi/Grad.php +++ b/src/Parser/Indi/Grad.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Grad extends Gedcom\Parser\Indi\Even +class Grad extends \Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Idno.php b/src/Parser/Indi/Idno.php index 04d579f5..1e1e8b7a 100644 --- a/src/Parser/Indi/Idno.php +++ b/src/Parser/Indi/Idno.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Idno extends Gedcom\Parser\Indi\Attr +class Idno extends \Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Immi.php b/src/Parser/Indi/Immi.php index ea8aa07b..42d50272 100644 --- a/src/Parser/Indi/Immi.php +++ b/src/Parser/Indi/Immi.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Immi extends Gedcom\Parser\Indi\Even +class Immi extends \Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Lds.php b/src/Parser/Indi/Lds.php index 60d726f3..c4013b49 100644 --- a/src/Parser/Indi/Lds.php +++ b/src/Parser/Indi/Lds.php @@ -12,16 +12,16 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -abstract class Lds extends Gedcom\Parser\Component +abstract class Lds extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[1])) { - $className = '\\Gedcom\\Record\\Indi\\'.ucfirst(strtolower(trim($record[1]))); + $className = 'GedcomzRecordzIndiz'.ucfirst(strtolower(trim($record[1]))); $lds = new $className(); } else { $parser->skipToNextLevel($depth); diff --git a/src/Parser/Indi/Name.php b/src/Parser/Indi/Name.php index 7538c0e1..b3c9a707 100644 --- a/src/Parser/Indi/Name.php +++ b/src/Parser/Indi/Name.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Name extends Gedcom\Parser\Component +class Name extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Indi/Name/Fone.php b/src/Parser/Indi/Name/Fone.php index 58a00250..dc8f24d0 100644 --- a/src/Parser/Indi/Name/Fone.php +++ b/src/Parser/Indi/Name/Fone.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi\Name; +namespaceGedcom\Parser\Indi\Name; -class Fone extends Gedcom\Parser\Component +class Fone extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Indi/Name/Romn.php b/src/Parser/Indi/Name/Romn.php index db616f0c..dd45a4f1 100644 --- a/src/Parser/Indi/Name/Romn.php +++ b/src/Parser/Indi/Name/Romn.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi\Name; +namespaceGedcom\Parser\Indi\Name; -class Romn extends Gedcom\Parser\Component +class Romn extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Indi/Nati.php b/src/Parser/Indi/Nati.php index a94338a8..efa034ec 100644 --- a/src/Parser/Indi/Nati.php +++ b/src/Parser/Indi/Nati.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Nati extends Gedcom\Parser\Indi\Attr +class Nati extends \Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Natu.php b/src/Parser/Indi/Natu.php index 320827ec..bb08eff3 100644 --- a/src/Parser/Indi/Natu.php +++ b/src/Parser/Indi/Natu.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Natu extends Gedcom\Parser\Indi\Even +class Natu extends \Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Nchi.php b/src/Parser/Indi/Nchi.php index 3f69a34f..7eee6459 100644 --- a/src/Parser/Indi/Nchi.php +++ b/src/Parser/Indi/Nchi.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Nchi extends Gedcom\Parser\Indi\Attr +class Nchi extends \Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Nmr.php b/src/Parser/Indi/Nmr.php index ca79f04e..11902200 100644 --- a/src/Parser/Indi/Nmr.php +++ b/src/Parser/Indi/Nmr.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Nmr extends Gedcom\Parser\Indi\Attr +class Nmr extends \Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Occu.php b/src/Parser/Indi/Occu.php index 9d37c587..0591b8c9 100644 --- a/src/Parser/Indi/Occu.php +++ b/src/Parser/Indi/Occu.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Occu extends Gedcom\Parser\Indi\Attr +class Occu extends \Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Ordn.php b/src/Parser/Indi/Ordn.php index 0ac1b66f..95f693f1 100644 --- a/src/Parser/Indi/Ordn.php +++ b/src/Parser/Indi/Ordn.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Ordn extends Gedcom\Parser\Indi\Even +class Ordn extends \Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Prob.php b/src/Parser/Indi/Prob.php index 57e78b48..9b35cee6 100644 --- a/src/Parser/Indi/Prob.php +++ b/src/Parser/Indi/Prob.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Prob extends Gedcom\Parser\Indi\Even +class Prob extends \Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Prop.php b/src/Parser/Indi/Prop.php index ae492ba5..685ebc4c 100644 --- a/src/Parser/Indi/Prop.php +++ b/src/Parser/Indi/Prop.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Prop extends Gedcom\Parser\Indi\Attr +class Prop extends \Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Reli.php b/src/Parser/Indi/Reli.php index a72c5a3e..2532f50e 100644 --- a/src/Parser/Indi/Reli.php +++ b/src/Parser/Indi/Reli.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Reli extends Gedcom\Parser\Indi\Attr +class Reli extends \Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Resi.php b/src/Parser/Indi/Resi.php index 471e59fc..d9cbaadf 100644 --- a/src/Parser/Indi/Resi.php +++ b/src/Parser/Indi/Resi.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Resi extends Gedcom\Parser\Indi\Attr +class Resi extends \Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Reti.php b/src/Parser/Indi/Reti.php index 0be54dc5..f997e1cf 100644 --- a/src/Parser/Indi/Reti.php +++ b/src/Parser/Indi/Reti.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Reti extends Gedcom\Parser\Indi\Even +class Reti extends \Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Indi/Slgc.php b/src/Parser/Indi/Slgc.php index b358d341..be8cf524 100644 --- a/src/Parser/Indi/Slgc.php +++ b/src/Parser/Indi/Slgc.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; class Slgc extends Lds { diff --git a/src/Parser/Indi/Ssn.php b/src/Parser/Indi/Ssn.php index 28a50c6b..334ad46e 100644 --- a/src/Parser/Indi/Ssn.php +++ b/src/Parser/Indi/Ssn.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Ssn extends Gedcom\Parser\Indi\Attr +class Ssn extends \Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Titl.php b/src/Parser/Indi/Titl.php index 0782fc31..47e078cc 100644 --- a/src/Parser/Indi/Titl.php +++ b/src/Parser/Indi/Titl.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Titl extends Gedcom\Parser\Indi\Attr +class Titl extends \Gedcom\Parser\Indi\Attr { } diff --git a/src/Parser/Indi/Will.php b/src/Parser/Indi/Will.php index 90d195a9..e19447e3 100644 --- a/src/Parser/Indi/Will.php +++ b/src/Parser/Indi/Will.php @@ -12,8 +12,8 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Indi; +namespaceGedcom\Parser\Indi; -class Will extends Gedcom\Parser\Indi\Even +class Will extends \Gedcom\Parser\Indi\Even { } diff --git a/src/Parser/Note.php b/src/Parser/Note.php index 32c2ea92..e210e69b 100644 --- a/src/Parser/Note.php +++ b/src/Parser/Note.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; -class Note extends Gedcom\Parser\Component +class Note extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(4); $depth = (int) $record[0]; diff --git a/src/Parser/NoteRef.php b/src/Parser/NoteRef.php index 166b9313..16454d28 100644 --- a/src/Parser/NoteRef.php +++ b/src/Parser/NoteRef.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; -class NoteRef extends Gedcom\Parser\Component +class NoteRef extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Obje.php b/src/Parser/Obje.php index b8a83637..ba5d5919 100644 --- a/src/Parser/Obje.php +++ b/src/Parser/Obje.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; -class Obje extends Gedcom\Parser\Component +class Obje extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/ObjeRef.php b/src/Parser/ObjeRef.php index 66ff9a5e..d1715ba4 100644 --- a/src/Parser/ObjeRef.php +++ b/src/Parser/ObjeRef.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; -class ObjeRef extends Gedcom\Parser\Component +class ObjeRef extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/ObjeRef/File.php b/src/Parser/ObjeRef/File.php index 3ae76529..004175d5 100644 --- a/src/Parser/ObjeRef/File.php +++ b/src/Parser/ObjeRef/File.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\ObjeRef; +namespaceGedcom\Parser\ObjeRef; -class File extends Gedcom\Parser\Component +class File extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $file = new \Record\ObjeRef\File(); $record = $parser->getCurrentLineRecord(); diff --git a/src/Parser/ObjeRef/File/Form.php b/src/Parser/ObjeRef/File/Form.php index 8f026e87..fdebfcfa 100644 --- a/src/Parser/ObjeRef/File/Form.php +++ b/src/Parser/ObjeRef/File/Form.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\ObjeRef\File; +namespaceGedcom\Parser\ObjeRef\File; -class Form extends Gedcom\Parser\Component +class Form extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $form = new \Record\ObjeRef\File\Form(); $record = $parser->getCurrentLineRecord(); diff --git a/src/Parser/Phon.php b/src/Parser/Phon.php index c15a56b3..dc2c9641 100644 --- a/src/Parser/Phon.php +++ b/src/Parser/Phon.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; -class Phon extends Gedcom\Parser\Component +class Phon extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Plac.php b/src/Parser/Plac.php index 6e61ef61..0d6e2088 100644 --- a/src/Parser/Plac.php +++ b/src/Parser/Plac.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; -class Plac extends Gedcom\Parser\Component +class Plac extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Plac/Fone.php b/src/Parser/Plac/Fone.php index 9d028ec1..a943ffc3 100644 --- a/src/Parser/Plac/Fone.php +++ b/src/Parser/Plac/Fone.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Plac; +namespaceGedcom\Parser\Plac; -class Fone extends Gedcom\Parser\Component +class Fone extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Plac/Map.php b/src/Parser/Plac/Map.php index 6e55b7f8..36994ce9 100644 --- a/src/Parser/Plac/Map.php +++ b/src/Parser/Plac/Map.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Plac; +namespaceGedcom\Parser\Plac; -class Map extends Gedcom\Parser\Component +class Map extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Plac/Romn.php b/src/Parser/Plac/Romn.php index ddd6f74c..5a4d597f 100644 --- a/src/Parser/Plac/Romn.php +++ b/src/Parser/Plac/Romn.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Plac; +namespaceGedcom\Parser\Plac; -class Romn extends Gedcom\Parser\Component +class Romn extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Refn.php b/src/Parser/Refn.php index 77a15ebb..85fbb5ef 100644 --- a/src/Parser/Refn.php +++ b/src/Parser/Refn.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; -class Refn extends Gedcom\Parser\Component +class Refn extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Repo.php b/src/Parser/Repo.php index 87d7ae8a..904f45a0 100644 --- a/src/Parser/Repo.php +++ b/src/Parser/Repo.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; -class Repo extends Gedcom\Parser\Component +class Repo extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/RepoRef.php b/src/Parser/RepoRef.php index 407219d4..fd235615 100644 --- a/src/Parser/RepoRef.php +++ b/src/Parser/RepoRef.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; -class RepoRef extends Gedcom\Parser\Component +class RepoRef extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Sour.php b/src/Parser/Sour.php index 1e9914a3..fabb91d7 100644 --- a/src/Parser/Sour.php +++ b/src/Parser/Sour.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; -class Sour extends Gedcom\Parser\Component +class Sour extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Sour/Data.php b/src/Parser/Sour/Data.php index 02507279..ffa828ec 100644 --- a/src/Parser/Sour/Data.php +++ b/src/Parser/Sour/Data.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Sour; +namespaceGedcom\Parser\Sour; -class Data extends Gedcom\Parser\Component +class Data extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Sour/Data/Even.php b/src/Parser/Sour/Data/Even.php index 685fdd9b..8579f48b 100644 --- a/src/Parser/Sour/Data/Even.php +++ b/src/Parser/Sour/Data/Even.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Sour\Data; +namespaceGedcom\Parser\Sour\Data; -class Even extends Gedcom\Parser\Component +class Even extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Sour/Repo.php b/src/Parser/Sour/Repo.php index f14e6dab..3c73c43f 100644 --- a/src/Parser/Sour/Repo.php +++ b/src/Parser/Sour/Repo.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Sour; +namespaceGedcom\Parser\Sour; -class Repo extends Gedcom\Parser\Component +class Repo extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $repo = new \Record\Sour\Repo(); $record = $parser->getCurrentLineRecord(); diff --git a/src/Parser/Sour/Repo/Caln.php b/src/Parser/Sour/Repo/Caln.php index 2dbf513a..3a03791f 100644 --- a/src/Parser/Sour/Repo/Caln.php +++ b/src/Parser/Sour/Repo/Caln.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\Sour\Repo; +namespaceGedcom\Parser\Sour\Repo; -class Caln extends Gedcom\Parser\Component +class Caln extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $caln = new \Record\Sour\Repo\Caln(); $record = $parser->getCurrentLineRecord(); diff --git a/src/Parser/SourRef.php b/src/Parser/SourRef.php index 1644fe9c..0556f7e0 100644 --- a/src/Parser/SourRef.php +++ b/src/Parser/SourRef.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; -class SourRef extends Gedcom\Parser\Component +class SourRef extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/SourRef/Data.php b/src/Parser/SourRef/Data.php index d7889ced..481a18c8 100644 --- a/src/Parser/SourRef/Data.php +++ b/src/Parser/SourRef/Data.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\SourRef; +namespaceGedcom\Parser\SourRef; -class Data extends Gedcom\Parser\Component +class Data extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $data = new \Record\SourRef\Data(); $record = $parser->getCurrentLineRecord(); diff --git a/src/Parser/SourRef/Even.php b/src/Parser/SourRef/Even.php index 7a5039b5..b2d0c59d 100644 --- a/src/Parser/SourRef/Even.php +++ b/src/Parser/SourRef/Even.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser\SourRef; +namespaceGedcom\Parser\SourRef; -class Even extends Gedcom\Parser\Component +class Even extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Subm.php b/src/Parser/Subm.php index 3f324cf7..8aed312e 100644 --- a/src/Parser/Subm.php +++ b/src/Parser/Subm.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; -class Subm extends Gedcom\Parser\Component +class Subm extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Subn.php b/src/Parser/Subn.php index e26f5d6e..a90b8ef7 100644 --- a/src/Parser/Subn.php +++ b/src/Parser/Subn.php @@ -12,11 +12,11 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespace Gedcom\Parser; +namespaceGedcom\Parser; -class Subn extends Gedcom\Parser\Component +class Subn extends \Gedcom\Parser\Component { - public static function parse(\Gedcom\Parser $parser) + public static function parse(Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Record/Addr.php b/src/Record/Addr.php index a367a7e2..3515e97d 100644 --- a/src/Record/Addr.php +++ b/src/Record/Addr.php @@ -19,7 +19,7 @@ /** * Class Addr. */ -class Addr extends Gedcom\Record +class Addr extends \Gedcom\Record { /** * @var string diff --git a/src/Record/Caln.php b/src/Record/Caln.php index 48fb2ce2..d22fb96e 100644 --- a/src/Record/Caln.php +++ b/src/Record/Caln.php @@ -19,7 +19,7 @@ /** * Class Caln. */ -class Caln extends Gedcom\Record +class Caln extends \Gedcom\Record { /** * @var string diff --git a/src/Record/Chan.php b/src/Record/Chan.php index 6f108632..fa918f6d 100644 --- a/src/Record/Chan.php +++ b/src/Record/Chan.php @@ -19,7 +19,7 @@ /** * Class Chan. */ -class Chan extends Gedcom\Record +class Chan extends \Gedcom\Record { /** * @var string diff --git a/src/Record/Data.php b/src/Record/Data.php index 793bd587..0435d633 100644 --- a/src/Record/Data.php +++ b/src/Record/Data.php @@ -19,7 +19,7 @@ /** * Class Data. */ -class Data extends Gedcom\Record +class Data extends \Gedcom\Record { /** * @var string diff --git a/src/Record/Date.php b/src/Record/Date.php index b0ae21b8..ddfbd045 100644 --- a/src/Record/Date.php +++ b/src/Record/Date.php @@ -19,7 +19,7 @@ /** * Class Date. */ -class Date extends Gedcom\Record +class Date extends \Gedcom\Record { /** * @var string diff --git a/src/Record/Head.php b/src/Record/Head.php index 834b8c16..ffdc5873 100644 --- a/src/Record/Head.php +++ b/src/Record/Head.php @@ -19,7 +19,7 @@ /** * Stores the data from the HEAD section of a GEDCOM 5.5 file. */ -class Head extends Gedcom\Record +class Head extends \Gedcom\Record { /** * @var Head\Sour diff --git a/src/Record/Indi.php b/src/Record/Indi.php index 83f14ee9..75396bff 100644 --- a/src/Record/Indi.php +++ b/src/Record/Indi.php @@ -20,7 +20,7 @@ /** * Class Indi. */ -class Indi extends Gedcom\Record implements Noteable, Objectable, Sourceable +class Indi extends \Gedcom\Record implements Noteable, Objectable, Sourceable { /** * @var string diff --git a/src/Record/Indi/Even.php b/src/Record/Indi/Even.php index 75498986..9f412673 100644 --- a/src/Record/Indi/Even.php +++ b/src/Record/Indi/Even.php @@ -19,7 +19,7 @@ /** * Class Even. */ -class Even extends Gedcom\Record implements Record\Objectable, Record\Sourceable, Record\Noteable +class Even extends \Gedcom\Record implements Record\Objectable, Record\Sourceable, Record\Noteable { /** * @var string diff --git a/src/Record/Indi/Even/Plac.php b/src/Record/Indi/Even/Plac.php index 67c73852..c2c6ae33 100644 --- a/src/Record/Indi/Even/Plac.php +++ b/src/Record/Indi/Even/Plac.php @@ -19,7 +19,7 @@ /** * Class Plac. */ -class Plac extends Gedcom\Record implements Record\Noteable, Record\Sourceable +class Plac extends \Gedcom\Record implements Record\Noteable, Record\Sourceable { /** * @var string diff --git a/src/Record/Indi/Name/Fone.php b/src/Record/Indi/Name/Fone.php index 33069e11..6c2d177c 100644 --- a/src/Record/Indi/Name/Fone.php +++ b/src/Record/Indi/Name/Fone.php @@ -19,7 +19,7 @@ /** * Class Refn. */ -class Fone extends Gedcom\Record +class Fone extends \Gedcom\Record { /** * @var string phonetic_variation diff --git a/src/Record/Indi/Name/Romn.php b/src/Record/Indi/Name/Romn.php index 832e1db1..9a7747af 100644 --- a/src/Record/Indi/Name/Romn.php +++ b/src/Record/Indi/Name/Romn.php @@ -19,7 +19,7 @@ /** * Class Refn. */ -class Romn extends Gedcom\Record +class Romn extends \Gedcom\Record { /** * @var string romanized_variation diff --git a/src/Record/ObjeRef/File.php b/src/Record/ObjeRef/File.php index 65ce4ec2..aed79d84 100644 --- a/src/Record/ObjeRef/File.php +++ b/src/Record/ObjeRef/File.php @@ -19,7 +19,7 @@ /** * Class Refn. */ -class File extends Gedcom\Record +class File extends \Gedcom\Record { /** * @var string multimedia_file_refn diff --git a/src/Record/ObjeRef/File/Form.php b/src/Record/ObjeRef/File/Form.php index 1649f195..571f0273 100644 --- a/src/Record/ObjeRef/File/Form.php +++ b/src/Record/ObjeRef/File/Form.php @@ -19,7 +19,7 @@ /** * Class Refn. */ -class Form extends Gedcom\Record +class Form extends \Gedcom\Record { /** * @var string multimedia_format diff --git a/src/Record/Phon.php b/src/Record/Phon.php index ec7721d9..80539c45 100644 --- a/src/Record/Phon.php +++ b/src/Record/Phon.php @@ -19,7 +19,7 @@ /** * Class Phon. */ -class Phon extends Gedcom\Record +class Phon extends \Gedcom\Record { /** * @var string diff --git a/src/Record/Plac/Fone.php b/src/Record/Plac/Fone.php index 9632cbaa..2c891e8d 100644 --- a/src/Record/Plac/Fone.php +++ b/src/Record/Plac/Fone.php @@ -19,7 +19,7 @@ /** * Class Refn. */ -class Fone extends Gedcom\Record +class Fone extends \Gedcom\Record { /** * @var string phonetic_variation diff --git a/src/Record/Plac/Map.php b/src/Record/Plac/Map.php index ac0660ea..cd6018dc 100644 --- a/src/Record/Plac/Map.php +++ b/src/Record/Plac/Map.php @@ -19,7 +19,7 @@ /** * Class Refn. */ -class Map extends Gedcom\Record +class Map extends \Gedcom\Record { /** * @var string place_latitude diff --git a/src/Record/Plac/Romn.php b/src/Record/Plac/Romn.php index 192996bc..21710e4d 100644 --- a/src/Record/Plac/Romn.php +++ b/src/Record/Plac/Romn.php @@ -19,7 +19,7 @@ /** * Class Refn. */ -class Romn extends Gedcom\Record +class Romn extends \Gedcom\Record { /** * @var string romanized_variation diff --git a/src/Record/Refn.php b/src/Record/Refn.php index 259e2b1f..db368f12 100644 --- a/src/Record/Refn.php +++ b/src/Record/Refn.php @@ -19,7 +19,7 @@ /** * Class Refn. */ -class Refn extends Gedcom\Record +class Refn extends \Gedcom\Record { /** * @var string diff --git a/src/Record/Repo.php b/src/Record/Repo.php index 3d2001f8..b9eed15d 100644 --- a/src/Record/Repo.php +++ b/src/Record/Repo.php @@ -19,7 +19,7 @@ /** * Class Repo. */ -class Repo extends Gedcom\Record implements Noteable +class Repo extends \Gedcom\Record implements Noteable { /** * @var string diff --git a/src/Record/Sour.php b/src/Record/Sour.php index cfaa88ec..09350453 100644 --- a/src/Record/Sour.php +++ b/src/Record/Sour.php @@ -19,7 +19,7 @@ /** * Class Sour. */ -class Sour extends Gedcom\Record implements Noteable, Objectable +class Sour extends \Gedcom\Record implements Noteable, Objectable { /** * @var string diff --git a/src/Record/Subm.php b/src/Record/Subm.php index 8a1e287e..39f9d21c 100644 --- a/src/Record/Subm.php +++ b/src/Record/Subm.php @@ -19,7 +19,7 @@ /** * Class Subm. */ -class Subm extends Gedcom\Record implements Objectable +class Subm extends \Gedcom\Record implements Objectable { /** * @var string diff --git a/src/Record/Subn.php b/src/Record/Subn.php index c980fa85..b8d1b065 100644 --- a/src/Record/Subn.php +++ b/src/Record/Subn.php @@ -19,7 +19,7 @@ /** * Class Subn. */ -class Subn extends Gedcom\Record +class Subn extends \Gedcom\Record { /** * @var string From 6e84a3f104a5e6cc8a417f70c40fbe8c7a0edbce Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sat, 17 Jul 2021 22:31:52 +0100 Subject: [PATCH 69/99] Update PSR4. --- src/Parser/Addr.php | 2 +- src/Parser/Caln.php | 2 +- src/Parser/Chan.php | 2 +- src/Parser/Component.php | 2 +- src/Parser/Date.php | 2 +- src/Parser/Fam.php | 2 +- src/Parser/Fam/Anul.php | 2 +- src/Parser/Fam/Cens.php | 2 +- src/Parser/Fam/Div.php | 2 +- src/Parser/Fam/Divf.php | 2 +- src/Parser/Fam/Enga.php | 2 +- src/Parser/Fam/Even.php | 2 +- src/Parser/Fam/Even/Husb.php | 2 +- src/Parser/Fam/Even/Wife.php | 2 +- src/Parser/Fam/Marb.php | 2 +- src/Parser/Fam/Marc.php | 2 +- src/Parser/Fam/Marl.php | 2 +- src/Parser/Fam/Marr.php | 2 +- src/Parser/Fam/Mars.php | 2 +- src/Parser/Fam/Slgs.php | 2 +- src/Parser/Fam/Slgs/Stat.php | 2 +- src/Parser/Head.php | 2 +- src/Parser/Head/Char.php | 2 +- src/Parser/Head/Date.php | 2 +- src/Parser/Head/Gedc.php | 2 +- src/Parser/Head/Plac.php | 2 +- src/Parser/Head/Sour.php | 2 +- src/Parser/Head/Sour/Corp.php | 2 +- src/Parser/Head/Sour/Data.php | 2 +- src/Parser/Indi.php | 2 +- src/Parser/Indi/Adop.php | 2 +- src/Parser/Indi/Asso.php | 2 +- src/Parser/Indi/Attr.php | 2 +- src/Parser/Indi/Bapl.php | 2 +- src/Parser/Indi/Bapm.php | 2 +- src/Parser/Indi/Barm.php | 2 +- src/Parser/Indi/Basm.php | 2 +- src/Parser/Indi/Birt.php | 2 +- src/Parser/Indi/Bles.php | 2 +- src/Parser/Indi/Buri.php | 2 +- src/Parser/Indi/Cast.php | 2 +- src/Parser/Indi/Cens.php | 2 +- src/Parser/Indi/Chr.php | 2 +- src/Parser/Indi/Chra.php | 2 +- src/Parser/Indi/Conf.php | 2 +- src/Parser/Indi/Conl.php | 2 +- src/Parser/Indi/Crem.php | 2 +- src/Parser/Indi/Deat.php | 2 +- src/Parser/Indi/Dscr.php | 2 +- src/Parser/Indi/Educ.php | 2 +- src/Parser/Indi/Emig.php | 2 +- src/Parser/Indi/Endl.php | 2 +- src/Parser/Indi/Even.php | 2 +- src/Parser/Indi/Even/Plac.php | 2 +- src/Parser/Indi/Famc.php | 2 +- src/Parser/Indi/Fams.php | 2 +- src/Parser/Indi/Fcom.php | 2 +- src/Parser/Indi/Grad.php | 2 +- src/Parser/Indi/Idno.php | 2 +- src/Parser/Indi/Immi.php | 2 +- src/Parser/Indi/Lds.php | 2 +- src/Parser/Indi/Name.php | 2 +- src/Parser/Indi/Name/Fone.php | 2 +- src/Parser/Indi/Name/Romn.php | 2 +- src/Parser/Indi/Nati.php | 2 +- src/Parser/Indi/Natu.php | 2 +- src/Parser/Indi/Nchi.php | 2 +- src/Parser/Indi/Nmr.php | 2 +- src/Parser/Indi/Occu.php | 2 +- src/Parser/Indi/Ordn.php | 2 +- src/Parser/Indi/Prob.php | 2 +- src/Parser/Indi/Prop.php | 2 +- src/Parser/Indi/Reli.php | 2 +- src/Parser/Indi/Resi.php | 2 +- src/Parser/Indi/Reti.php | 2 +- src/Parser/Indi/Slgc.php | 2 +- src/Parser/Indi/Ssn.php | 2 +- src/Parser/Indi/Titl.php | 2 +- src/Parser/Indi/Will.php | 2 +- src/Parser/Note.php | 2 +- src/Parser/NoteRef.php | 2 +- src/Parser/Obje.php | 2 +- src/Parser/ObjeRef.php | 2 +- src/Parser/ObjeRef/File.php | 2 +- src/Parser/ObjeRef/File/Form.php | 2 +- src/Parser/Phon.php | 2 +- src/Parser/Plac.php | 2 +- src/Parser/Plac/Fone.php | 2 +- src/Parser/Plac/Map.php | 2 +- src/Parser/Plac/Romn.php | 2 +- src/Parser/Refn.php | 2 +- src/Parser/Repo.php | 2 +- src/Parser/RepoRef.php | 2 +- src/Parser/Sour.php | 2 +- src/Parser/Sour/Data.php | 2 +- src/Parser/Sour/Data/Even.php | 2 +- src/Parser/Sour/Repo.php | 2 +- src/Parser/Sour/Repo/Caln.php | 2 +- src/Parser/SourRef.php | 2 +- src/Parser/SourRef/Data.php | 2 +- src/Parser/SourRef/Even.php | 2 +- src/Parser/Subm.php | 2 +- src/Parser/Subn.php | 2 +- 103 files changed, 103 insertions(+), 103 deletions(-) diff --git a/src/Parser/Addr.php b/src/Parser/Addr.php index c6702c2c..cdf3071a 100644 --- a/src/Parser/Addr.php +++ b/src/Parser/Addr.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; class Addr extends \Gedcom\Parser\Component { diff --git a/src/Parser/Caln.php b/src/Parser/Caln.php index 0aa0ac08..86666713 100644 --- a/src/Parser/Caln.php +++ b/src/Parser/Caln.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; class Caln extends \Gedcom\Parser\Component { diff --git a/src/Parser/Chan.php b/src/Parser/Chan.php index 27bd599b..c320572b 100644 --- a/src/Parser/Chan.php +++ b/src/Parser/Chan.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; class Chan extends \Gedcom\Parser\Component { diff --git a/src/Parser/Component.php b/src/Parser/Component.php index 16c9da48..f22d70ba 100644 --- a/src/Parser/Component.php +++ b/src/Parser/Component.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; abstract class Component { diff --git a/src/Parser/Date.php b/src/Parser/Date.php index 5dbe15a9..d917ebfa 100644 --- a/src/Parser/Date.php +++ b/src/Parser/Date.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; class Date extends \Gedcom\Parser\Component { diff --git a/src/Parser/Fam.php b/src/Parser/Fam.php index f8dedc1e..449f22d3 100644 --- a/src/Parser/Fam.php +++ b/src/Parser/Fam.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; class Fam extends \Gedcom\Parser\Component { diff --git a/src/Parser/Fam/Anul.php b/src/Parser/Fam/Anul.php index 46327e54..c1ea4c8b 100644 --- a/src/Parser/Fam/Anul.php +++ b/src/Parser/Fam/Anul.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Fam; +namespace Gedcom\Parser\Fam; class Anul extends \Gedcom\Parser\Fam\Even { diff --git a/src/Parser/Fam/Cens.php b/src/Parser/Fam/Cens.php index efde8de4..5dc64ce4 100644 --- a/src/Parser/Fam/Cens.php +++ b/src/Parser/Fam/Cens.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Fam; +namespace Gedcom\Parser\Fam; class Cens extends \Gedcom\Parser\Fam\Even { diff --git a/src/Parser/Fam/Div.php b/src/Parser/Fam/Div.php index ec893f30..d899a3e4 100644 --- a/src/Parser/Fam/Div.php +++ b/src/Parser/Fam/Div.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Fam; +namespace Gedcom\Parser\Fam; class Div extends \Gedcom\Parser\Fam\Even { diff --git a/src/Parser/Fam/Divf.php b/src/Parser/Fam/Divf.php index ab17314e..7517eee0 100644 --- a/src/Parser/Fam/Divf.php +++ b/src/Parser/Fam/Divf.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Fam; +namespace Gedcom\Parser\Fam; class Divf extends \Gedcom\Parser\Fam\Even { diff --git a/src/Parser/Fam/Enga.php b/src/Parser/Fam/Enga.php index a6e26752..dcdbe168 100644 --- a/src/Parser/Fam/Enga.php +++ b/src/Parser/Fam/Enga.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Fam; +namespace Gedcom\Parser\Fam; class Enga extends \Gedcom\Parser\Fam\Even { diff --git a/src/Parser/Fam/Even.php b/src/Parser/Fam/Even.php index 4231e784..9a6b414c 100644 --- a/src/Parser/Fam/Even.php +++ b/src/Parser/Fam/Even.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Fam; +namespace Gedcom\Parser\Fam; class Even extends \Gedcom\Parser\Component { diff --git a/src/Parser/Fam/Even/Husb.php b/src/Parser/Fam/Even/Husb.php index 710d8467..5df32c62 100644 --- a/src/Parser/Fam/Even/Husb.php +++ b/src/Parser/Fam/Even/Husb.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Fam\Even; +namespace Gedcom\Parser\Fam\Even; class Husb extends \Gedcom\Parser\Component { diff --git a/src/Parser/Fam/Even/Wife.php b/src/Parser/Fam/Even/Wife.php index 7a5be57b..65fe4af1 100644 --- a/src/Parser/Fam/Even/Wife.php +++ b/src/Parser/Fam/Even/Wife.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Fam\Even; +namespace Gedcom\Parser\Fam\Even; class Wife extends \Gedcom\Parser\Component { diff --git a/src/Parser/Fam/Marb.php b/src/Parser/Fam/Marb.php index 02120fee..546220f1 100644 --- a/src/Parser/Fam/Marb.php +++ b/src/Parser/Fam/Marb.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Fam; +namespace Gedcom\Parser\Fam; class Marb extends \Gedcom\Parser\Fam\Even { diff --git a/src/Parser/Fam/Marc.php b/src/Parser/Fam/Marc.php index ef5f4e3d..128df44b 100644 --- a/src/Parser/Fam/Marc.php +++ b/src/Parser/Fam/Marc.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Fam; +namespace Gedcom\Parser\Fam; class Marc extends \Gedcom\Parser\Fam\Even { diff --git a/src/Parser/Fam/Marl.php b/src/Parser/Fam/Marl.php index 19aab8a1..98be66e3 100644 --- a/src/Parser/Fam/Marl.php +++ b/src/Parser/Fam/Marl.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Fam; +namespace Gedcom\Parser\Fam; class Marl extends \Gedcom\Parser\Fam\Even { diff --git a/src/Parser/Fam/Marr.php b/src/Parser/Fam/Marr.php index 40c96a71..274fa47f 100644 --- a/src/Parser/Fam/Marr.php +++ b/src/Parser/Fam/Marr.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Fam; +namespace Gedcom\Parser\Fam; class Marr extends \Gedcom\Parser\Fam\Even { diff --git a/src/Parser/Fam/Mars.php b/src/Parser/Fam/Mars.php index b1e94150..2a9eba93 100644 --- a/src/Parser/Fam/Mars.php +++ b/src/Parser/Fam/Mars.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Fam; +namespace Gedcom\Parser\Fam; class Mars extends \Gedcom\Parser\Fam\Even { diff --git a/src/Parser/Fam/Slgs.php b/src/Parser/Fam/Slgs.php index 2e141d92..408a52c2 100644 --- a/src/Parser/Fam/Slgs.php +++ b/src/Parser/Fam/Slgs.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Fam; +namespace Gedcom\Parser\Fam; class Slgs extends \Gedcom\Parser\Component { diff --git a/src/Parser/Fam/Slgs/Stat.php b/src/Parser/Fam/Slgs/Stat.php index 07845b8c..15d3b8f9 100644 --- a/src/Parser/Fam/Slgs/Stat.php +++ b/src/Parser/Fam/Slgs/Stat.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Fam\Slgs; +namespace Gedcom\Parser\Fam\Slgs; class Stat extends \Gedcom\Parser\Component { diff --git a/src/Parser/Head.php b/src/Parser/Head.php index ab969d0a..30b548c8 100644 --- a/src/Parser/Head.php +++ b/src/Parser/Head.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; class Head extends \Gedcom\Parser\Component { diff --git a/src/Parser/Head/Char.php b/src/Parser/Head/Char.php index 2503e2ec..95c21c58 100644 --- a/src/Parser/Head/Char.php +++ b/src/Parser/Head/Char.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Head; +namespace Gedcom\Parser\Head; class Char extends \Gedcom\Parser\Component { diff --git a/src/Parser/Head/Date.php b/src/Parser/Head/Date.php index 057d4a86..c71a72db 100644 --- a/src/Parser/Head/Date.php +++ b/src/Parser/Head/Date.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Head; +namespace Gedcom\Parser\Head; class Date extends \Gedcom\Parser\Component { diff --git a/src/Parser/Head/Gedc.php b/src/Parser/Head/Gedc.php index 05eac7c1..04538e19 100644 --- a/src/Parser/Head/Gedc.php +++ b/src/Parser/Head/Gedc.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Head; +namespace Gedcom\Parser\Head; class Gedc extends \Gedcom\Parser\Component { diff --git a/src/Parser/Head/Plac.php b/src/Parser/Head/Plac.php index a8bac658..b464acdc 100644 --- a/src/Parser/Head/Plac.php +++ b/src/Parser/Head/Plac.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Head; +namespace Gedcom\Parser\Head; class Plac extends \Gedcom\Parser\Component { diff --git a/src/Parser/Head/Sour.php b/src/Parser/Head/Sour.php index 7e12514c..767ecd94 100644 --- a/src/Parser/Head/Sour.php +++ b/src/Parser/Head/Sour.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Head; +namespace Gedcom\Parser\Head; class Sour extends \Gedcom\Parser\Component { diff --git a/src/Parser/Head/Sour/Corp.php b/src/Parser/Head/Sour/Corp.php index 8b7c8b2a..195416fb 100644 --- a/src/Parser/Head/Sour/Corp.php +++ b/src/Parser/Head/Sour/Corp.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Head\Sour; +namespace Gedcom\Parser\Head\Sour; class Corp extends \Gedcom\Parser\Component { diff --git a/src/Parser/Head/Sour/Data.php b/src/Parser/Head/Sour/Data.php index 9533efbc..f9a84f26 100644 --- a/src/Parser/Head/Sour/Data.php +++ b/src/Parser/Head/Sour/Data.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Head\Sour; +namespace Gedcom\Parser\Head\Sour; class Data extends \Gedcom\Parser\Component { diff --git a/src/Parser/Indi.php b/src/Parser/Indi.php index f5a235bd..6f72cf78 100644 --- a/src/Parser/Indi.php +++ b/src/Parser/Indi.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; class Indi extends \Gedcom\Parser\Component { diff --git a/src/Parser/Indi/Adop.php b/src/Parser/Indi/Adop.php index 6e7fbe5b..81b5a775 100644 --- a/src/Parser/Indi/Adop.php +++ b/src/Parser/Indi/Adop.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Adop extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Asso.php b/src/Parser/Indi/Asso.php index ae7ce6dd..4a4d2f64 100644 --- a/src/Parser/Indi/Asso.php +++ b/src/Parser/Indi/Asso.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Asso extends \Gedcom\Parser\Component { diff --git a/src/Parser/Indi/Attr.php b/src/Parser/Indi/Attr.php index a4ad1cbd..6240f35d 100644 --- a/src/Parser/Indi/Attr.php +++ b/src/Parser/Indi/Attr.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; abstract class Attr extends \Gedcom\Parser\Component { diff --git a/src/Parser/Indi/Bapl.php b/src/Parser/Indi/Bapl.php index c04eb9ea..90cf2e3f 100644 --- a/src/Parser/Indi/Bapl.php +++ b/src/Parser/Indi/Bapl.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Bapl extends Lds { diff --git a/src/Parser/Indi/Bapm.php b/src/Parser/Indi/Bapm.php index 6cff1028..1f6cd5b6 100644 --- a/src/Parser/Indi/Bapm.php +++ b/src/Parser/Indi/Bapm.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Bapm extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Barm.php b/src/Parser/Indi/Barm.php index 306cb094..7ba1a0e0 100644 --- a/src/Parser/Indi/Barm.php +++ b/src/Parser/Indi/Barm.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Barm extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Basm.php b/src/Parser/Indi/Basm.php index f5f81878..f741fe32 100644 --- a/src/Parser/Indi/Basm.php +++ b/src/Parser/Indi/Basm.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Basm extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Birt.php b/src/Parser/Indi/Birt.php index cca7c707..06a04483 100644 --- a/src/Parser/Indi/Birt.php +++ b/src/Parser/Indi/Birt.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Birt extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Bles.php b/src/Parser/Indi/Bles.php index b151cf1b..ab8a3d5e 100644 --- a/src/Parser/Indi/Bles.php +++ b/src/Parser/Indi/Bles.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Bles extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Buri.php b/src/Parser/Indi/Buri.php index 95f4f70d..a2b67218 100644 --- a/src/Parser/Indi/Buri.php +++ b/src/Parser/Indi/Buri.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Buri extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Cast.php b/src/Parser/Indi/Cast.php index 6fd2ea75..67601506 100644 --- a/src/Parser/Indi/Cast.php +++ b/src/Parser/Indi/Cast.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Cast extends \Gedcom\Parser\Indi\Attr { diff --git a/src/Parser/Indi/Cens.php b/src/Parser/Indi/Cens.php index 316a9026..22c16b8e 100644 --- a/src/Parser/Indi/Cens.php +++ b/src/Parser/Indi/Cens.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Cens extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Chr.php b/src/Parser/Indi/Chr.php index d8bd77c1..c71bc8fd 100644 --- a/src/Parser/Indi/Chr.php +++ b/src/Parser/Indi/Chr.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Chr extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Chra.php b/src/Parser/Indi/Chra.php index b8d1dd59..9c0ac676 100644 --- a/src/Parser/Indi/Chra.php +++ b/src/Parser/Indi/Chra.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Chra extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Conf.php b/src/Parser/Indi/Conf.php index fcee0832..1a14cdd4 100644 --- a/src/Parser/Indi/Conf.php +++ b/src/Parser/Indi/Conf.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Conf extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Conl.php b/src/Parser/Indi/Conl.php index 71344d85..0a770c5c 100644 --- a/src/Parser/Indi/Conl.php +++ b/src/Parser/Indi/Conl.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Conl extends Lds { diff --git a/src/Parser/Indi/Crem.php b/src/Parser/Indi/Crem.php index 57de64eb..21cdfb25 100644 --- a/src/Parser/Indi/Crem.php +++ b/src/Parser/Indi/Crem.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Crem extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Deat.php b/src/Parser/Indi/Deat.php index bb2c8244..bbd9da2a 100644 --- a/src/Parser/Indi/Deat.php +++ b/src/Parser/Indi/Deat.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Deat extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Dscr.php b/src/Parser/Indi/Dscr.php index 6a1d4859..13992f22 100644 --- a/src/Parser/Indi/Dscr.php +++ b/src/Parser/Indi/Dscr.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Dscr extends \Gedcom\Parser\Indi\Attr { diff --git a/src/Parser/Indi/Educ.php b/src/Parser/Indi/Educ.php index 22dbe7f3..24d2360e 100644 --- a/src/Parser/Indi/Educ.php +++ b/src/Parser/Indi/Educ.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Educ extends \Gedcom\Parser\Indi\Attr { diff --git a/src/Parser/Indi/Emig.php b/src/Parser/Indi/Emig.php index e284b707..df56f001 100644 --- a/src/Parser/Indi/Emig.php +++ b/src/Parser/Indi/Emig.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Emig extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Endl.php b/src/Parser/Indi/Endl.php index f0a11c42..bc0552a7 100644 --- a/src/Parser/Indi/Endl.php +++ b/src/Parser/Indi/Endl.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Endl extends Lds { diff --git a/src/Parser/Indi/Even.php b/src/Parser/Indi/Even.php index a6e7a484..cb12a6cd 100644 --- a/src/Parser/Indi/Even.php +++ b/src/Parser/Indi/Even.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; use Parser\Chan; diff --git a/src/Parser/Indi/Even/Plac.php b/src/Parser/Indi/Even/Plac.php index c2b6a8cd..15b56a2e 100644 --- a/src/Parser/Indi/Even/Plac.php +++ b/src/Parser/Indi/Even/Plac.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi\Even; +namespace Gedcom\Parser\Indi\Even; class Plac extends \Gedcom\Parser\Component { diff --git a/src/Parser/Indi/Famc.php b/src/Parser/Indi/Famc.php index 67ca389c..26800650 100644 --- a/src/Parser/Indi/Famc.php +++ b/src/Parser/Indi/Famc.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Famc extends \Gedcom\Parser\Component { diff --git a/src/Parser/Indi/Fams.php b/src/Parser/Indi/Fams.php index 39527d6e..4d791eec 100644 --- a/src/Parser/Indi/Fams.php +++ b/src/Parser/Indi/Fams.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Fams extends \Gedcom\Parser\Component { diff --git a/src/Parser/Indi/Fcom.php b/src/Parser/Indi/Fcom.php index ed10d3b6..7382330a 100644 --- a/src/Parser/Indi/Fcom.php +++ b/src/Parser/Indi/Fcom.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Fcom extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Grad.php b/src/Parser/Indi/Grad.php index 08f8cc7b..481a4cc3 100644 --- a/src/Parser/Indi/Grad.php +++ b/src/Parser/Indi/Grad.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Grad extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Idno.php b/src/Parser/Indi/Idno.php index 1e1e8b7a..9337f19c 100644 --- a/src/Parser/Indi/Idno.php +++ b/src/Parser/Indi/Idno.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Idno extends \Gedcom\Parser\Indi\Attr { diff --git a/src/Parser/Indi/Immi.php b/src/Parser/Indi/Immi.php index 42d50272..69e05fbc 100644 --- a/src/Parser/Indi/Immi.php +++ b/src/Parser/Indi/Immi.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Immi extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Lds.php b/src/Parser/Indi/Lds.php index c4013b49..325efc72 100644 --- a/src/Parser/Indi/Lds.php +++ b/src/Parser/Indi/Lds.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; abstract class Lds extends \Gedcom\Parser\Component { diff --git a/src/Parser/Indi/Name.php b/src/Parser/Indi/Name.php index b3c9a707..de778861 100644 --- a/src/Parser/Indi/Name.php +++ b/src/Parser/Indi/Name.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Name extends \Gedcom\Parser\Component { diff --git a/src/Parser/Indi/Name/Fone.php b/src/Parser/Indi/Name/Fone.php index dc8f24d0..c5be7157 100644 --- a/src/Parser/Indi/Name/Fone.php +++ b/src/Parser/Indi/Name/Fone.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi\Name; +namespace Gedcom\Parser\Indi\Name; class Fone extends \Gedcom\Parser\Component { diff --git a/src/Parser/Indi/Name/Romn.php b/src/Parser/Indi/Name/Romn.php index dd45a4f1..828d4e40 100644 --- a/src/Parser/Indi/Name/Romn.php +++ b/src/Parser/Indi/Name/Romn.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi\Name; +namespace Gedcom\Parser\Indi\Name; class Romn extends \Gedcom\Parser\Component { diff --git a/src/Parser/Indi/Nati.php b/src/Parser/Indi/Nati.php index efa034ec..6454232d 100644 --- a/src/Parser/Indi/Nati.php +++ b/src/Parser/Indi/Nati.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Nati extends \Gedcom\Parser\Indi\Attr { diff --git a/src/Parser/Indi/Natu.php b/src/Parser/Indi/Natu.php index bb08eff3..8f2ef838 100644 --- a/src/Parser/Indi/Natu.php +++ b/src/Parser/Indi/Natu.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Natu extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Nchi.php b/src/Parser/Indi/Nchi.php index 7eee6459..67b5c7cd 100644 --- a/src/Parser/Indi/Nchi.php +++ b/src/Parser/Indi/Nchi.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Nchi extends \Gedcom\Parser\Indi\Attr { diff --git a/src/Parser/Indi/Nmr.php b/src/Parser/Indi/Nmr.php index 11902200..302c4e85 100644 --- a/src/Parser/Indi/Nmr.php +++ b/src/Parser/Indi/Nmr.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Nmr extends \Gedcom\Parser\Indi\Attr { diff --git a/src/Parser/Indi/Occu.php b/src/Parser/Indi/Occu.php index 0591b8c9..9398d458 100644 --- a/src/Parser/Indi/Occu.php +++ b/src/Parser/Indi/Occu.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Occu extends \Gedcom\Parser\Indi\Attr { diff --git a/src/Parser/Indi/Ordn.php b/src/Parser/Indi/Ordn.php index 95f693f1..08f5d25f 100644 --- a/src/Parser/Indi/Ordn.php +++ b/src/Parser/Indi/Ordn.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Ordn extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Prob.php b/src/Parser/Indi/Prob.php index 9b35cee6..4e6c11cb 100644 --- a/src/Parser/Indi/Prob.php +++ b/src/Parser/Indi/Prob.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Prob extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Prop.php b/src/Parser/Indi/Prop.php index 685ebc4c..d20201d4 100644 --- a/src/Parser/Indi/Prop.php +++ b/src/Parser/Indi/Prop.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Prop extends \Gedcom\Parser\Indi\Attr { diff --git a/src/Parser/Indi/Reli.php b/src/Parser/Indi/Reli.php index 2532f50e..1ca4b9f8 100644 --- a/src/Parser/Indi/Reli.php +++ b/src/Parser/Indi/Reli.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Reli extends \Gedcom\Parser\Indi\Attr { diff --git a/src/Parser/Indi/Resi.php b/src/Parser/Indi/Resi.php index d9cbaadf..a42b7682 100644 --- a/src/Parser/Indi/Resi.php +++ b/src/Parser/Indi/Resi.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Resi extends \Gedcom\Parser\Indi\Attr { diff --git a/src/Parser/Indi/Reti.php b/src/Parser/Indi/Reti.php index f997e1cf..48b27e42 100644 --- a/src/Parser/Indi/Reti.php +++ b/src/Parser/Indi/Reti.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Reti extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Indi/Slgc.php b/src/Parser/Indi/Slgc.php index be8cf524..b358d341 100644 --- a/src/Parser/Indi/Slgc.php +++ b/src/Parser/Indi/Slgc.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Slgc extends Lds { diff --git a/src/Parser/Indi/Ssn.php b/src/Parser/Indi/Ssn.php index 334ad46e..0be0589f 100644 --- a/src/Parser/Indi/Ssn.php +++ b/src/Parser/Indi/Ssn.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Ssn extends \Gedcom\Parser\Indi\Attr { diff --git a/src/Parser/Indi/Titl.php b/src/Parser/Indi/Titl.php index 47e078cc..0a95d476 100644 --- a/src/Parser/Indi/Titl.php +++ b/src/Parser/Indi/Titl.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Titl extends \Gedcom\Parser\Indi\Attr { diff --git a/src/Parser/Indi/Will.php b/src/Parser/Indi/Will.php index e19447e3..337d6f81 100644 --- a/src/Parser/Indi/Will.php +++ b/src/Parser/Indi/Will.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Indi; +namespace Gedcom\Parser\Indi; class Will extends \Gedcom\Parser\Indi\Even { diff --git a/src/Parser/Note.php b/src/Parser/Note.php index e210e69b..eecfd92f 100644 --- a/src/Parser/Note.php +++ b/src/Parser/Note.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; class Note extends \Gedcom\Parser\Component { diff --git a/src/Parser/NoteRef.php b/src/Parser/NoteRef.php index 16454d28..40dc9e95 100644 --- a/src/Parser/NoteRef.php +++ b/src/Parser/NoteRef.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; class NoteRef extends \Gedcom\Parser\Component { diff --git a/src/Parser/Obje.php b/src/Parser/Obje.php index ba5d5919..09a2bd0b 100644 --- a/src/Parser/Obje.php +++ b/src/Parser/Obje.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; class Obje extends \Gedcom\Parser\Component { diff --git a/src/Parser/ObjeRef.php b/src/Parser/ObjeRef.php index d1715ba4..368ebee7 100644 --- a/src/Parser/ObjeRef.php +++ b/src/Parser/ObjeRef.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; class ObjeRef extends \Gedcom\Parser\Component { diff --git a/src/Parser/ObjeRef/File.php b/src/Parser/ObjeRef/File.php index 004175d5..1c62dfd0 100644 --- a/src/Parser/ObjeRef/File.php +++ b/src/Parser/ObjeRef/File.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\ObjeRef; +namespace Gedcom\Parser\ObjeRef; class File extends \Gedcom\Parser\Component { diff --git a/src/Parser/ObjeRef/File/Form.php b/src/Parser/ObjeRef/File/Form.php index fdebfcfa..9ece6278 100644 --- a/src/Parser/ObjeRef/File/Form.php +++ b/src/Parser/ObjeRef/File/Form.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\ObjeRef\File; +namespace Gedcom\Parser\ObjeRef\File; class Form extends \Gedcom\Parser\Component { diff --git a/src/Parser/Phon.php b/src/Parser/Phon.php index dc2c9641..22e783ca 100644 --- a/src/Parser/Phon.php +++ b/src/Parser/Phon.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; class Phon extends \Gedcom\Parser\Component { diff --git a/src/Parser/Plac.php b/src/Parser/Plac.php index 0d6e2088..54de836f 100644 --- a/src/Parser/Plac.php +++ b/src/Parser/Plac.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; class Plac extends \Gedcom\Parser\Component { diff --git a/src/Parser/Plac/Fone.php b/src/Parser/Plac/Fone.php index a943ffc3..2fa8564a 100644 --- a/src/Parser/Plac/Fone.php +++ b/src/Parser/Plac/Fone.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Plac; +namespace Gedcom\Parser\Plac; class Fone extends \Gedcom\Parser\Component { diff --git a/src/Parser/Plac/Map.php b/src/Parser/Plac/Map.php index 36994ce9..c6701f71 100644 --- a/src/Parser/Plac/Map.php +++ b/src/Parser/Plac/Map.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Plac; +namespace Gedcom\Parser\Plac; class Map extends \Gedcom\Parser\Component { diff --git a/src/Parser/Plac/Romn.php b/src/Parser/Plac/Romn.php index 5a4d597f..07cf8c0e 100644 --- a/src/Parser/Plac/Romn.php +++ b/src/Parser/Plac/Romn.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Plac; +namespace Gedcom\Parser\Plac; class Romn extends \Gedcom\Parser\Component { diff --git a/src/Parser/Refn.php b/src/Parser/Refn.php index 85fbb5ef..2f342821 100644 --- a/src/Parser/Refn.php +++ b/src/Parser/Refn.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; class Refn extends \Gedcom\Parser\Component { diff --git a/src/Parser/Repo.php b/src/Parser/Repo.php index 904f45a0..5c4f7b1e 100644 --- a/src/Parser/Repo.php +++ b/src/Parser/Repo.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; class Repo extends \Gedcom\Parser\Component { diff --git a/src/Parser/RepoRef.php b/src/Parser/RepoRef.php index fd235615..86471f49 100644 --- a/src/Parser/RepoRef.php +++ b/src/Parser/RepoRef.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; class RepoRef extends \Gedcom\Parser\Component { diff --git a/src/Parser/Sour.php b/src/Parser/Sour.php index fabb91d7..87ad2a6d 100644 --- a/src/Parser/Sour.php +++ b/src/Parser/Sour.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; class Sour extends \Gedcom\Parser\Component { diff --git a/src/Parser/Sour/Data.php b/src/Parser/Sour/Data.php index ffa828ec..02c896df 100644 --- a/src/Parser/Sour/Data.php +++ b/src/Parser/Sour/Data.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Sour; +namespace Gedcom\Parser\Sour; class Data extends \Gedcom\Parser\Component { diff --git a/src/Parser/Sour/Data/Even.php b/src/Parser/Sour/Data/Even.php index 8579f48b..1625bca9 100644 --- a/src/Parser/Sour/Data/Even.php +++ b/src/Parser/Sour/Data/Even.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Sour\Data; +namespace Gedcom\Parser\Sour\Data; class Even extends \Gedcom\Parser\Component { diff --git a/src/Parser/Sour/Repo.php b/src/Parser/Sour/Repo.php index 3c73c43f..77be46fb 100644 --- a/src/Parser/Sour/Repo.php +++ b/src/Parser/Sour/Repo.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Sour; +namespace Gedcom\Parser\Sour; class Repo extends \Gedcom\Parser\Component { diff --git a/src/Parser/Sour/Repo/Caln.php b/src/Parser/Sour/Repo/Caln.php index 3a03791f..de066274 100644 --- a/src/Parser/Sour/Repo/Caln.php +++ b/src/Parser/Sour/Repo/Caln.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\Sour\Repo; +namespace Gedcom\Parser\Sour\Repo; class Caln extends \Gedcom\Parser\Component { diff --git a/src/Parser/SourRef.php b/src/Parser/SourRef.php index 0556f7e0..156bed23 100644 --- a/src/Parser/SourRef.php +++ b/src/Parser/SourRef.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; class SourRef extends \Gedcom\Parser\Component { diff --git a/src/Parser/SourRef/Data.php b/src/Parser/SourRef/Data.php index 481a18c8..cb9023ce 100644 --- a/src/Parser/SourRef/Data.php +++ b/src/Parser/SourRef/Data.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\SourRef; +namespace Gedcom\Parser\SourRef; class Data extends \Gedcom\Parser\Component { diff --git a/src/Parser/SourRef/Even.php b/src/Parser/SourRef/Even.php index b2d0c59d..800a13ef 100644 --- a/src/Parser/SourRef/Even.php +++ b/src/Parser/SourRef/Even.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser\SourRef; +namespace Gedcom\Parser\SourRef; class Even extends \Gedcom\Parser\Component { diff --git a/src/Parser/Subm.php b/src/Parser/Subm.php index 8aed312e..62b48204 100644 --- a/src/Parser/Subm.php +++ b/src/Parser/Subm.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; class Subm extends \Gedcom\Parser\Component { diff --git a/src/Parser/Subn.php b/src/Parser/Subn.php index a90b8ef7..b6bf6495 100644 --- a/src/Parser/Subn.php +++ b/src/Parser/Subn.php @@ -12,7 +12,7 @@ * @link http://github.com/mrkrstphr/php-gedcom */ -namespaceGedcom\Parser; +namespace Gedcom\Parser; class Subn extends \Gedcom\Parser\Component { From 1407645634ac886dc393ecadd6df4085d25045dc Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sat, 17 Jul 2021 22:34:29 +0100 Subject: [PATCH 70/99] Update PSR4. --- src/Parser.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Parser.php b/src/Parser.php index 57f9ed85..a754e166 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -240,23 +240,23 @@ public function parse($fileName) } if (isset($record[1]) && trim($record[1]) == 'HEAD') { - \Gedcom\Parser\Head::parse($this); + Gedcom\Parser\Head::parse($this); } elseif (isset($record[2]) && trim($record[2]) == 'SUBN') { - \Gedcom\Parser\Subn::parse($this); + Gedcom\Parser\Subn::parse($this); } elseif (isset($record[2]) && trim($record[2]) == 'SUBM') { - \Gedcom\Parser\Subm::parse($this); + Gedcom\Parser\Subm::parse($this); } elseif (isset($record[2]) && $record[2] == 'SOUR') { - \Gedcom\Parser\Sour::parse($this); + Gedcom\Parser\Sour::parse($this); } elseif (isset($record[2]) && $record[2] == 'INDI') { - \Gedcom\Parser\Indi::parse($this); + Gedcom\Parser\Indi::parse($this); } elseif (isset($record[2]) && $record[2] == 'FAM') { - \Gedcom\Parser\Fam::parse($this); + Gedcom\Parser\Fam::parse($this); } elseif (isset($record[2]) && substr(trim($record[2]), 0, 4) == 'NOTE') { - \Gedcom\Parser\Note::parse($this); + Gedcom\Parser\Note::parse($this); } elseif (isset($record[2]) && $record[2] == 'REPO') { - \Gedcom\Parser\Repo::parse($this); + Gedcom\Parser\Repo::parse($this); } elseif (isset($record[2]) && $record[2] == 'OBJE') { - \Gedcom\Parser\Obje::parse($this); + Gedcom\Parser\Obje::parse($this); } elseif (isset($record[1]) && trim($record[1]) == 'TRLR') { // EOF break; From 8c9394858073391b88b05a7f8f858f19e10ae684 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sat, 17 Jul 2021 22:37:28 +0100 Subject: [PATCH 71/99] Update PSR4. --- src/Parser.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Parser.php b/src/Parser.php index a754e166..b940cab1 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -240,23 +240,23 @@ public function parse($fileName) } if (isset($record[1]) && trim($record[1]) == 'HEAD') { - Gedcom\Parser\Head::parse($this); + Parser\Head::parse($this); } elseif (isset($record[2]) && trim($record[2]) == 'SUBN') { - Gedcom\Parser\Subn::parse($this); + Parser\Subn::parse($this); } elseif (isset($record[2]) && trim($record[2]) == 'SUBM') { - Gedcom\Parser\Subm::parse($this); + Parser\Subm::parse($this); } elseif (isset($record[2]) && $record[2] == 'SOUR') { - Gedcom\Parser\Sour::parse($this); + Parser\Sour::parse($this); } elseif (isset($record[2]) && $record[2] == 'INDI') { - Gedcom\Parser\Indi::parse($this); + Parser\Indi::parse($this); } elseif (isset($record[2]) && $record[2] == 'FAM') { - Gedcom\Parser\Fam::parse($this); + Parser\Fam::parse($this); } elseif (isset($record[2]) && substr(trim($record[2]), 0, 4) == 'NOTE') { - Gedcom\Parser\Note::parse($this); + Parser\Note::parse($this); } elseif (isset($record[2]) && $record[2] == 'REPO') { - Gedcom\Parser\Repo::parse($this); + Parser\Repo::parse($this); } elseif (isset($record[2]) && $record[2] == 'OBJE') { - Gedcom\Parser\Obje::parse($this); + Parser\Obje::parse($this); } elseif (isset($record[1]) && trim($record[1]) == 'TRLR') { // EOF break; From c022675e65713ff7342daf9f5cd7fb4db4df0711 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sat, 17 Jul 2021 22:57:10 +0100 Subject: [PATCH 72/99] Update PSR4. --- src/Parser/Addr.php | 4 ++-- src/Parser/Caln.php | 4 ++-- src/Parser/Chan.php | 4 ++-- src/Parser/Component.php | 2 +- src/Parser/Date.php | 4 ++-- src/Parser/Fam.php | 4 ++-- src/Parser/Fam/Even.php | 4 ++-- src/Parser/Fam/Even/Husb.php | 4 ++-- src/Parser/Fam/Even/Wife.php | 4 ++-- src/Parser/Fam/Slgs.php | 4 ++-- src/Parser/Fam/Slgs/Stat.php | 4 ++-- src/Parser/Head.php | 6 +++--- src/Parser/Head/Char.php | 4 ++-- src/Parser/Head/Date.php | 4 ++-- src/Parser/Head/Gedc.php | 4 ++-- src/Parser/Head/Plac.php | 4 ++-- src/Parser/Head/Sour.php | 4 ++-- src/Parser/Head/Sour/Corp.php | 4 ++-- src/Parser/Head/Sour/Data.php | 4 ++-- src/Parser/Indi.php | 4 ++-- src/Parser/Indi/Asso.php | 4 ++-- src/Parser/Indi/Attr.php | 2 +- src/Parser/Indi/Even.php | 6 +++--- src/Parser/Indi/Even/Plac.php | 4 ++-- src/Parser/Indi/Famc.php | 4 ++-- src/Parser/Indi/Fams.php | 4 ++-- src/Parser/Indi/Lds.php | 2 +- src/Parser/Indi/Name.php | 4 ++-- src/Parser/Indi/Name/Fone.php | 4 ++-- src/Parser/Indi/Name/Romn.php | 4 ++-- src/Parser/Note.php | 4 ++-- src/Parser/NoteRef.php | 4 ++-- src/Parser/Obje.php | 4 ++-- src/Parser/ObjeRef.php | 4 ++-- src/Parser/ObjeRef/File.php | 4 ++-- src/Parser/ObjeRef/File/Form.php | 4 ++-- src/Parser/Phon.php | 4 ++-- src/Parser/Plac.php | 4 ++-- src/Parser/Plac/Fone.php | 4 ++-- src/Parser/Plac/Map.php | 4 ++-- src/Parser/Plac/Romn.php | 4 ++-- src/Parser/Refn.php | 4 ++-- src/Parser/Repo.php | 4 ++-- src/Parser/RepoRef.php | 4 ++-- src/Parser/Sour.php | 4 ++-- src/Parser/Sour/Data.php | 4 ++-- src/Parser/Sour/Data/Even.php | 4 ++-- src/Parser/Sour/Repo.php | 4 ++-- src/Parser/Sour/Repo/Caln.php | 4 ++-- src/Parser/SourRef.php | 4 ++-- src/Parser/SourRef/Data.php | 4 ++-- src/Parser/SourRef/Even.php | 4 ++-- src/Parser/Subm.php | 4 ++-- src/Parser/Subn.php | 4 ++-- src/Record/Fam/Anul.php | 2 +- src/Record/Fam/Cens.php | 2 +- src/Record/Fam/Div.php | 2 +- src/Record/Fam/Enga.php | 2 +- src/Record/Fam/Even.php | 6 +++--- src/Record/Fam/Marb.php | 2 +- src/Record/Fam/Marc.php | 2 +- src/Record/Fam/Marl.php | 2 +- src/Record/Fam/Marr.php | 2 +- src/Record/Fam/Mars.php | 2 +- src/Record/Fam/Slgs.php | 4 ++-- src/Record/Indi/Adop.php | 2 +- src/Record/Indi/Asso.php | 4 ++-- src/Record/Indi/Attr.php | 8 ++++---- src/Record/Indi/Bapm.php | 2 +- src/Record/Indi/Barm.php | 2 +- src/Record/Indi/Basm.php | 2 +- src/Record/Indi/Bles.php | 2 +- src/Record/Indi/Buri.php | 2 +- src/Record/Indi/Cast.php | 2 +- src/Record/Indi/Cens.php | 2 +- src/Record/Indi/Chr.php | 2 +- src/Record/Indi/Chra.php | 2 +- src/Record/Indi/Conf.php | 2 +- src/Record/Indi/Crem.php | 2 +- src/Record/Indi/Deat.php | 2 +- src/Record/Indi/Dscr.php | 2 +- src/Record/Indi/Educ.php | 2 +- src/Record/Indi/Emig.php | 2 +- src/Record/Indi/Famc.php | 2 +- src/Record/Indi/Fams.php | 2 +- src/Record/Indi/Fcom.php | 2 +- src/Record/Indi/Grad.php | 2 +- src/Record/Indi/Idno.php | 2 +- src/Record/Indi/Immi.php | 2 +- src/Record/Indi/Lds.php | 4 ++-- src/Record/Indi/Nati.php | 2 +- src/Record/Indi/Natu.php | 2 +- src/Record/Indi/Nchi.php | 2 +- src/Record/Indi/Nmr.php | 2 +- src/Record/Indi/Note.php | 2 +- src/Record/Indi/Occu.php | 2 +- src/Record/Indi/Ordn.php | 2 +- src/Record/Indi/Prob.php | 2 +- src/Record/Indi/Prop.php | 2 +- src/Record/Indi/Reli.php | 2 +- src/Record/Indi/Resi.php | 2 +- src/Record/Indi/Reti.php | 2 +- src/Record/Indi/Ssn.php | 2 +- src/Record/Indi/Titl.php | 2 +- src/Record/Indi/Will.php | 2 +- src/Record/Repo.php | 10 +++++----- src/Record/Sour/Data.php | 2 +- src/Record/Sour/Repo.php | 2 +- 108 files changed, 173 insertions(+), 173 deletions(-) diff --git a/src/Parser/Addr.php b/src/Parser/Addr.php index cdf3071a..2d86ab43 100644 --- a/src/Parser/Addr.php +++ b/src/Parser/Addr.php @@ -16,13 +16,13 @@ class Addr extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; $line = isset($record[2]) ? trim($record[2]) : ''; - $addr = new \Record\Addr(); + $addr = new \Gedcom\Record\Addr(); $addr->setAddr($line); $parser->forward(); diff --git a/src/Parser/Caln.php b/src/Parser/Caln.php index 86666713..c35491f6 100644 --- a/src/Parser/Caln.php +++ b/src/Parser/Caln.php @@ -16,7 +16,7 @@ class Caln extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -28,7 +28,7 @@ public static function parse(Gedcom\Parser $parser) return null; } - $caln = new \Record\Caln(); + $caln = new \Gedcom\Record\Caln(); $caln->setCaln($identifier); $parser->forward(); diff --git a/src/Parser/Chan.php b/src/Parser/Chan.php index c320572b..42fb0a2d 100644 --- a/src/Parser/Chan.php +++ b/src/Parser/Chan.php @@ -16,14 +16,14 @@ class Chan extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; $parser->forward(); - $chan = new \Record\Chan(); + $chan = new \Gedcom\Record\Chan(); while (!$parser->eof()) { $record = $parser->getCurrentLineRecord(); diff --git a/src/Parser/Component.php b/src/Parser/Component.php index f22d70ba..3660e82d 100644 --- a/src/Parser/Component.php +++ b/src/Parser/Component.php @@ -16,7 +16,7 @@ abstract class Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { } } diff --git a/src/Parser/Date.php b/src/Parser/Date.php index d917ebfa..652e125b 100644 --- a/src/Parser/Date.php +++ b/src/Parser/Date.php @@ -16,12 +16,12 @@ class Date extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[1])) { - $dat = new \Record\Date(); + $dat = new \Gedcom\Record\Date(); if (!empty($record[2])) { $dat->setDate($record[2]); } diff --git a/src/Parser/Fam.php b/src/Parser/Fam.php index 449f22d3..9d1ee17f 100644 --- a/src/Parser/Fam.php +++ b/src/Parser/Fam.php @@ -29,7 +29,7 @@ class Fam extends \Gedcom\Parser\Component 'MARS', ]; - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -41,7 +41,7 @@ public static function parse(Gedcom\Parser $parser) return null; } - $fam = new \Record\Fam(); + $fam = new \Gedcom\Record\Fam(); $fam->setId($identifier); $parser->getGedcom()->addFam($fam); diff --git a/src/Parser/Fam/Even.php b/src/Parser/Fam/Even.php index 9a6b414c..7e2ba5a4 100644 --- a/src/Parser/Fam/Even.php +++ b/src/Parser/Fam/Even.php @@ -16,12 +16,12 @@ class Even extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; - $even = new \Record\Fam\Even(); + $even = new \Gedcom\Record\Fam\Even(); if (isset($record[1]) && strtoupper(trim($record[1])) != 'EVEN') { $even->setType(trim($record[1])); diff --git a/src/Parser/Fam/Even/Husb.php b/src/Parser/Fam/Even/Husb.php index 5df32c62..802ec307 100644 --- a/src/Parser/Fam/Even/Husb.php +++ b/src/Parser/Fam/Even/Husb.php @@ -16,12 +16,12 @@ class Husb extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; - $husband = new \Record\Fam\Even\Husb(); + $husband = new \Gedcom\Record\Fam\Even\Husb(); $parser->forward(); diff --git a/src/Parser/Fam/Even/Wife.php b/src/Parser/Fam/Even/Wife.php index 65fe4af1..46d9285c 100644 --- a/src/Parser/Fam/Even/Wife.php +++ b/src/Parser/Fam/Even/Wife.php @@ -16,12 +16,12 @@ class Wife extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; - $wife = new \Record\Fam\Even\Wife(); + $wife = new \Gedcom\Record\Fam\Even\Wife(); $parser->forward(); diff --git a/src/Parser/Fam/Slgs.php b/src/Parser/Fam/Slgs.php index 408a52c2..a47e4f41 100644 --- a/src/Parser/Fam/Slgs.php +++ b/src/Parser/Fam/Slgs.php @@ -16,12 +16,12 @@ class Slgs extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; - $slgs = new \Record\Fam\Slgs(); + $slgs = new \Gedcom\Record\Fam\Slgs(); $parser->forward(); diff --git a/src/Parser/Fam/Slgs/Stat.php b/src/Parser/Fam/Slgs/Stat.php index 15d3b8f9..9afbeac5 100644 --- a/src/Parser/Fam/Slgs/Stat.php +++ b/src/Parser/Fam/Slgs/Stat.php @@ -16,7 +16,7 @@ class Stat extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -28,7 +28,7 @@ public static function parse(Gedcom\Parser $parser) return null; } - $stat = new \Record\Fam\Slgs\Stat(); + $stat = new \Gedcom\Record\Fam\Slgs\Stat(); $stat->setStat($_stat); $parser->forward(); diff --git a/src/Parser/Head.php b/src/Parser/Head.php index 30b548c8..0f62e61a 100644 --- a/src/Parser/Head.php +++ b/src/Parser/Head.php @@ -17,11 +17,11 @@ class Head extends \Gedcom\Parser\Component { /** - * @param Gedcom\Parser $parser + * @param \Gedcom\Parser $parser * * @return \Record\Head */ - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -33,7 +33,7 @@ public static function parse(Gedcom\Parser $parser) return null; } - $head = new \Record\Head(); + $head = new \Gedcom\Record\Head(); $parser->getGedcom()->setHead($head); diff --git a/src/Parser/Head/Char.php b/src/Parser/Head/Char.php index 95c21c58..5c2b62d1 100644 --- a/src/Parser/Head/Char.php +++ b/src/Parser/Head/Char.php @@ -16,12 +16,12 @@ class Char extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[2])) { - $char = new \Record\Head\Char(); + $char = new \Gedcom\Record\Head\Char(); $char->setChar(trim($record[2])); } else { $parser->skipToNextLevel($depth); diff --git a/src/Parser/Head/Date.php b/src/Parser/Head/Date.php index c71a72db..b07ac049 100644 --- a/src/Parser/Head/Date.php +++ b/src/Parser/Head/Date.php @@ -16,12 +16,12 @@ class Date extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[2])) { - $date = new \Record\Head\Date(); + $date = new \Gedcom\Record\Head\Date(); $date->setDate(trim($record[2])); } else { $parser->skipToNextLevel($depth); diff --git a/src/Parser/Head/Gedc.php b/src/Parser/Head/Gedc.php index 04538e19..c3b27f6f 100644 --- a/src/Parser/Head/Gedc.php +++ b/src/Parser/Head/Gedc.php @@ -16,12 +16,12 @@ class Gedc extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; - $gedc = new \Record\Head\Gedc(); + $gedc = new \Gedcom\Record\Head\Gedc(); $parser->forward(); diff --git a/src/Parser/Head/Plac.php b/src/Parser/Head/Plac.php index b464acdc..dbf30eea 100644 --- a/src/Parser/Head/Plac.php +++ b/src/Parser/Head/Plac.php @@ -16,12 +16,12 @@ class Plac extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; - $plac = new \Record\Head\Plac(); + $plac = new \Gedcom\Record\Head\Plac(); $parser->forward(); diff --git a/src/Parser/Head/Sour.php b/src/Parser/Head/Sour.php index 767ecd94..b8f0c709 100644 --- a/src/Parser/Head/Sour.php +++ b/src/Parser/Head/Sour.php @@ -16,12 +16,12 @@ class Sour extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[2])) { - $source = new \Record\Head\Sour(); + $source = new \Gedcom\Record\Head\Sour(); $source->setSour(trim($record[2])); } else { $parser->skipToNextLevel($depth); diff --git a/src/Parser/Head/Sour/Corp.php b/src/Parser/Head/Sour/Corp.php index 195416fb..4442604e 100644 --- a/src/Parser/Head/Sour/Corp.php +++ b/src/Parser/Head/Sour/Corp.php @@ -16,12 +16,12 @@ class Corp extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[2])) { - $corp = new \Record\Head\Sour\Corp(); + $corp = new \Gedcom\Record\Head\Sour\Corp(); $corp->setCorp(trim($record[2])); } else { $parser->skipToNextLevel($depth); diff --git a/src/Parser/Head/Sour/Data.php b/src/Parser/Head/Sour/Data.php index f9a84f26..47bb9d03 100644 --- a/src/Parser/Head/Sour/Data.php +++ b/src/Parser/Head/Sour/Data.php @@ -16,12 +16,12 @@ class Data extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[2])) { - $data = new \Record\Head\Sour\Data(); + $data = new \Gedcom\Record\Head\Sour\Data(); $data->setData(trim($record[2])); } else { $parser->skipToNextLevel($depth); diff --git a/src/Parser/Indi.php b/src/Parser/Indi.php index 6f72cf78..54125531 100644 --- a/src/Parser/Indi.php +++ b/src/Parser/Indi.php @@ -16,7 +16,7 @@ class Indi extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -28,7 +28,7 @@ public static function parse(Gedcom\Parser $parser) return null; } - $indi = new \Record\Indi(); + $indi = new \Gedcom\Record\Indi(); $indi->setId($identifier); $parser->getGedcom()->addIndi($indi); diff --git a/src/Parser/Indi/Asso.php b/src/Parser/Indi/Asso.php index 4a4d2f64..26d02d60 100644 --- a/src/Parser/Indi/Asso.php +++ b/src/Parser/Indi/Asso.php @@ -16,12 +16,12 @@ class Asso extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[2])) { - $asso = new \Record\Indi\Asso(); + $asso = new \Gedcom\Record\Indi\Asso(); $asso->setIndi($parser->normalizeIdentifier($record[2])); } else { $parser->skipToNextLevel($depth); diff --git a/src/Parser/Indi/Attr.php b/src/Parser/Indi/Attr.php index 6240f35d..e1215014 100644 --- a/src/Parser/Indi/Attr.php +++ b/src/Parser/Indi/Attr.php @@ -16,7 +16,7 @@ abstract class Attr extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Indi/Even.php b/src/Parser/Indi/Even.php index cb12a6cd..638ffe82 100644 --- a/src/Parser/Indi/Even.php +++ b/src/Parser/Indi/Even.php @@ -14,11 +14,11 @@ namespace Gedcom\Parser\Indi; -use Parser\Chan; +use Gedcom\Parser\Chan; class Even extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -34,7 +34,7 @@ public static function parse(Gedcom\Parser $parser) $className = 'GedcomzRecordzIndiz'.ucfirst(strtolower(trim($record[1]))); $even = new $className(); } else { - $even = new \Record\Indi\Even(); + $even = new \Gedcom\Record\Indi\Even(); } if (isset($record[1]) && strtoupper(trim($record[1])) != 'EVEN') { diff --git a/src/Parser/Indi/Even/Plac.php b/src/Parser/Indi/Even/Plac.php index 15b56a2e..af002959 100644 --- a/src/Parser/Indi/Even/Plac.php +++ b/src/Parser/Indi/Even/Plac.php @@ -16,12 +16,12 @@ class Plac extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; - $plac = new \Record\Indi\Even\Plac(); + $plac = new \Gedcom\Record\Indi\Even\Plac(); if (isset($record[2])) { $plac->setPlac(trim($record[2])); diff --git a/src/Parser/Indi/Famc.php b/src/Parser/Indi/Famc.php index 26800650..8440e029 100644 --- a/src/Parser/Indi/Famc.php +++ b/src/Parser/Indi/Famc.php @@ -16,7 +16,7 @@ class Famc extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -30,7 +30,7 @@ public static function parse(Gedcom\Parser $parser) $famc = $parser->normalizeIdentifier($record[2]); - $fam = new \Record\Indi\Famc(); + $fam = new \Gedcom\Record\Indi\Famc(); $fam->setFamc($famc); $parser->forward(); diff --git a/src/Parser/Indi/Fams.php b/src/Parser/Indi/Fams.php index 4d791eec..01d11752 100644 --- a/src/Parser/Indi/Fams.php +++ b/src/Parser/Indi/Fams.php @@ -16,7 +16,7 @@ class Fams extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -30,7 +30,7 @@ public static function parse(Gedcom\Parser $parser) $fams = $parser->normalizeIdentifier($record[2]); - $fam = new \Record\Indi\Fams(); + $fam = new \Gedcom\Record\Indi\Fams(); $fam->setFams($fams); $parser->forward(); diff --git a/src/Parser/Indi/Lds.php b/src/Parser/Indi/Lds.php index 325efc72..bf682844 100644 --- a/src/Parser/Indi/Lds.php +++ b/src/Parser/Indi/Lds.php @@ -16,7 +16,7 @@ abstract class Lds extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/Indi/Name.php b/src/Parser/Indi/Name.php index de778861..61947a35 100644 --- a/src/Parser/Indi/Name.php +++ b/src/Parser/Indi/Name.php @@ -16,12 +16,12 @@ class Name extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[2])) { - $name = new \Record\Indi\Name(); + $name = new \Gedcom\Record\Indi\Name(); $name->setName(trim($record[2])); } else { $parser->skipToNextLevel($depth); diff --git a/src/Parser/Indi/Name/Fone.php b/src/Parser/Indi/Name/Fone.php index c5be7157..ab20e952 100644 --- a/src/Parser/Indi/Name/Fone.php +++ b/src/Parser/Indi/Name/Fone.php @@ -16,12 +16,12 @@ class Fone extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[2])) { - $fone = new \Record\Indi\Name\Fone(); + $fone = new \Gedcom\Record\Indi\Name\Fone(); $fone->setFone(trim($record[2])); } else { return null; diff --git a/src/Parser/Indi/Name/Romn.php b/src/Parser/Indi/Name/Romn.php index 828d4e40..d5a1b095 100644 --- a/src/Parser/Indi/Name/Romn.php +++ b/src/Parser/Indi/Name/Romn.php @@ -16,12 +16,12 @@ class Romn extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[2])) { - $romn = new \Record\Indi\Name\Romn(); + $romn = new \Gedcom\Record\Indi\Name\Romn(); $romn->setRomn(trim($record[2])); } else { $parser->skipToNextLevel($depth); diff --git a/src/Parser/Note.php b/src/Parser/Note.php index eecfd92f..47128567 100644 --- a/src/Parser/Note.php +++ b/src/Parser/Note.php @@ -16,7 +16,7 @@ class Note extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(4); $depth = (int) $record[0]; @@ -28,7 +28,7 @@ public static function parse(Gedcom\Parser $parser) return null; } - $note = new \Record\Note(); + $note = new \Gedcom\Record\Note(); $note->setId($identifier); if (isset($record[3])) { diff --git a/src/Parser/NoteRef.php b/src/Parser/NoteRef.php index 40dc9e95..389250fe 100644 --- a/src/Parser/NoteRef.php +++ b/src/Parser/NoteRef.php @@ -16,12 +16,12 @@ class NoteRef extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; - $note = new \Record\NoteRef(); + $note = new \Gedcom\Record\NoteRef(); if (count($record) < 3) { $parser->logSkippedRecord('Missing note information; '.get_class(), ' @ '.__LINE__); diff --git a/src/Parser/Obje.php b/src/Parser/Obje.php index 09a2bd0b..75d01c2a 100644 --- a/src/Parser/Obje.php +++ b/src/Parser/Obje.php @@ -16,7 +16,7 @@ class Obje extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -28,7 +28,7 @@ public static function parse(Gedcom\Parser $parser) return null; } - $obje = new \Record\Obje(); + $obje = new \Gedcom\Record\Obje(); $obje->setId($identifier); $parser->getGedcom()->addObje($obje); diff --git a/src/Parser/ObjeRef.php b/src/Parser/ObjeRef.php index 368ebee7..fcae92d1 100644 --- a/src/Parser/ObjeRef.php +++ b/src/Parser/ObjeRef.php @@ -16,12 +16,12 @@ class ObjeRef extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; - $obje = new \Record\ObjeRef(); + $obje = new \Gedcom\Record\ObjeRef(); if (isset($record[2])) { $obje->setIsReference(true); diff --git a/src/Parser/ObjeRef/File.php b/src/Parser/ObjeRef/File.php index 1c62dfd0..a22f4a82 100644 --- a/src/Parser/ObjeRef/File.php +++ b/src/Parser/ObjeRef/File.php @@ -16,9 +16,9 @@ class File extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { - $file = new \Record\ObjeRef\File(); + $file = new \Gedcom\Record\ObjeRef\File(); $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[2])) { diff --git a/src/Parser/ObjeRef/File/Form.php b/src/Parser/ObjeRef/File/Form.php index 9ece6278..f1fb8efb 100644 --- a/src/Parser/ObjeRef/File/Form.php +++ b/src/Parser/ObjeRef/File/Form.php @@ -16,9 +16,9 @@ class Form extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { - $form = new \Record\ObjeRef\File\Form(); + $form = new \Gedcom\Record\ObjeRef\File\Form(); $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[2])) { diff --git a/src/Parser/Phon.php b/src/Parser/Phon.php index 22e783ca..3b206586 100644 --- a/src/Parser/Phon.php +++ b/src/Parser/Phon.php @@ -16,12 +16,12 @@ class Phon extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[2])) { - $phone = new \Record\Phon(); + $phone = new \Gedcom\Record\Phon(); $phone->setPhon(trim($record[2])); } else { $parser->skipToNextLevel($depth); diff --git a/src/Parser/Plac.php b/src/Parser/Plac.php index 54de836f..2940ee36 100644 --- a/src/Parser/Plac.php +++ b/src/Parser/Plac.php @@ -16,7 +16,7 @@ class Plac extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -28,7 +28,7 @@ public static function parse(Gedcom\Parser $parser) return null; } - $plac = new \Record\Plac(); + $plac = new \Gedcom\Record\Plac(); $plac->setPlac($_plac); $parser->forward(); diff --git a/src/Parser/Plac/Fone.php b/src/Parser/Plac/Fone.php index 2fa8564a..639eb4f1 100644 --- a/src/Parser/Plac/Fone.php +++ b/src/Parser/Plac/Fone.php @@ -16,7 +16,7 @@ class Fone extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -28,7 +28,7 @@ public static function parse(Gedcom\Parser $parser) return null; } - $fone = new \Record\Plac\Fone(); + $fone = new \Gedcom\Record\Plac\Fone(); $fone->setPlac($_fone); $parser->forward(); diff --git a/src/Parser/Plac/Map.php b/src/Parser/Plac/Map.php index c6701f71..adf8df47 100644 --- a/src/Parser/Plac/Map.php +++ b/src/Parser/Plac/Map.php @@ -16,12 +16,12 @@ class Map extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; - $map = new \Record\Plac\Map(); + $map = new \Gedcom\Record\Plac\Map(); $parser->forward(); diff --git a/src/Parser/Plac/Romn.php b/src/Parser/Plac/Romn.php index 07cf8c0e..d29aeb69 100644 --- a/src/Parser/Plac/Romn.php +++ b/src/Parser/Plac/Romn.php @@ -16,7 +16,7 @@ class Romn extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -28,7 +28,7 @@ public static function parse(Gedcom\Parser $parser) return null; } - $romn = new \Record\Plac\Romn(); + $romn = new \Gedcom\Record\Plac\Romn(); $romn->setPlac($_romn); $parser->forward(); diff --git a/src/Parser/Refn.php b/src/Parser/Refn.php index 2f342821..b4894a8a 100644 --- a/src/Parser/Refn.php +++ b/src/Parser/Refn.php @@ -16,12 +16,12 @@ class Refn extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[2])) { - $refn = new \Record\Refn(); + $refn = new \Gedcom\Record\Refn(); $refn->setRefn(trim($record[2])); } else { $parser->skipToNextLevel($depth); diff --git a/src/Parser/Repo.php b/src/Parser/Repo.php index 5c4f7b1e..77eeadb4 100644 --- a/src/Parser/Repo.php +++ b/src/Parser/Repo.php @@ -16,7 +16,7 @@ class Repo extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -28,7 +28,7 @@ public static function parse(Gedcom\Parser $parser) return null; } - $repo = new \Record\Repo(); + $repo = new \Gedcom\Record\Repo(); $repo->setRepo($identifier); $parser->getGedcom()->addRepo($repo); diff --git a/src/Parser/RepoRef.php b/src/Parser/RepoRef.php index 86471f49..013edc9a 100644 --- a/src/Parser/RepoRef.php +++ b/src/Parser/RepoRef.php @@ -16,7 +16,7 @@ class RepoRef extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -28,7 +28,7 @@ public static function parse(Gedcom\Parser $parser) return null; } - $repo = new \Record\RepoRef(); + $repo = new \Gedcom\Record\RepoRef(); $repo->setRepo($identifier); $parser->forward(); diff --git a/src/Parser/Sour.php b/src/Parser/Sour.php index 87ad2a6d..728e7d56 100644 --- a/src/Parser/Sour.php +++ b/src/Parser/Sour.php @@ -16,7 +16,7 @@ class Sour extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -28,7 +28,7 @@ public static function parse(Gedcom\Parser $parser) return null; } - $sour = new \Record\Sour(); + $sour = new \Gedcom\Record\Sour(); $sour->setSour($identifier); $parser->getGedcom()->addSour($sour); diff --git a/src/Parser/Sour/Data.php b/src/Parser/Sour/Data.php index 02c896df..2e43544a 100644 --- a/src/Parser/Sour/Data.php +++ b/src/Parser/Sour/Data.php @@ -16,12 +16,12 @@ class Data extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; - $data = new \Record\Sour\Data(); + $data = new \Gedcom\Record\Sour\Data(); $parser->forward(); diff --git a/src/Parser/Sour/Data/Even.php b/src/Parser/Sour/Data/Even.php index 1625bca9..4b386704 100644 --- a/src/Parser/Sour/Data/Even.php +++ b/src/Parser/Sour/Data/Even.php @@ -16,12 +16,12 @@ class Even extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; - $even = new \Record\Sour\Data\Even(); + $even = new \Gedcom\Record\Sour\Data\Even(); $parser->forward(); diff --git a/src/Parser/Sour/Repo.php b/src/Parser/Sour/Repo.php index 77be46fb..6739cd0a 100644 --- a/src/Parser/Sour/Repo.php +++ b/src/Parser/Sour/Repo.php @@ -16,9 +16,9 @@ class Repo extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { - $repo = new \Record\Sour\Repo(); + $repo = new \Gedcom\Record\Sour\Repo(); $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[2])) { diff --git a/src/Parser/Sour/Repo/Caln.php b/src/Parser/Sour/Repo/Caln.php index de066274..10061af6 100644 --- a/src/Parser/Sour/Repo/Caln.php +++ b/src/Parser/Sour/Repo/Caln.php @@ -16,9 +16,9 @@ class Caln extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { - $caln = new \Record\Sour\Repo\Caln(); + $caln = new \Gedcom\Record\Sour\Repo\Caln(); $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[2])) { diff --git a/src/Parser/SourRef.php b/src/Parser/SourRef.php index 156bed23..2a582821 100644 --- a/src/Parser/SourRef.php +++ b/src/Parser/SourRef.php @@ -16,12 +16,12 @@ class SourRef extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[2])) { - $sour = new \Record\SourRef(); + $sour = new \Gedcom\Record\SourRef(); $sour->setSour($parser->normalizeIdentifier($record[2])); } else { $parser->skipToNextLevel($depth); diff --git a/src/Parser/SourRef/Data.php b/src/Parser/SourRef/Data.php index cb9023ce..bdff2dd1 100644 --- a/src/Parser/SourRef/Data.php +++ b/src/Parser/SourRef/Data.php @@ -16,9 +16,9 @@ class Data extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { - $data = new \Record\SourRef\Data(); + $data = new \Gedcom\Record\SourRef\Data(); $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; diff --git a/src/Parser/SourRef/Even.php b/src/Parser/SourRef/Even.php index 800a13ef..ef7968f4 100644 --- a/src/Parser/SourRef/Even.php +++ b/src/Parser/SourRef/Even.php @@ -16,12 +16,12 @@ class Even extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[2])) { - $even = new \Record\SourRef\Even(); + $even = new \Gedcom\Record\SourRef\Even(); $even->setEven(trim($record[2])); } else { $parser->skipToNextLevel($depth); diff --git a/src/Parser/Subm.php b/src/Parser/Subm.php index 62b48204..13adbe7f 100644 --- a/src/Parser/Subm.php +++ b/src/Parser/Subm.php @@ -16,7 +16,7 @@ class Subm extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -28,7 +28,7 @@ public static function parse(Gedcom\Parser $parser) return null; } - $subm = new \Record\Subm(); + $subm = new \Gedcom\Record\Subm(); $subm->setSubm($identifier); $parser->getGedcom()->addSubm($subm); diff --git a/src/Parser/Subn.php b/src/Parser/Subn.php index b6bf6495..79f8daa1 100644 --- a/src/Parser/Subn.php +++ b/src/Parser/Subn.php @@ -16,7 +16,7 @@ class Subn extends \Gedcom\Parser\Component { - public static function parse(Gedcom\Parser $parser) + public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; @@ -28,7 +28,7 @@ public static function parse(Gedcom\Parser $parser) return null; } - $subn = new \Record\Subn(); + $subn = new \Gedcom\Record\Subn(); $subn->setSubn($identifier); $parser->getGedcom()->setSubn($subn); diff --git a/src/Record/Fam/Anul.php b/src/Record/Fam/Anul.php index 0b8b9525..18e986b0 100644 --- a/src/Record/Fam/Anul.php +++ b/src/Record/Fam/Anul.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Fam; -class Anul extends \Record\Fam\Even +class Anul extends \Gedcom\Record\Fam\Even { } diff --git a/src/Record/Fam/Cens.php b/src/Record/Fam/Cens.php index 01211c4e..1c0259f5 100644 --- a/src/Record/Fam/Cens.php +++ b/src/Record/Fam/Cens.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Fam; -class Cens extends \Record\Fam\Even +class Cens extends \Gedcom\Record\Fam\Even { } diff --git a/src/Record/Fam/Div.php b/src/Record/Fam/Div.php index 5b6a2d59..b8cf7768 100644 --- a/src/Record/Fam/Div.php +++ b/src/Record/Fam/Div.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Fam; -class Div extends \Record\Fam\Even +class Div extends \Gedcom\Record\Fam\Even { } diff --git a/src/Record/Fam/Enga.php b/src/Record/Fam/Enga.php index 9d4eaa8e..c23e9e9b 100644 --- a/src/Record/Fam/Enga.php +++ b/src/Record/Fam/Enga.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Fam; -class Enga extends \Record\Fam\Even +class Enga extends \Gedcom\Record\Fam\Even { } diff --git a/src/Record/Fam/Even.php b/src/Record/Fam/Even.php index 126e68b2..aa18b20b 100644 --- a/src/Record/Fam/Even.php +++ b/src/Record/Fam/Even.php @@ -14,9 +14,9 @@ namespace Gedcom\Record\Fam; -use Record\Noteable; -use Record\Objectable; -use Record\Sourceable; +use \Gedcom\Record\Noteable; +use \Gedcom\Record\Objectable; +use \Gedcom\Record\Sourceable; /** * Event record. diff --git a/src/Record/Fam/Marb.php b/src/Record/Fam/Marb.php index 68a66009..7e93d5c6 100644 --- a/src/Record/Fam/Marb.php +++ b/src/Record/Fam/Marb.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Fam; -class Marb extends \Record\Fam\Even +class Marb extends \Gedcom\Record\Fam\Even { } diff --git a/src/Record/Fam/Marc.php b/src/Record/Fam/Marc.php index 5700ca70..372421d2 100644 --- a/src/Record/Fam/Marc.php +++ b/src/Record/Fam/Marc.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Fam; -class Marc extends \Record\Fam\Even +class Marc extends \Gedcom\Record\Fam\Even { } diff --git a/src/Record/Fam/Marl.php b/src/Record/Fam/Marl.php index 1b7183cd..a90150e7 100644 --- a/src/Record/Fam/Marl.php +++ b/src/Record/Fam/Marl.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Fam; -class Marl extends \Record\Fam\Even +class Marl extends \Gedcom\Record\Fam\Even { } diff --git a/src/Record/Fam/Marr.php b/src/Record/Fam/Marr.php index b180e0ac..c48ce5b6 100644 --- a/src/Record/Fam/Marr.php +++ b/src/Record/Fam/Marr.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Fam; -class Marr extends \Record\Fam\Even +class Marr extends \Gedcom\Record\Fam\Even { } diff --git a/src/Record/Fam/Mars.php b/src/Record/Fam/Mars.php index 74b8a365..0f90c9c5 100644 --- a/src/Record/Fam/Mars.php +++ b/src/Record/Fam/Mars.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Fam; -class Mars extends \Record\Fam\Even +class Mars extends \Gedcom\Record\Fam\Even { } diff --git a/src/Record/Fam/Slgs.php b/src/Record/Fam/Slgs.php index a4d234e7..ce470b21 100644 --- a/src/Record/Fam/Slgs.php +++ b/src/Record/Fam/Slgs.php @@ -14,8 +14,8 @@ namespace Gedcom\Record\Fam; -use Record\Noteable; -use Record\Sourceable; +use \Gedcom\Record\Noteable; +use \Gedcom\Record\Sourceable; class Slgs extends \Gedcom\Record implements Sourceable, Noteable { diff --git a/src/Record/Indi/Adop.php b/src/Record/Indi/Adop.php index 0672cbe9..bfdc769e 100644 --- a/src/Record/Indi/Adop.php +++ b/src/Record/Indi/Adop.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\Indi; -class Adop extends \Record\Indi\Even +class Adop extends \Gedcom\Record\Indi\Even { protected $_adop = null; protected $_famc = null; diff --git a/src/Record/Indi/Asso.php b/src/Record/Indi/Asso.php index a1476821..bc19952f 100644 --- a/src/Record/Indi/Asso.php +++ b/src/Record/Indi/Asso.php @@ -14,8 +14,8 @@ namespace Gedcom\Record\Indi; -use Record\Noteable; -use Record\Sourceable; +use \Gedcom\Record\Noteable; +use \Gedcom\Record\Sourceable; class Asso extends \Gedcom\Record implements Sourceable, Noteable { diff --git a/src/Record/Indi/Attr.php b/src/Record/Indi/Attr.php index 1fefbd2b..93a99775 100644 --- a/src/Record/Indi/Attr.php +++ b/src/Record/Indi/Attr.php @@ -14,11 +14,11 @@ namespace Gedcom\Record\Indi; -use Record\Noteable; -use Record\Objectable; -use Record\Sourceable; +use \Gedcom\Record\Noteable; +use \Gedcom\Record\Objectable; +use \Gedcom\Record\Sourceable; -class Attr extends \Record\Indi\Even implements Sourceable, Noteable, Objectable +class Attr extends \Gedcom\Record\Indi\Even implements Sourceable, Noteable, Objectable { protected $type = null; protected $_attr = null; diff --git a/src/Record/Indi/Bapm.php b/src/Record/Indi/Bapm.php index a4f596f5..29c814fd 100644 --- a/src/Record/Indi/Bapm.php +++ b/src/Record/Indi/Bapm.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Bapm extends \Record\Indi\Even +class Bapm extends \Gedcom\Record\Indi\Even { } diff --git a/src/Record/Indi/Barm.php b/src/Record/Indi/Barm.php index 3f5cc0c9..07d71dbd 100644 --- a/src/Record/Indi/Barm.php +++ b/src/Record/Indi/Barm.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Barm extends \Record\Indi\Even +class Barm extends \Gedcom\Record\Indi\Even { } diff --git a/src/Record/Indi/Basm.php b/src/Record/Indi/Basm.php index e87794eb..c30bb232 100644 --- a/src/Record/Indi/Basm.php +++ b/src/Record/Indi/Basm.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Basm extends \Record\Indi\Even +class Basm extends \Gedcom\Record\Indi\Even { } diff --git a/src/Record/Indi/Bles.php b/src/Record/Indi/Bles.php index 6c93ab64..f7195d95 100644 --- a/src/Record/Indi/Bles.php +++ b/src/Record/Indi/Bles.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Bles extends \Record\Indi\Even +class Bles extends \Gedcom\Record\Indi\Even { } diff --git a/src/Record/Indi/Buri.php b/src/Record/Indi/Buri.php index 4a67dfe4..0dfb6cc6 100644 --- a/src/Record/Indi/Buri.php +++ b/src/Record/Indi/Buri.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Buri extends \Record\Indi\Even +class Buri extends \Gedcom\Record\Indi\Even { } diff --git a/src/Record/Indi/Cast.php b/src/Record/Indi/Cast.php index a2a3afa4..21795c12 100644 --- a/src/Record/Indi/Cast.php +++ b/src/Record/Indi/Cast.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Cast extends \Record\Indi\Attr +class Cast extends \Gedcom\Record\Indi\Attr { } diff --git a/src/Record/Indi/Cens.php b/src/Record/Indi/Cens.php index 7fd560aa..431f3bd2 100644 --- a/src/Record/Indi/Cens.php +++ b/src/Record/Indi/Cens.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Cens extends \Record\Indi\Even +class Cens extends \Gedcom\Record\Indi\Even { } diff --git a/src/Record/Indi/Chr.php b/src/Record/Indi/Chr.php index c990b6b5..e6d9eaf0 100644 --- a/src/Record/Indi/Chr.php +++ b/src/Record/Indi/Chr.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\Indi; -class Chr extends \Record\Indi\Even +class Chr extends \Gedcom\Record\Indi\Even { protected $_famc = null; } diff --git a/src/Record/Indi/Chra.php b/src/Record/Indi/Chra.php index 1d1e4715..7a5b5d73 100644 --- a/src/Record/Indi/Chra.php +++ b/src/Record/Indi/Chra.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Chra extends \Record\Indi\Even +class Chra extends \Gedcom\Record\Indi\Even { } diff --git a/src/Record/Indi/Conf.php b/src/Record/Indi/Conf.php index 9e7fb90f..3e635ffd 100644 --- a/src/Record/Indi/Conf.php +++ b/src/Record/Indi/Conf.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Conf extends \Record\Indi\Even +class Conf extends \Gedcom\Record\Indi\Even { } diff --git a/src/Record/Indi/Crem.php b/src/Record/Indi/Crem.php index 64040499..6c60b4b1 100644 --- a/src/Record/Indi/Crem.php +++ b/src/Record/Indi/Crem.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Crem extends \Record\Indi\Even +class Crem extends \Gedcom\Record\Indi\Even { } diff --git a/src/Record/Indi/Deat.php b/src/Record/Indi/Deat.php index 4f5eefef..b29db0a5 100644 --- a/src/Record/Indi/Deat.php +++ b/src/Record/Indi/Deat.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Deat extends \Record\Indi\Even +class Deat extends \Gedcom\Record\Indi\Even { } diff --git a/src/Record/Indi/Dscr.php b/src/Record/Indi/Dscr.php index e76992ca..65ccf6ab 100644 --- a/src/Record/Indi/Dscr.php +++ b/src/Record/Indi/Dscr.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Dscr extends \Record\Indi\Attr +class Dscr extends \Gedcom\Record\Indi\Attr { } diff --git a/src/Record/Indi/Educ.php b/src/Record/Indi/Educ.php index c7d948f3..5486e03a 100644 --- a/src/Record/Indi/Educ.php +++ b/src/Record/Indi/Educ.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Educ extends \Record\Indi\Attr +class Educ extends \Gedcom\Record\Indi\Attr { } diff --git a/src/Record/Indi/Emig.php b/src/Record/Indi/Emig.php index f64d0ec9..ee529143 100644 --- a/src/Record/Indi/Emig.php +++ b/src/Record/Indi/Emig.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Emig extends \Record\Indi\Even +class Emig extends \Gedcom\Record\Indi\Even { } diff --git a/src/Record/Indi/Famc.php b/src/Record/Indi/Famc.php index d63e3b37..e66d2c88 100644 --- a/src/Record/Indi/Famc.php +++ b/src/Record/Indi/Famc.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\Indi; -use Record\Noteable; +use \Gedcom\Record\Noteable; class Famc extends \Gedcom\Record implements Noteable { diff --git a/src/Record/Indi/Fams.php b/src/Record/Indi/Fams.php index 9489d52e..90d463f5 100644 --- a/src/Record/Indi/Fams.php +++ b/src/Record/Indi/Fams.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\Indi; -use Record\Noteable; +use \Gedcom\Record\Noteable; class Fams extends \Gedcom\Record implements Noteable { diff --git a/src/Record/Indi/Fcom.php b/src/Record/Indi/Fcom.php index b721ceb1..0e1a5877 100644 --- a/src/Record/Indi/Fcom.php +++ b/src/Record/Indi/Fcom.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Fcom extends \Record\Indi\Even +class Fcom extends \Gedcom\Record\Indi\Even { } diff --git a/src/Record/Indi/Grad.php b/src/Record/Indi/Grad.php index c602c989..c60df467 100644 --- a/src/Record/Indi/Grad.php +++ b/src/Record/Indi/Grad.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Grad extends \Record\Indi\Even +class Grad extends \Gedcom\Record\Indi\Even { } diff --git a/src/Record/Indi/Idno.php b/src/Record/Indi/Idno.php index cecaf9b8..357de7fa 100644 --- a/src/Record/Indi/Idno.php +++ b/src/Record/Indi/Idno.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Idno extends \Record\Indi\Attr +class Idno extends \Gedcom\Record\Indi\Attr { } diff --git a/src/Record/Indi/Immi.php b/src/Record/Indi/Immi.php index c1a632e8..f2f845fb 100644 --- a/src/Record/Indi/Immi.php +++ b/src/Record/Indi/Immi.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Immi extends \Record\Indi\Even +class Immi extends \Gedcom\Record\Indi\Even { } diff --git a/src/Record/Indi/Lds.php b/src/Record/Indi/Lds.php index 0f8236f7..31db0f8e 100644 --- a/src/Record/Indi/Lds.php +++ b/src/Record/Indi/Lds.php @@ -14,8 +14,8 @@ namespace Gedcom\Record\Indi; -use Record\Noteable; -use Record\Sourceable; +use \Gedcom\Record\Noteable; +use \Gedcom\Record\Sourceable; abstract class Lds extends \Gedcom\Record implements Sourceable, Noteable { diff --git a/src/Record/Indi/Nati.php b/src/Record/Indi/Nati.php index a1cc80ee..202a5564 100644 --- a/src/Record/Indi/Nati.php +++ b/src/Record/Indi/Nati.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Nati extends \Record\Indi\Attr +class Nati extends \Gedcom\Record\Indi\Attr { } diff --git a/src/Record/Indi/Natu.php b/src/Record/Indi/Natu.php index 92774bfb..5b86ef89 100644 --- a/src/Record/Indi/Natu.php +++ b/src/Record/Indi/Natu.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Natu extends \Record\Indi\Even +class Natu extends \Gedcom\Record\Indi\Even { } diff --git a/src/Record/Indi/Nchi.php b/src/Record/Indi/Nchi.php index 7962f0f9..5b7d982d 100644 --- a/src/Record/Indi/Nchi.php +++ b/src/Record/Indi/Nchi.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Nchi extends \Record\Indi\Attr +class Nchi extends \Gedcom\Record\Indi\Attr { } diff --git a/src/Record/Indi/Nmr.php b/src/Record/Indi/Nmr.php index 89c06a13..80bd9d68 100644 --- a/src/Record/Indi/Nmr.php +++ b/src/Record/Indi/Nmr.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Nmr extends \Record\Indi\Attr +class Nmr extends \Gedcom\Record\Indi\Attr { } diff --git a/src/Record/Indi/Note.php b/src/Record/Indi/Note.php index 0861102c..8b292299 100644 --- a/src/Record/Indi/Note.php +++ b/src/Record/Indi/Note.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Note extends \Record\NoteRefAbstract +class Note extends \Gedcom\Record\NoteRefAbstract { } diff --git a/src/Record/Indi/Occu.php b/src/Record/Indi/Occu.php index 859e3c2c..13534b31 100644 --- a/src/Record/Indi/Occu.php +++ b/src/Record/Indi/Occu.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Occu extends \Record\Indi\Attr +class Occu extends \Gedcom\Record\Indi\Attr { } diff --git a/src/Record/Indi/Ordn.php b/src/Record/Indi/Ordn.php index f8bd1c6b..e3dd9295 100644 --- a/src/Record/Indi/Ordn.php +++ b/src/Record/Indi/Ordn.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Ordn extends \Record\Indi\Even +class Ordn extends \Gedcom\Record\Indi\Even { } diff --git a/src/Record/Indi/Prob.php b/src/Record/Indi/Prob.php index a2d950dd..af21e203 100644 --- a/src/Record/Indi/Prob.php +++ b/src/Record/Indi/Prob.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Prob extends \Record\Indi\Even +class Prob extends \Gedcom\Record\Indi\Even { } diff --git a/src/Record/Indi/Prop.php b/src/Record/Indi/Prop.php index 4eeb90ef..b93ab4ca 100644 --- a/src/Record/Indi/Prop.php +++ b/src/Record/Indi/Prop.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Prop extends \Record\Indi\Attr +class Prop extends \Gedcom\Record\Indi\Attr { } diff --git a/src/Record/Indi/Reli.php b/src/Record/Indi/Reli.php index 6ae556f1..173fdd14 100644 --- a/src/Record/Indi/Reli.php +++ b/src/Record/Indi/Reli.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Reli extends \Record\Indi\Attr +class Reli extends \Gedcom\Record\Indi\Attr { } diff --git a/src/Record/Indi/Resi.php b/src/Record/Indi/Resi.php index 78bf5721..bbd43a94 100644 --- a/src/Record/Indi/Resi.php +++ b/src/Record/Indi/Resi.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Resi extends \Record\Indi\Attr +class Resi extends \Gedcom\Record\Indi\Attr { } diff --git a/src/Record/Indi/Reti.php b/src/Record/Indi/Reti.php index efbb7e2b..d8ac9e18 100644 --- a/src/Record/Indi/Reti.php +++ b/src/Record/Indi/Reti.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Reti extends \Record\Indi\Even +class Reti extends \Gedcom\Record\Indi\Even { } diff --git a/src/Record/Indi/Ssn.php b/src/Record/Indi/Ssn.php index f09115f5..9b9d0563 100644 --- a/src/Record/Indi/Ssn.php +++ b/src/Record/Indi/Ssn.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Ssn extends \Record\Indi\Attr +class Ssn extends \Gedcom\Record\Indi\Attr { } diff --git a/src/Record/Indi/Titl.php b/src/Record/Indi/Titl.php index 2d7b27e8..009d6f93 100644 --- a/src/Record/Indi/Titl.php +++ b/src/Record/Indi/Titl.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Titl extends \Record\Indi\Attr +class Titl extends \Gedcom\Record\Indi\Attr { } diff --git a/src/Record/Indi/Will.php b/src/Record/Indi/Will.php index fd259a20..4d89e2d2 100644 --- a/src/Record/Indi/Will.php +++ b/src/Record/Indi/Will.php @@ -14,6 +14,6 @@ namespace Gedcom\Record\Indi; -class Will extends \Record\Indi\Even +class Will extends \Gedcom\Record\Indi\Even { } diff --git a/src/Record/Repo.php b/src/Record/Repo.php index b9eed15d..85418fbc 100644 --- a/src/Record/Repo.php +++ b/src/Record/Repo.php @@ -14,12 +14,12 @@ namespace Gedcom\Record; -use Record; +use \Gedcom\Record; /** * Class Repo. */ -class Repo extends \Gedcom\Record implements Noteable +class Repo extends Record implements Noteable { /** * @var string @@ -160,7 +160,7 @@ public function getWww() public function addRefn($refn = null) { if (empty($refn)) { - $refn = new \Record\Refn(); + $refn = new \Gedcom\Record\Refn(); } $this->refn[] = $refn; @@ -183,7 +183,7 @@ public function getRefn() public function addNote($note = null) { if (empty($node)) { - $note = new \Record\NoteRef(); + $note = new \Gedcom\Record\NoteRef(); } $this->note[] = $note; @@ -246,7 +246,7 @@ public function getName() public function setAddr($addr = null) { if (empty($addr)) { - $addr = new \Record\Addr(); + $addr = new \Gedcom\Record\Addr(); } $this->addr = $addr; diff --git a/src/Record/Sour/Data.php b/src/Record/Sour/Data.php index dd711b3d..5322995b 100644 --- a/src/Record/Sour/Data.php +++ b/src/Record/Sour/Data.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\Sour; -use Record\Noteable; +use \Gedcom\Record\Noteable; class Data extends \Gedcom\Record implements Noteable { diff --git a/src/Record/Sour/Repo.php b/src/Record/Sour/Repo.php index 231d8d8d..8306402c 100644 --- a/src/Record/Sour/Repo.php +++ b/src/Record/Sour/Repo.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\Sour; -use Record\Noteable; +use \Gedcom\Record\Noteable; class Repo extends \Gedcom\Record implements Noteable { From baad49ad44a78374a8c614eee603d0dfe5858e8a Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sat, 17 Jul 2021 23:32:35 +0100 Subject: [PATCH 73/99] Update PSR4. --- README.md | 12 ++--- src/Gedcom.php | 72 ++++++++++++++--------------- src/Parser/Chan.php | 2 +- src/Parser/Fam.php | 12 ++--- src/Parser/Fam/Even.php | 18 ++++---- src/Parser/Fam/Slgs.php | 6 +-- src/Parser/Head.php | 14 +++--- src/Parser/Head/Sour.php | 4 +- src/Parser/Indi.php | 18 ++++---- src/Parser/Indi/Asso.php | 4 +- src/Parser/Indi/Attr.php | 10 ++-- src/Parser/Indi/Even.php | 14 +++--- src/Parser/Indi/Even/Plac.php | 4 +- src/Parser/Indi/Famc.php | 2 +- src/Parser/Indi/Fams.php | 2 +- src/Parser/Indi/Lds.php | 4 +- src/Parser/Indi/Name.php | 4 +- src/Parser/Note.php | 6 +-- src/Parser/NoteRef.php | 2 +- src/Parser/Obje.php | 8 ++-- src/Parser/Plac.php | 8 ++-- src/Parser/Repo.php | 8 ++-- src/Parser/RepoRef.php | 2 +- src/Parser/Sour.php | 8 ++-- src/Parser/Sour/Data.php | 2 +- src/Parser/SourRef.php | 6 +-- src/Parser/Subm.php | 8 ++-- src/Parser/Subn.php | 4 +- src/Record.php | 16 +++---- src/Record/Addr.php | 2 +- src/Record/Caln.php | 2 +- src/Record/Chan.php | 2 +- src/Record/Data.php | 2 +- src/Record/Date.php | 2 +- src/Record/Fam.php | 2 +- src/Record/Head.php | 22 ++++----- src/Record/Head/Sour.php | 4 +- src/Record/Indi.php | 4 +- src/Record/Indi/Even.php | 10 ++-- src/Record/Indi/Even/Plac.php | 2 +- src/Record/Indi/Name.php | 4 +- src/Record/Indi/Name/Fone.php | 2 +- src/Record/Indi/Name/Romn.php | 2 +- src/Record/ObjeRef/File.php | 2 +- src/Record/ObjeRef/File/Form.php | 2 +- src/Record/Phon.php | 2 +- src/Record/Plac/Fone.php | 2 +- src/Record/Plac/Map.php | 2 +- src/Record/Plac/Romn.php | 2 +- src/Record/Refn.php | 2 +- src/Record/Repo.php | 14 +++--- src/Record/Sour.php | 10 ++-- src/Record/Subm.php | 6 +-- src/Record/Subn.php | 4 +- src/Writer.php | 20 ++++---- src/Writer/Addr.php | 4 +- src/Writer/Caln.php | 4 +- src/Writer/Chan.php | 6 +-- src/Writer/Fam.php | 18 ++++---- src/Writer/Fam/Even.php | 20 ++++---- src/Writer/Fam/Even/Husb.php | 4 +- src/Writer/Fam/Even/Wife.php | 4 +- src/Writer/Fam/Slgs.php | 8 ++-- src/Writer/Head.php | 14 +++--- src/Writer/Head/Char.php | 4 +- src/Writer/Head/Date.php | 4 +- src/Writer/Head/Gedc.php | 4 +- src/Writer/Head/Plac.php | 4 +- src/Writer/Head/Sour.php | 8 ++-- src/Writer/Head/Sour/Corp.php | 8 ++-- src/Writer/Head/Sour/Data.php | 4 +- src/Writer/Indi.php | 34 +++++++------- src/Writer/Indi/Asso.php | 8 ++-- src/Writer/Indi/Attr.php | 4 +- src/Writer/Indi/Even.php | 18 ++++---- src/Writer/Indi/Even/Plac.php | 8 ++-- src/Writer/Indi/Famc.php | 6 +-- src/Writer/Indi/Fams.php | 6 +-- src/Writer/Indi/Name.php | 8 ++-- src/Writer/Note.php | 10 ++-- src/Writer/NoteRef.php | 6 +-- src/Writer/Obje.php | 10 ++-- src/Writer/ObjeRef.php | 6 +-- src/Writer/Refn.php | 4 +- src/Writer/Repo.php | 14 +++--- src/Writer/RepoRef.php | 8 ++-- src/Writer/Sour.php | 16 +++---- src/Writer/Sour/Data.php | 8 ++-- src/Writer/Sour/Data/Even.php | 4 +- src/Writer/SourRef.php | 10 ++-- src/Writer/SourRef/Even.php | 4 +- src/Writer/Subm.php | 14 +++--- src/Writer/Subn.php | 4 +- tests/issue/Issue00012Test.php | 4 +- tests/issue/Issue00017Test.php | 4 +- tests/issue/Issue00018Test.php | 4 +- tests/library/Gedcom/ParserTest.php | 8 ++-- 97 files changed, 379 insertions(+), 379 deletions(-) diff --git a/README.md b/README.md index 037c98a9..6b58e63b 100644 --- a/README.md +++ b/README.md @@ -35,15 +35,15 @@ If you are not using composer, you can download an archive of the source from Gi ```php spl_autoload_register(function ($class) { - $pathToPhpGedcom = __DIR__ . '/library/'; // TODO FIXME + $pathToGedcom = __DIR__ . '/library/'; // TODO FIXME - if (!substr(ltrim($class, '\\'), 0, 7) == 'PhpGedcom\\') { + if (!substr(ltrim($class, '\\'), 0, 7) == 'Gedcom\\') { return; } $class = str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php'; - if (file_exists($pathToPhpGedcom . $class)) { - require_once($pathToPhpGedcom . $class); + if (file_exists($pathToGedcom . $class)) { + require_once($pathToGedcom . $class); } }); ``` @@ -53,8 +53,8 @@ spl_autoload_register(function ($class) { 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: ```php -$parser = new \PhpGedcom\Parser(); -$gedcom = $parser->parse('tmp\gedcom.ged'); +$parser = new \Gedcom\Parser(); +$gedcom = $parser->parse('tmp.ged'); foreach ($gedcom->getIndi() as $individual) { echo $individual->getId() . ': ' . current($individual->getName())->getSurn() . diff --git a/src/Gedcom.php b/src/Gedcom.php index d12fc885..b0b6e581 100644 --- a/src/Gedcom.php +++ b/src/Gedcom.php @@ -23,28 +23,28 @@ class Gedcom /** * Stores the header information of the GEDCOM file. * - * @var \Record\Head + * @var \Gedcom\Record\Head */ protected $head; /** * Stores the submission information for the GEDCOM file. * - * @var \Record\Subn + * @var \Gedcom\Record\Subn */ protected $subn; /** * Stores sources cited throughout the GEDCOM file. * - * @var \Record\Sour[] + * @var \Gedcom\Record\Sour[] */ protected $sour = []; /** * Stores all the individuals contained within the GEDCOM file. * - * @var \Record\Indi[] + * @var \Gedcom\Record\Indi[] */ protected $indi = []; @@ -58,44 +58,44 @@ class Gedcom /** * Stores all the families contained within the GEDCOM file. * - * @var \Record\Fam[] + * @var \Gedcom\Record\Fam[] */ protected $fam = []; /** * Stores all the notes contained within the GEDCOM file that are not inline. * - * @var \Record\Note[] + * @var \Gedcom\Record\Note[] */ protected $note = []; /** * Stores all repositories that are contained within the GEDCOM file and referenced by sources. * - * @var \Record\Repo[] + * @var \Gedcom\Record\Repo[] */ protected $repo = []; /** * Stores all the media objects that are contained within the GEDCOM file. * - * @var \Record\Obje[] + * @var \Gedcom\Record\Obje[] */ protected $obje = []; /** * Stores information about all the submitters to the GEDCOM file. * - * @var \Record\Subm[] + * @var \Gedcom\Record\Subm[] */ protected $subm = []; /** * Retrieves the header record of the GEDCOM file. * - * @param \Record\Head $head + * @param \Gedcom\Record\Head $head */ - public function setHead(\Record\Head $head) + public function setHead (\Record\Head $head) { $this->head = $head; } @@ -103,9 +103,9 @@ public function setHead(\Record\Head $head) /** * Retrieves the submission record of the GEDCOM file. * - * @param \Record\Subn $subn + * @param \Gedcom\Record\Subn $subn */ - public function setSubn(\Record\Subn $subn) + public function setSubn (\Record\Subn $subn) { $this->subn = $subn; } @@ -113,9 +113,9 @@ public function setSubn(\Record\Subn $subn) /** * Adds a source to the collection of sources. * - * @param \Record\Sour $sour + * @param \Gedcom\Record\Sour $sour */ - public function addSour(\Record\Sour $sour) + public function addSour (\Record\Sour $sour) { $this->sour[$sour->getSour()] = $sour; } @@ -123,9 +123,9 @@ public function addSour(\Record\Sour $sour) /** * Adds an individual to the collection of individuals. * - * @param \Record\Indi $indi + * @param \Gedcom\Record\Indi $indi */ - public function addIndi(\Record\Indi $indi) + public function addIndi (\Record\Indi $indi) { $this->indi[$indi->getId()] = $indi; if ($indi->getUid()) { @@ -136,9 +136,9 @@ public function addIndi(\Record\Indi $indi) /** * Adds a family to the collection of families. * - * @param \Record\Fam $fam + * @param \Gedcom\Record\Fam $fam */ - public function addFam(\Record\Fam $fam) + public function addFam (\Record\Fam $fam) { $this->fam[$fam->getId()] = $fam; } @@ -146,9 +146,9 @@ public function addFam(\Record\Fam $fam) /** * Adds a note to the collection of notes. * - * @param \Record\Note $note + * @param \Gedcom\Record\Note $note */ - public function addNote(\Record\Note $note) + public function addNote (\Record\Note $note) { $this->note[$note->getId()] = $note; } @@ -156,9 +156,9 @@ public function addNote(\Record\Note $note) /** * Adds a repository to the collection of repositories. * - * @param \Record\Repo $repo + * @param \Gedcom\Record\Repo $repo */ - public function addRepo(\Record\Repo $repo) + public function addRepo (\Record\Repo $repo) { $this->repo[$repo->getRepo()] = $repo; } @@ -166,9 +166,9 @@ public function addRepo(\Record\Repo $repo) /** * Adds an object to the collection of objects. * - * @param \Record\Obje $obje + * @param \Gedcom\Record\Obje $obje */ - public function addObje(\Record\Obje $obje) + public function addObje (\Record\Obje $obje) { $this->obje[$obje->getId()] = $obje; } @@ -176,9 +176,9 @@ public function addObje(\Record\Obje $obje) /** * Adds a submitter record to the collection of submitters. * - * @param \Record\Subm $subm + * @param \Gedcom\Record\Subm $subm */ - public function addSubm(\Record\Subm $subm) + public function addSubm (\Record\Subm $subm) { $this->subm[$subm->getSubm()] = $subm; } @@ -186,7 +186,7 @@ public function addSubm(\Record\Subm $subm) /** * Gets the header information of the GEDCOM file. * - * @return \Record\Head + * @return \Gedcom\Record\Head */ public function getHead() { @@ -196,7 +196,7 @@ public function getHead() /** * Gets the submission record of the GEDCOM file. * - * @return \Record\Subn + * @return \Gedcom\Record\Subn */ public function getSubn() { @@ -206,7 +206,7 @@ public function getSubn() /** * Gets the collection of submitters to the GEDCOM file. * - * @return \Record\Subm[] + * @return \Gedcom\Record\Subm[] */ public function getSubm() { @@ -216,7 +216,7 @@ public function getSubm() /** * Gets the collection of individuals stored in the GEDCOM file. * - * @return \Record\Indi[] + * @return \Gedcom\Record\Indi[] */ public function getIndi() { @@ -226,7 +226,7 @@ public function getIndi() /** * Gets the collection of families stored in the GEDCOM file. * - * @return \Record\Fam[] + * @return \Gedcom\Record\Fam[] */ public function getFam() { @@ -236,7 +236,7 @@ public function getFam() /** * Gets the collection of repositories stored in the GEDCOM file. * - * @return \Record\Repo[] + * @return \Gedcom\Record\Repo[] */ public function getRepo() { @@ -246,7 +246,7 @@ public function getRepo() /** * Gets the collection of sources stored in the GEDCOM file. * - * @return \Record\Sour[] + * @return \Gedcom\Record\Sour[] */ public function getSour() { @@ -256,7 +256,7 @@ public function getSour() /** * Gets the collection of note stored in the GEDCOM file. * - * @return \Record\Note[] + * @return \Gedcom\Record\Note[] */ public function getNote() { @@ -266,7 +266,7 @@ public function getNote() /** * Gets the collection of objects stored in the GEDCOM file. * - * @return \Record\Obje[] + * @return \Gedcom\Record\Obje[] */ public function getObje() { diff --git a/src/Parser/Chan.php b/src/Parser/Chan.php index 42fb0a2d..741543ed 100644 --- a/src/Parser/Chan.php +++ b/src/Parser/Chan.php @@ -43,7 +43,7 @@ public static function parse(\Gedcom\Parser $parser) $chan->setTime(trim($record[2])); break; case 'NOTE': - $note = \Parser\NoteRef::parse($parser); + $note = \Gedcom\Parser\NoteRef::parse($parser); if ($note) { $chan->addNote($note); } diff --git a/src/Parser/Fam.php b/src/Parser/Fam.php index 9d1ee17f..25ff495b 100644 --- a/src/Parser/Fam.php +++ b/src/Parser/Fam.php @@ -95,32 +95,32 @@ public static function parse(\Gedcom\Parser $parser) $fam->addSubm($parser->normalizeIdentifier($record[2])); break; case 'SLGS': - $slgs = \Parser\Fam\Slgs::parse($parser); + $slgs = \Gedcom\Parser\Fam\Slgs::parse($parser); $fam->addSlgs($slgs); break; case 'REFN': - $ref = \Parser\Refn::parse($parser); + $ref = \Gedcom\Parser\Refn::parse($parser); $fam->addRefn($ref); break; case 'RIN': $fam->setRin(trim($record[2])); break; case 'CHAN': - $chan = \Parser\Chan::parse($parser); + $chan = \Gedcom\Parser\Chan::parse($parser); $fam->setChan($chan); break; case 'NOTE': - $note = \Parser\NoteRef::parse($parser); + $note = \Gedcom\Parser\NoteRef::parse($parser); if ($note) { $fam->addNote($note); } break; case 'SOUR': - $sour = \Parser\SourRef::parse($parser); + $sour = \Gedcom\Parser\SourRef::parse($parser); $fam->addSour($sour); break; case 'OBJE': - $obje = \Parser\ObjeRef::parse($parser); + $obje = \Gedcom\Parser\ObjeRef::parse($parser); $fam->addObje($obje); break; diff --git a/src/Parser/Fam/Even.php b/src/Parser/Fam/Even.php index 7e2ba5a4..81c86251 100644 --- a/src/Parser/Fam/Even.php +++ b/src/Parser/Fam/Even.php @@ -44,20 +44,20 @@ public static function parse(\Gedcom\Parser $parser) $even->setType(trim($record[2])); break; case 'DATE': - $dat = \Parser\Date::parse($parser); + $dat = \Gedcom\Parser\Date::parse($parser); $even->setDate($dat); //$even->setDate(trim($record[2])); break; case 'PLAC': - $plac = \Parser\Plac::parse($parser); + $plac = \Gedcom\Parser\Plac::parse($parser); $even->setPlac($plac); break; case 'ADDR': - $addr = \Parser\Addr::parse($parser); + $addr = \Gedcom\Parser\Addr::parse($parser); $even->setAddr($addr); break; case 'PHON': - $phone = \Parser\Phon::parse($parser); + $phone = \Gedcom\Parser\Phon::parse($parser); $even->addPhone($phone); break; case 'CAUS': @@ -70,23 +70,23 @@ public static function parse(\Gedcom\Parser $parser) $even->setAgnc(trim($record[2])); break; case 'HUSB': - $husb = \Parser\Fam\Even\Husb::parse($parser); + $husb = \Gedcom\Parser\Fam\Even\Husb::parse($parser); $even->setHusb($husb); break; case 'WIFE': - $wife = \Parser\Fam\Even\Wife::parse($parser); + $wife = \Gedcom\Parser\Fam\Even\Wife::parse($parser); $even->setWife($wife); break; case 'SOUR': - $sour = \Parser\SourRef::parse($parser); + $sour = \Gedcom\Parser\SourRef::parse($parser); $even->addSour($sour); break; case 'OBJE': - $obje = \Parser\ObjeRef::parse($parser); + $obje = \Gedcom\Parser\ObjeRef::parse($parser); $even->addObje($obje); break; case 'NOTE': - $note = \Parser\NoteRef::parse($parser); + $note = \Gedcom\Parser\NoteRef::parse($parser); if ($note) { $even->addNote($note); } diff --git a/src/Parser/Fam/Slgs.php b/src/Parser/Fam/Slgs.php index a47e4f41..f7f8ef4b 100644 --- a/src/Parser/Fam/Slgs.php +++ b/src/Parser/Fam/Slgs.php @@ -37,7 +37,7 @@ public static function parse(\Gedcom\Parser $parser) switch ($recordType) { case 'STAT': - $stat = \Parser\Fam\Slgs\Stat::parse($parser); + $stat = \Gedcom\Parser\Fam\Slgs\Stat::parse($parser); $slgs->setStat($stat); break; case 'DATE': @@ -50,11 +50,11 @@ public static function parse(\Gedcom\Parser $parser) $slgs->setTemp(trim($record[2])); break; case 'SOUR': - $sour = \Parser\SourRef::parse($parser); + $sour = \Gedcom\Parser\SourRef::parse($parser); $slgs->addSour($sour); break; case 'NOTE': - $note = \Parser\NoteRef::parse($parser); + $note = \Gedcom\Parser\NoteRef::parse($parser); if ($note) { $slgs->addNote($note); } diff --git a/src/Parser/Head.php b/src/Parser/Head.php index 0f62e61a..98bc4355 100644 --- a/src/Parser/Head.php +++ b/src/Parser/Head.php @@ -19,7 +19,7 @@ class Head extends \Gedcom\Parser\Component /** * @param \Gedcom\Parser $parser * - * @return \Record\Head + * @return \Gedcom\Record\Head */ public static function parse(\Gedcom\Parser $parser) { @@ -33,7 +33,7 @@ public static function parse(\Gedcom\Parser $parser) return null; } - $head = new \Gedcom\Record\Head(); + $head = new Record\Head(); $parser->getGedcom()->setHead($head); @@ -51,7 +51,7 @@ public static function parse(\Gedcom\Parser $parser) switch ($recordType) { case 'SOUR': - $sour = Gedcom\Parser\Head\Sour::parse($parser); + $sour = Parser\Head\Sour::parse($parser); $head->setSour($sour); break; case 'DEST': @@ -76,19 +76,19 @@ public static function parse(\Gedcom\Parser $parser) $head->setLang(trim($record[2])); break; case 'DATE': - $date = Gedcom\Parser\Head\Date::parse($parser); + $date = Parser\Head\Date::parse($parser); $head->setDate($date); break; case 'GEDC': - $gedc = Gedcom\Parser\Head\Gedc::parse($parser); + $gedc = Parser\Head\Gedc::parse($parser); $head->setGedc($gedc); break; case 'CHAR': - $char = Gedcom\Parser\Head\Char::parse($parser); + $char = Parser\Head\Char::parse($parser); $head->setChar($char); break; case 'PLAC': - $plac = Gedcom\Parser\Head\Plac::parse($parser); + $plac = Parser\Head\Plac::parse($parser); $head->setPlac($plac); break; case 'NOTE': diff --git a/src/Parser/Head/Sour.php b/src/Parser/Head/Sour.php index b8f0c709..95728151 100644 --- a/src/Parser/Head/Sour.php +++ b/src/Parser/Head/Sour.php @@ -49,11 +49,11 @@ public static function parse(\Gedcom\Parser $parser) $source->setName(trim($record[2])); break; case 'CORP': - $corp = Gedcom\Parser\Head\Sour\Corp::parse($parser); + $corp = Parser\Head\Sour\Corp::parse($parser); $source->setCorp($corp); break; case 'DATA': - $data = Gedcom\Parser\Head\Sour\Data::parse($parser); + $data = Parser\Head\Sour\Data::parse($parser); $source->setData($data); break; default: diff --git a/src/Parser/Indi.php b/src/Parser/Indi.php index 54125531..5abd2556 100644 --- a/src/Parser/Indi.php +++ b/src/Parser/Indi.php @@ -53,7 +53,7 @@ public static function parse(\Gedcom\Parser $parser) $indi->setResn(trim($record[2])); break; case 'NAME': - $name = \Parser\Indi\Name::parse($parser); + $name = \Gedcom\Parser\Indi\Name::parse($parser); $indi->addName($name); break; case 'SEX': @@ -118,13 +118,13 @@ public static function parse(\Gedcom\Parser $parser) $indi->{'add'.$recordType}[] = $lds; break; case 'FAMC': - $famc = \Parser\Indi\Famc::parse($parser); + $famc = \Gedcom\Parser\Indi\Famc::parse($parser); if ($famc) { $indi->addFamc($famc); } break; case 'FAMS': - $fams = \Parser\Indi\Fams::parse($parser); + $fams = \Gedcom\Parser\Indi\Fams::parse($parser); if ($fams) { $indi->addFams($fams); } @@ -133,7 +133,7 @@ public static function parse(\Gedcom\Parser $parser) $indi->addSubm($parser->normalizeIdentifier($record[2])); break; case 'ASSO': - $asso = \Parser\Indi\Asso::parse($parser); + $asso = \Gedcom\Parser\Indi\Asso::parse($parser); $indi->addAsso($asso); break; case 'ALIA': @@ -152,28 +152,28 @@ public static function parse(\Gedcom\Parser $parser) $indi->setAfn(trim($record[2])); break; case 'REFN': - $ref = \Parser\Refn::parse($parser); + $ref = \Gedcom\Parser\Refn::parse($parser); $indi->addRefn($ref); break; case 'RIN': $indi->setRin(trim($record[2])); break; case 'CHAN': - $chan = \Parser\Chan::parse($parser); + $chan = \Gedcom\Parser\Chan::parse($parser); $indi->setChan($chan); break; case 'NOTE': - $note = \Parser\NoteRef::parse($parser); + $note = \Gedcom\Parser\NoteRef::parse($parser); if ($note) { $indi->addNote($note); } break; case 'SOUR': - $sour = \Parser\SourRef::parse($parser); + $sour = \Gedcom\Parser\SourRef::parse($parser); $indi->addSour($sour); break; case 'OBJE': - $obje = \Parser\ObjeRef::parse($parser); + $obje = \Gedcom\Parser\ObjeRef::parse($parser); $indi->addObje($obje); break; default: diff --git a/src/Parser/Indi/Asso.php b/src/Parser/Indi/Asso.php index 26d02d60..bbcb2e1c 100644 --- a/src/Parser/Indi/Asso.php +++ b/src/Parser/Indi/Asso.php @@ -46,11 +46,11 @@ public static function parse(\Gedcom\Parser $parser) $asso->setRela(trim($record[2])); break; case 'SOUR': - $sour = \Parser\SourRef::parse($parser); + $sour = \Gedcom\Parser\SourRef::parse($parser); $asso->addSour($sour); break; case 'NOTE': - $note = \Parser\NoteRef::parse($parser); + $note = \Gedcom\Parser\NoteRef::parse($parser); if ($note) { $asso->addNote($note); } diff --git a/src/Parser/Indi/Attr.php b/src/Parser/Indi/Attr.php index e1215014..350dde57 100644 --- a/src/Parser/Indi/Attr.php +++ b/src/Parser/Indi/Attr.php @@ -55,14 +55,14 @@ public static function parse(\Gedcom\Parser $parser) $attr->setDate(trim($record[2])); break; case 'PLAC': - $plac = \Parser\Indi\Even\Plac::parse($parser); + $plac = \Gedcom\Parser\Indi\Even\Plac::parse($parser); $attr->setPlac($plac); break; case 'ADDR': $attr->setAddr(\Parser\Addr::parse($parser)); break; case 'PHON': - $phone = \Parser\Phon::parse($parser); + $phone = \Gedcom\Parser\Phon::parse($parser); $attr->addPhon($phone); break; case 'CAUS': @@ -75,15 +75,15 @@ public static function parse(\Gedcom\Parser $parser) $attr->setAgnc(trim($record[2])); break; case 'SOUR': - $sour = \Parser\SourRef::parse($parser); + $sour = \Gedcom\Parser\SourRef::parse($parser); $attr->addSour($sour); break; case 'OBJE': - $obje = \Parser\ObjeRef::parse($parser); + $obje = \Gedcom\Parser\ObjeRef::parse($parser); $attr->addObje($obje); break; case 'NOTE': - $note = \Parser\NoteRef::parse($parser); + $note = \Gedcom\Parser\NoteRef::parse($parser); if ($note) { $attr->addNote($note); } diff --git a/src/Parser/Indi/Even.php b/src/Parser/Indi/Even.php index 638ffe82..9030ace0 100644 --- a/src/Parser/Indi/Even.php +++ b/src/Parser/Indi/Even.php @@ -14,7 +14,7 @@ namespace Gedcom\Parser\Indi; -use Gedcom\Parser\Chan; +use \Gedcom\Parser\Chan; class Even extends \Gedcom\Parser\Component { @@ -63,19 +63,19 @@ public static function parse(\Gedcom\Parser $parser) $even->setType(trim($record[2])); break; case 'DATE': - $dat = \Parser\Date::parse($parser); + $dat = \Gedcom\Parser\Date::parse($parser); $even->setDate($dat); //$even->setDate(trim($record[2])) break; case 'PLAC': - $plac = \Parser\Plac::parse($parser); + $plac = \Gedcom\Parser\Plac::parse($parser); $even->setPlac($plac); break; case 'ADDR': $even->setAddr(\Parser\Addr::parse($parser)); break; case 'PHON': - $phone = \Parser\Phon::parse($parser); + $phone = \Gedcom\Parser\Phon::parse($parser); $even->addPhone($phone); break; case 'CAUS': @@ -88,15 +88,15 @@ public static function parse(\Gedcom\Parser $parser) $even->setAgnc(trim($record[2])); break; case 'SOUR': - $sour = \Parser\SourRef::parse($parser); + $sour = \Gedcom\Parser\SourRef::parse($parser); $even->addSour($sour); break; case 'OBJE': - $obje = \Parser\ObjeRef::parse($parser); + $obje = \Gedcom\Parser\ObjeRef::parse($parser); $even->addObje($obje); break; case 'NOTE': - $note = \Parser\NoteRef::parse($parser); + $note = \Gedcom\Parser\NoteRef::parse($parser); if ($note) { $even->addNote($note); } diff --git a/src/Parser/Indi/Even/Plac.php b/src/Parser/Indi/Even/Plac.php index af002959..d0947847 100644 --- a/src/Parser/Indi/Even/Plac.php +++ b/src/Parser/Indi/Even/Plac.php @@ -44,13 +44,13 @@ public static function parse(\Gedcom\Parser $parser) $plac->setForm(trim($record[2])); break; case 'NOTE': - $note = \Parser\NoteRef::parse($parser); + $note = \Gedcom\Parser\NoteRef::parse($parser); if ($note) { $plac->addNote($note); } break; case 'SOUR': - $sour = \Parser\SourRef::parse($parser); + $sour = \Gedcom\Parser\SourRef::parse($parser); $plac->addSour($sour); break; default: diff --git a/src/Parser/Indi/Famc.php b/src/Parser/Indi/Famc.php index 8440e029..c50ecc3e 100644 --- a/src/Parser/Indi/Famc.php +++ b/src/Parser/Indi/Famc.php @@ -50,7 +50,7 @@ public static function parse(\Gedcom\Parser $parser) $fam->setPedi(trim($record[2])); break; case 'NOTE': - $note = \Parser\NoteRef::parse($parser); + $note = \Gedcom\Parser\NoteRef::parse($parser); if ($note) { $fam->addNote($note); } diff --git a/src/Parser/Indi/Fams.php b/src/Parser/Indi/Fams.php index 01d11752..71687986 100644 --- a/src/Parser/Indi/Fams.php +++ b/src/Parser/Indi/Fams.php @@ -47,7 +47,7 @@ public static function parse(\Gedcom\Parser $parser) switch ($recordType) { case 'NOTE': - $note = \Parser\NoteRef::parse($parser); + $note = \Gedcom\Parser\NoteRef::parse($parser); if ($note) { $fam->addNote($note); } diff --git a/src/Parser/Indi/Lds.php b/src/Parser/Indi/Lds.php index bf682844..b6bcbbb2 100644 --- a/src/Parser/Indi/Lds.php +++ b/src/Parser/Indi/Lds.php @@ -55,11 +55,11 @@ public static function parse(\Gedcom\Parser $parser) $lds->setTemp(trim($record[2])); break; case 'SOUR': - $sour = \Parser\SourRef::parse($parser); + $sour = \Gedcom\Parser\SourRef::parse($parser); $lds->addSour($sour); break; case 'NOTE': - $note = \Parser\NoteRef::parse($parser); + $note = \Gedcom\Parser\NoteRef::parse($parser); if ($note) { $lds->addNote($note); } diff --git a/src/Parser/Indi/Name.php b/src/Parser/Indi/Name.php index 61947a35..8105ee60 100644 --- a/src/Parser/Indi/Name.php +++ b/src/Parser/Indi/Name.php @@ -68,11 +68,11 @@ public static function parse(\Gedcom\Parser $parser) $name->setNsfx(trim($record[2])); break; case 'SOUR': - $sour = \Parser\SourRef::parse($parser); + $sour = \Gedcom\Parser\SourRef::parse($parser); $name->addSour($sour); break; case 'NOTE': - $note = \Parser\NoteRef::parse($parser); + $note = \Gedcom\Parser\NoteRef::parse($parser); if ($note) { $name->addNote($note); } diff --git a/src/Parser/Note.php b/src/Parser/Note.php index 47128567..6ee432c5 100644 --- a/src/Parser/Note.php +++ b/src/Parser/Note.php @@ -60,18 +60,18 @@ public static function parse(\Gedcom\Parser $parser) } break; case 'REFN': - $refn = \Parser\Refn::parse($parser); + $refn = \Gedcom\Parser\Refn::parse($parser); $note->addRefn($refn); break; case 'RIN': $note->setRin(trim($record[2])); break; case 'SOUR': - $sour = \Parser\SourRef::parse($parser); + $sour = \Gedcom\Parser\SourRef::parse($parser); $note->addSour($sour); break; case 'CHAN': - $chan = \Parser\Chan::parse($parser); + $chan = \Gedcom\Parser\Chan::parse($parser); $note->setChan($chan); break; default: diff --git a/src/Parser/NoteRef.php b/src/Parser/NoteRef.php index 389250fe..0bb2a2b0 100644 --- a/src/Parser/NoteRef.php +++ b/src/Parser/NoteRef.php @@ -53,7 +53,7 @@ public static function parse(\Gedcom\Parser $parser) switch ($recordType) { case 'SOUR': - $sour = \Parser\SourRef::parse($parser); + $sour = \Gedcom\Parser\SourRef::parse($parser); $note->addSour($sour); break; default: diff --git a/src/Parser/Obje.php b/src/Parser/Obje.php index 75d01c2a..c569d86b 100644 --- a/src/Parser/Obje.php +++ b/src/Parser/Obje.php @@ -50,7 +50,7 @@ public static function parse(\Gedcom\Parser $parser) $obje->setFile(trim($record[2])); break; case 'REFN': - $refn = \Parser\Refn::parse($parser); + $refn = \Gedcom\Parser\Refn::parse($parser); $obje->addRefn($refn); break; case 'RIN': @@ -58,18 +58,18 @@ public static function parse(\Gedcom\Parser $parser) break; case 'NOTE': - $note = \Parser\NoteRef::parse($parser); + $note = \Gedcom\Parser\NoteRef::parse($parser); if ($note) { $obje->addNote($note); } break; case 'SOUR': - $chan = \Parser\Chan::parse($parser); + $chan = \Gedcom\Parser\Chan::parse($parser); $obje->setChan($chan); break; case 'CHAN': - $chan = \Parser\Chan::parse($parser); + $chan = \Gedcom\Parser\Chan::parse($parser); $obje->setChan($chan); break; diff --git a/src/Parser/Plac.php b/src/Parser/Plac.php index 2940ee36..487ced99 100644 --- a/src/Parser/Plac.php +++ b/src/Parser/Plac.php @@ -48,20 +48,20 @@ public static function parse(\Gedcom\Parser $parser) $plac->setForm(trim($record[2])); break; case 'FONE': - $fone = \Parser\Plac\Fone::parse($parser); + $fone = \Gedcom\Parser\Plac\Fone::parse($parser); $plac->setFone($fone); break; case 'ROMN': - $romn = \Parser\Plac\Romn::parse($parser); + $romn = \Gedcom\Parser\Plac\Romn::parse($parser); $plac->setRomn($romn); break; case 'NOTE': - if ($note = \Parser\NoteRef::parse($parser)) { + if ($note = \Gedcom\Parser\NoteRef::parse($parser)) { $plac->addNote($note); } break; case 'MAP': - $map = \Parser\Plac\Map::parse($parser); + $map = \Gedcom\Parser\Plac\Map::parse($parser); $plac->setMap($map); break; default: diff --git a/src/Parser/Repo.php b/src/Parser/Repo.php index 77eeadb4..c8ce8bf8 100644 --- a/src/Parser/Repo.php +++ b/src/Parser/Repo.php @@ -50,7 +50,7 @@ public static function parse(\Gedcom\Parser $parser) $repo->setName(trim($record[2])); break; case 'ADDR': - $addr = \Parser\Addr::parse($parser); + $addr = \Gedcom\Parser\Addr::parse($parser); $repo->setAddr($addr); break; case 'PHON': @@ -66,19 +66,19 @@ public static function parse(\Gedcom\Parser $parser) $repo->addWww(trim($record[2])); break; case 'NOTE': - if ($note = \Parser\NoteRef::parse($parser)) { + if ($note = \Gedcom\Parser\NoteRef::parse($parser)) { $repo->addNote($note); } break; case 'REFN': - $refn = \Parser\Refn::parse($parser); + $refn = \Gedcom\Parser\Refn::parse($parser); $repo->addRefn($refn); break; case 'RIN': $repo->setRin(trim($record[2])); break; case 'CHAN': - $chan = \Parser\Chan::parse($parser); + $chan = \Gedcom\Parser\Chan::parse($parser); $repo->setChan($chan); break; default: diff --git a/src/Parser/RepoRef.php b/src/Parser/RepoRef.php index 013edc9a..48c154c3 100644 --- a/src/Parser/RepoRef.php +++ b/src/Parser/RepoRef.php @@ -48,7 +48,7 @@ public static function parse(\Gedcom\Parser $parser) $repo->addCaln(\Parser\Caln::parse($parser)); break; case 'NOTE': - $note = \Parser\NoteRef::parse($parser); + $note = \Gedcom\Parser\NoteRef::parse($parser); if ($note) { $repo->addNote($note); } diff --git a/src/Parser/Sour.php b/src/Parser/Sour.php index 728e7d56..cfc76b16 100644 --- a/src/Parser/Sour.php +++ b/src/Parser/Sour.php @@ -68,24 +68,24 @@ public static function parse(\Gedcom\Parser $parser) $sour->setRepo(\Parser\Sour\Repo::parse($parser)); break; case 'REFN': - $refn = \Parser\Refn::parse($parser); + $refn = \Gedcom\Parser\Refn::parse($parser); $sour->addRefn($refn); break; case 'RIN': $sour->setRin(trim($record[2])); break; case 'CHAN': - $chan = \Parser\Chan::parse($parser); + $chan = \Gedcom\Parser\Chan::parse($parser); $sour->setChan($chan); break; case 'NOTE': - $note = \Parser\NoteRef::parse($parser); + $note = \Gedcom\Parser\NoteRef::parse($parser); if ($note) { $sour->addNote($note); } break; case 'OBJE': - $obje = \Parser\ObjeRef::parse($parser); + $obje = \Gedcom\Parser\ObjeRef::parse($parser); $sour->addObje($obje); break; default: diff --git a/src/Parser/Sour/Data.php b/src/Parser/Sour/Data.php index 2e43544a..081f9c0e 100644 --- a/src/Parser/Sour/Data.php +++ b/src/Parser/Sour/Data.php @@ -46,7 +46,7 @@ public static function parse(\Gedcom\Parser $parser) $data->setAgnc(trim($record[2])); break; case 'NOTE': - $note = \Parser\NoteRef::parse($parser); + $note = \Gedcom\Parser\NoteRef::parse($parser); if ($note) { $data->addNote($note); } diff --git a/src/Parser/SourRef.php b/src/Parser/SourRef.php index 2a582821..389311dd 100644 --- a/src/Parser/SourRef.php +++ b/src/Parser/SourRef.php @@ -46,7 +46,7 @@ public static function parse(\Gedcom\Parser $parser) $sour->setPage(trim($record[2])); break; case 'EVEN': - $even = \Parser\SourRef\Even::parse($parser); + $even = \Gedcom\Parser\SourRef\Even::parse($parser); $sour->setEven($even); break; case 'DATA': @@ -56,13 +56,13 @@ public static function parse(\Gedcom\Parser $parser) $sour->setText($parser->parseMultiLineRecord()); break; case 'OBJE': - $obje = \Parser\ObjeRef::parse($parser); + $obje = \Gedcom\Parser\ObjeRef::parse($parser); if ($obje) { $sour->addNote($obje); } break; case 'NOTE': - $note = \Parser\NoteRef::parse($parser); + $note = \Gedcom\Parser\NoteRef::parse($parser); if ($note) { $sour->addNote($note); } diff --git a/src/Parser/Subm.php b/src/Parser/Subm.php index 13adbe7f..280df97e 100644 --- a/src/Parser/Subm.php +++ b/src/Parser/Subm.php @@ -50,7 +50,7 @@ public static function parse(\Gedcom\Parser $parser) $subm->setName(isset($record[2]) ? trim($record[2]) : ''); break; case 'ADDR': - $addr = \Parser\Addr::parse($parser); + $addr = \Gedcom\Parser\Addr::parse($parser); $subm->setAddr($addr); break; case 'PHON': @@ -70,17 +70,17 @@ public static function parse(\Gedcom\Parser $parser) $subm->addWww($www); break; case 'NOTE': - $note = \Parser\NoteRef::parse($parser); + $note = \Gedcom\Parser\NoteRef::parse($parser); if ($note) { $subm->addNote($note); } break; case 'OBJE': - $obje = \Parser\ObjeRef::parse($parser); + $obje = \Gedcom\Parser\ObjeRef::parse($parser); $subm->addObje($obje); break; case 'CHAN': - $chan = \Parser\Chan::parse($parser); + $chan = \Gedcom\Parser\Chan::parse($parser); $subm->setChan($chan); break; case 'RIN': diff --git a/src/Parser/Subn.php b/src/Parser/Subn.php index 79f8daa1..b2a8f93a 100644 --- a/src/Parser/Subn.php +++ b/src/Parser/Subn.php @@ -68,13 +68,13 @@ public static function parse(\Gedcom\Parser $parser) $subn->setRin(trim($record[2])); break; case 'NOTE': - $note = \Parser\NoteRef::parse($parser); + $note = \Gedcom\Parser\NoteRef::parse($parser); if ($note) { $subn->addNote($note); } break; case 'CHAN': - $chan = \Parser\Chan::parse($parser); + $chan = \Gedcom\Parser\Chan::parse($parser); $subn->setChan($chan); break; default: diff --git a/src/Record.php b/src/Record.php index 1ae4ea31..fed79144 100644 --- a/src/Record.php +++ b/src/Record.php @@ -22,11 +22,11 @@ public function __call($method, $args) $arr = strtolower(substr($method, 3)); if (!property_exists($this, '_'.$arr) || !is_array($this->{'_'.$arr})) { - throw new \Exception('Unknown '.get_class($this).'::'.$arr); + throw new \Gedcom\Exception('Unknown '.get_class($this).'::'.$arr); } if (!is_array($args)) { - throw new \Exception('Incorrect arguments to '.$method); + throw new \Gedcom\Exception('Incorrect arguments to '.$method); } if (!isset($args[0])) { @@ -45,11 +45,11 @@ public function __call($method, $args) $arr = strtolower(substr($method, 3)); if (!property_exists($this, '_'.$arr)) { - throw new \Exception('Unknown '.get_class($this).'::'.$arr); + throw new \Gedcom\Exception('Unknown '.get_class($this).'::'.$arr); } if (!is_array($args)) { - throw new \Exception('Incorrect arguments to '.$method); + throw new \Gedcom\Exception('Incorrect arguments to '.$method); } if (!isset($args[0])) { @@ -70,26 +70,26 @@ public function __call($method, $args) // hotfix getData if ('data' == $arr) { if (!property_exists($this, '_text')) { - throw new \Exception('Unknown '.get_class($this).'::'.$arr); + throw new \Gedcom\Exception('Unknown '.get_class($this).'::'.$arr); } return $this->{'_text'}; } if (!property_exists($this, '_'.$arr)) { - throw new \Exception('Unknown '.get_class($this).'::'.$arr); + throw new \Gedcom\Exception('Unknown '.get_class($this).'::'.$arr); } return $this->{'_'.$arr}; } else { - throw new \Exception('Unknown method called: '.$method); + throw new \Gedcom\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); + throw new \Gedcom\Exception('Undefined property '.get_class().'::'.$var); } /** diff --git a/src/Record/Addr.php b/src/Record/Addr.php index 3515e97d..8223b414 100644 --- a/src/Record/Addr.php +++ b/src/Record/Addr.php @@ -14,7 +14,7 @@ namespace Gedcom\Record; -use Record; +use \Gedcom\Record; /** * Class Addr. diff --git a/src/Record/Caln.php b/src/Record/Caln.php index d22fb96e..98ed34da 100644 --- a/src/Record/Caln.php +++ b/src/Record/Caln.php @@ -14,7 +14,7 @@ namespace Gedcom\Record; -use Record; +use \Gedcom\Record; /** * Class Caln. diff --git a/src/Record/Chan.php b/src/Record/Chan.php index fa918f6d..89ac85de 100644 --- a/src/Record/Chan.php +++ b/src/Record/Chan.php @@ -14,7 +14,7 @@ namespace Gedcom\Record; -use Record; +use \Gedcom\Record; /** * Class Chan. diff --git a/src/Record/Data.php b/src/Record/Data.php index 0435d633..1b48e3aa 100644 --- a/src/Record/Data.php +++ b/src/Record/Data.php @@ -14,7 +14,7 @@ namespace Gedcom\Record; -use Record; +use \Gedcom\Record; /** * Class Data. diff --git a/src/Record/Date.php b/src/Record/Date.php index ddfbd045..2761628b 100644 --- a/src/Record/Date.php +++ b/src/Record/Date.php @@ -14,7 +14,7 @@ namespace Gedcom\Record; -use Record; +use \Gedcom\Record; /** * Class Date. diff --git a/src/Record/Fam.php b/src/Record/Fam.php index b8eafe7f..575e9c00 100644 --- a/src/Record/Fam.php +++ b/src/Record/Fam.php @@ -60,7 +60,7 @@ public function getAllEven() } /** - * @return void|\Record\Fam\Even + * @return void|\Gedcom\Record\Fam\Even */ public function getEven($key = '') { diff --git a/src/Record/Head.php b/src/Record/Head.php index ffdc5873..5fab8814 100644 --- a/src/Record/Head.php +++ b/src/Record/Head.php @@ -14,7 +14,7 @@ namespace Gedcom\Record; -use Record; +use \Gedcom\Record; /** * Stores the data from the HEAD section of a GEDCOM 5.5 file. @@ -82,7 +82,7 @@ class Head extends \Gedcom\Record protected $note = null; /** - * @param \Record\Head\Sour $sour + * @param \Gedcom\Record\Head\Sour $sour * * @return Head */ @@ -94,7 +94,7 @@ public function setSour($sour = []) } /** - * @return \Record\Head\Sour + * @return \Gedcom\Record\Head\Sour */ public function getSour() { @@ -102,7 +102,7 @@ public function getSour() } /** - * @param \Record\Head\Date $date + * @param \Gedcom\Record\Head\Date $date * * @return Head */ @@ -114,7 +114,7 @@ public function setDate($date = []) } /** - * @return \Record\Head\Date + * @return \Gedcom\Record\Head\Date */ public function getDate() { @@ -122,7 +122,7 @@ public function getDate() } /** - * @param \Record\Head\Gedc $gedc + * @param \Gedcom\Record\Head\Gedc $gedc * * @return Head */ @@ -134,7 +134,7 @@ public function setGedc($gedc = []) } /** - * @return \Record\Head\Gedc + * @return \Gedcom\Record\Head\Gedc */ public function getGedc() { @@ -142,7 +142,7 @@ public function getGedc() } /** - * @param \Record\Head\Char $char + * @param \Gedcom\Record\Head\Char $char * * @return Head */ @@ -154,7 +154,7 @@ public function setChar($char = []) } /** - * @return \Record\Head\Char + * @return \Gedcom\Record\Head\Char */ public function getChar() { @@ -162,7 +162,7 @@ public function getChar() } /** - * @param \Record\Head\Plac $plac + * @param \Gedcom\Record\Head\Plac $plac * * @return Head */ @@ -174,7 +174,7 @@ public function setPlac($plac = []) } /** - * @return \Record\Head\Plac + * @return \Gedcom\Record\Head\Plac */ public function getPlac() { diff --git a/src/Record/Head/Sour.php b/src/Record/Head/Sour.php index 6f25f907..bd2a6974 100644 --- a/src/Record/Head/Sour.php +++ b/src/Record/Head/Sour.php @@ -43,7 +43,7 @@ public function getCorp() } /** - * @param \Record\Head\Sour\Data $data + * @param \Gedcom\Record\Head\Sour\Data $data */ public function setData($data = []) { @@ -51,7 +51,7 @@ public function setData($data = []) } /** - * @return \Record\Head\Sour\Data + * @return \Gedcom\Record\Head\Sour\Data */ public function getData() { diff --git a/src/Record/Indi.php b/src/Record/Indi.php index 75396bff..bce03a26 100644 --- a/src/Record/Indi.php +++ b/src/Record/Indi.php @@ -14,7 +14,7 @@ namespace Gedcom\Record; -use Record; +use \Gedcom\Record; /** @@ -312,7 +312,7 @@ public function getRefn() } /** - * @param \Record\NoteRef $note + * @param \Gedcom\Record\NoteRef $note * * @return Indi */ diff --git a/src/Record/Indi/Even.php b/src/Record/Indi/Even.php index 9f412673..fa81d105 100644 --- a/src/Record/Indi/Even.php +++ b/src/Record/Indi/Even.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\Indi; -use Record; +use \Gedcom\Record; /** * Class Even. @@ -172,7 +172,7 @@ public function addNote($note = []) } /** - * @param \Record\Addr $addr + * @param \Gedcom\Record\Addr $addr * * @return Even */ @@ -184,7 +184,7 @@ public function setAddr($addr = []) } /** - * @return \Record\Addr + * @return \Gedcom\Record\Addr */ public function getAddr() { @@ -272,7 +272,7 @@ public function getDate() } /** - * @param \Record\Indi\Even\Plac $plac + * @param \Gedcom\Record\Indi\Even\Plac $plac * * @return Even */ @@ -284,7 +284,7 @@ public function setPlac($plac = []) } /** - * @return \Record\Indi\Even\Plac + * @return \Gedcom\Record\Indi\Even\Plac */ public function getPlac() { diff --git a/src/Record/Indi/Even/Plac.php b/src/Record/Indi/Even/Plac.php index c2c6ae33..9b234317 100644 --- a/src/Record/Indi/Even/Plac.php +++ b/src/Record/Indi/Even/Plac.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\Indi\Even; -use Record; +use \Gedcom\Record; /** * Class Plac. diff --git a/src/Record/Indi/Name.php b/src/Record/Indi/Name.php index 60101e81..10ca61d0 100644 --- a/src/Record/Indi/Name.php +++ b/src/Record/Indi/Name.php @@ -23,7 +23,7 @@ * @method string getSurn() * @method string getNsfx() */ -class Name extends \Gedcom\Record implements \Record\Sourceable +class Name extends \Gedcom\Record implements \Gedcom\Record\Sourceable { protected $_name = null; protected $_npfx = null; @@ -32,7 +32,7 @@ class Name extends \Gedcom\Record implements \Record\Sourceable protected $_spfx = null; protected $_surn = null; protected $_nsfx = null; - protected $_fone = null; // PhpGedcom/ + protected $_fone = null; // Gedcom/ protected $_romn = null; protected $_type = null; diff --git a/src/Record/Indi/Name/Fone.php b/src/Record/Indi/Name/Fone.php index 6c2d177c..2d9f8f5a 100644 --- a/src/Record/Indi/Name/Fone.php +++ b/src/Record/Indi/Name/Fone.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\Indi\Name; -use Record; +use \Gedcom\Record; /** * Class Refn. diff --git a/src/Record/Indi/Name/Romn.php b/src/Record/Indi/Name/Romn.php index 9a7747af..05296dee 100644 --- a/src/Record/Indi/Name/Romn.php +++ b/src/Record/Indi/Name/Romn.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\Indi\Name; -use Record; +use \Gedcom\Record; /** * Class Refn. diff --git a/src/Record/ObjeRef/File.php b/src/Record/ObjeRef/File.php index aed79d84..973b2c48 100644 --- a/src/Record/ObjeRef/File.php +++ b/src/Record/ObjeRef/File.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\ObjeRef; -use Record; +use \Gedcom\Record; /** * Class Refn. diff --git a/src/Record/ObjeRef/File/Form.php b/src/Record/ObjeRef/File/Form.php index 571f0273..5d696ea4 100644 --- a/src/Record/ObjeRef/File/Form.php +++ b/src/Record/ObjeRef/File/Form.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\ObjeRef\File; -use Record; +use \Gedcom\Record; /** * Class Refn. diff --git a/src/Record/Phon.php b/src/Record/Phon.php index 80539c45..0d69e138 100644 --- a/src/Record/Phon.php +++ b/src/Record/Phon.php @@ -14,7 +14,7 @@ namespace Gedcom\Record; -use Record; +use \Gedcom\Record; /** * Class Phon. diff --git a/src/Record/Plac/Fone.php b/src/Record/Plac/Fone.php index 2c891e8d..b4428164 100644 --- a/src/Record/Plac/Fone.php +++ b/src/Record/Plac/Fone.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\Plac; -use Record; +use \Gedcom\Record; /** * Class Refn. diff --git a/src/Record/Plac/Map.php b/src/Record/Plac/Map.php index cd6018dc..a7afea63 100644 --- a/src/Record/Plac/Map.php +++ b/src/Record/Plac/Map.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\Plac; -use Record; +use \Gedcom\Record; /** * Class Refn. diff --git a/src/Record/Plac/Romn.php b/src/Record/Plac/Romn.php index 21710e4d..c35f2ed7 100644 --- a/src/Record/Plac/Romn.php +++ b/src/Record/Plac/Romn.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\Plac; -use Record; +use \Gedcom\Record; /** * Class Refn. diff --git a/src/Record/Refn.php b/src/Record/Refn.php index db368f12..8eff0345 100644 --- a/src/Record/Refn.php +++ b/src/Record/Refn.php @@ -14,7 +14,7 @@ namespace Gedcom\Record; -use Record; +use \Gedcom\Record; /** * Class Refn. diff --git a/src/Record/Repo.php b/src/Record/Repo.php index 85418fbc..7d052013 100644 --- a/src/Record/Repo.php +++ b/src/Record/Repo.php @@ -19,7 +19,7 @@ /** * Class Repo. */ -class Repo extends Record implements Noteable +class Repo extends \Gedcom\Record implements Noteable { /** * @var string @@ -153,7 +153,7 @@ public function getWww() } /** - * @param null|\Record\Refn $refn + * @param null|\Gedcom\Record\Refn $refn * * @return Repo */ @@ -176,7 +176,7 @@ public function getRefn() } /** - * @param null|\Record\NoteRef $note + * @param null|\Gedcom\Record\NoteRef $note * * @return Repo */ @@ -239,7 +239,7 @@ public function getName() } /** - * @param null|\Record\Addr $addr + * @param null|\Gedcom\Record\Addr $addr * * @return Repo */ @@ -254,7 +254,7 @@ public function setAddr($addr = null) } /** - * @return \Record\Addr + * @return \Gedcom\Record\Addr */ public function getAddr() { @@ -282,7 +282,7 @@ public function getRin() } /** - * @param \Record\Chan $chan + * @param \Gedcom\Record\Chan $chan * * @return Repo */ @@ -294,7 +294,7 @@ public function setChan($chan = []) } /** - * @return \Record\Chan + * @return \Gedcom\Record\Chan */ public function getChan() { diff --git a/src/Record/Sour.php b/src/Record/Sour.php index 09350453..e8a8ffbf 100644 --- a/src/Record/Sour.php +++ b/src/Record/Sour.php @@ -14,7 +14,7 @@ namespace Gedcom\Record; -use Record; +use \Gedcom\Record; /** * Class Sour. @@ -187,7 +187,7 @@ public function getPubl() } /** - * @param \Record\Repo $repo + * @param \Gedcom\Record\Repo $repo * * @return Sour */ @@ -199,7 +199,7 @@ public function setRepo($repo) } /** - * @return \Record\Repo + * @return \Gedcom\Record\Repo */ public function getRepo() { @@ -267,7 +267,7 @@ public function getRin() } /** - * @param \Record\Chan $chan + * @param \Gedcom\Record\Chan $chan * * @return Sour */ @@ -279,7 +279,7 @@ public function setChan($chan = []) } /** - * @return \Record\Chan + * @return \Gedcom\Record\Chan */ public function getChan() { diff --git a/src/Record/Subm.php b/src/Record/Subm.php index 39f9d21c..4de88281 100644 --- a/src/Record/Subm.php +++ b/src/Record/Subm.php @@ -14,7 +14,7 @@ namespace Gedcom\Record; -use Record; +use \Gedcom\Record; /** * Class Subm. @@ -259,7 +259,7 @@ public function getRin() } /** - * @param \Record\Chan $chan + * @param \Gedcom\Record\Chan $chan * * @return Subm */ @@ -271,7 +271,7 @@ public function setChan($chan = []) } /** - * @return \Record\Chan + * @return \Gedcom\Record\Chan */ public function getChan() { diff --git a/src/Record/Subn.php b/src/Record/Subn.php index b8d1b065..49aa9f87 100644 --- a/src/Record/Subn.php +++ b/src/Record/Subn.php @@ -14,7 +14,7 @@ namespace Gedcom\Record; -use Record; +use \Gedcom\Record; /** * Class Subn. @@ -67,7 +67,7 @@ class Subn extends \Gedcom\Record protected $_note = []; /** - * @var \Record\Chan + * @var \Gedcom\Record\Chan */ protected $_chan = null; diff --git a/src/Writer.php b/src/Writer.php index 7e6ca21f..0ed3bdbf 100644 --- a/src/Writer.php +++ b/src/Writer.php @@ -14,15 +14,15 @@ namespace Gedcom; -use Gedcom\Writer\Fam; -use Gedcom\Writer\Head; -use Gedcom\Writer\Indi; -use Gedcom\Writer\Note; -use Gedcom\Writer\Obje; -use Gedcom\Writer\Repo; -use Gedcom\Writer\Sour; -use Gedcom\Writer\Subm; -use Gedcom\Writer\Subn; +use \Gedcom\Writer\Fam; +use \Gedcom\Writer\Head; +use \Gedcom\Writer\Indi; +use \Gedcom\Writer\Note; +use \Gedcom\Writer\Obje; +use \Gedcom\Writer\Repo; +use \Gedcom\Writer\Sour; +use \Gedcom\Writer\Subm; +use \Gedcom\Writer\Subn; class Writer { @@ -31,7 +31,7 @@ class Writer protected $_output = null; /** - * @param \Gedcom\Gedcom $gedcom The GEDCOM object + * @param $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 diff --git a/src/Writer/Addr.php b/src/Writer/Addr.php index 955a8e1a..deef3b95 100644 --- a/src/Writer/Addr.php +++ b/src/Writer/Addr.php @@ -17,13 +17,13 @@ class Addr { /** - * @param \Record\Addr $addr + * @param \Gedcom\Record\Addr $addr * @param string $format * @param int $level * * @return string */ - public static function convert(\Record\Addr &$addr, $format = self::GEDCOM55, $level = 1) + public static function convert (\Gedcom\Record\Addr &$addr, $format = self::GEDCOM55, $level = 1) { $addrs = explode("\n", $addr->getAddr()); diff --git a/src/Writer/Caln.php b/src/Writer/Caln.php index db7f21cc..2ac06323 100644 --- a/src/Writer/Caln.php +++ b/src/Writer/Caln.php @@ -17,12 +17,12 @@ class Caln { /** - * @param \Record\Caln $note + * @param \Gedcom\Record\Caln $note * @param int $level * * @return string */ - public static function convert(\Record\Caln &$caln, $level) + public static function convert (\Gedcom\Record\Caln &$caln, $level) { $output = ''; $_caln = $caln->getCaln(); diff --git a/src/Writer/Chan.php b/src/Writer/Chan.php index a3f82b1b..cee57f69 100644 --- a/src/Writer/Chan.php +++ b/src/Writer/Chan.php @@ -17,12 +17,12 @@ class Chan { /** - * @param \Record\Chan $note + * @param \Gedcom\Record\Chan $note * @param int $level * * @return string */ - public static function convert(\Record\Chan &$chan, $level) + public static function convert (\Gedcom\Record\Chan &$chan, $level) { $output = $level." CHAN \n"; // level up @@ -41,7 +41,7 @@ public static function convert(\Record\Chan &$chan, $level) $_note = $chan->getNote(); if (!empty($_note) && count($_note) > 0) { foreach ($_note as $item) { - $_convert = \Writer\NoteRef::convert($item, $level); + $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); $output .= $_convert; } } diff --git a/src/Writer/Fam.php b/src/Writer/Fam.php index 9a3d7d3c..046cfe39 100644 --- a/src/Writer/Fam.php +++ b/src/Writer/Fam.php @@ -17,12 +17,12 @@ class Fam { /** - * @param \Record\Fam $sour + * @param \Gedcom\Record\Fam $sour * @param int $level * * @return string */ - public static function convert(\Record\Fam &$fam, $level = 0) + public static function convert (\Gedcom\Record\Fam &$fam, $level = 0) { $output = ''; $id = $fam->getId(); @@ -81,14 +81,14 @@ public static function convert(\Record\Fam &$fam, $level = 0) // CHAN $chan = $fam->getChan(); if (!empty($chan)) { - $_convert = \Writer\Chan::convert($chan, $level); + $_convert = \Gedcom\Writer\Chan::convert($chan, $level); $output .= $_convert; } // SLGS $slgs = $fam->getSlgs(); if (!empty($slgs) && count($slgs) > 0) { if ($slgs) { - $_convert = \Writer\Fam\Slgs::convert($item, $level); + $_convert = \Gedcom\Writer\Fam\Slgs::convert($item, $level); $output .= $_convert; } } @@ -98,7 +98,7 @@ public static function convert(\Record\Fam &$fam, $level = 0) if (!empty($refn) && count($refn) > 0) { foreach ($refn as $item) { if ($item) { - $_convert = \Writer\Refn::convert($item, $level); + $_convert = \Gedcom\Writer\Refn::convert($item, $level); $output .= $_convert; } } @@ -109,7 +109,7 @@ public static function convert(\Record\Fam &$fam, $level = 0) if (!empty($note) && count($note) > 0) { foreach ($note as $item) { if ($item) { - $_convert = \Writer\NoteRef::convert($item, $level); + $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); $output .= $_convert; } } @@ -120,7 +120,7 @@ public static function convert(\Record\Fam &$fam, $level = 0) if (!empty($sour) && count($sour) > 0) { foreach ($sour as $item) { if ($item) { - $_convert = \Writer\SourRef::convert($item, $level); + $_convert = \Gedcom\Writer\SourRef::convert($item, $level); $output .= $_convert; } } @@ -131,7 +131,7 @@ public static function convert(\Record\Fam &$fam, $level = 0) if (!empty($obje) && count($obje) > 0) { foreach ($obje as $item) { if ($item) { - $_convert = \Writer\ObjeRef::convert($item, $level); + $_convert = \Gedcom\Writer\ObjeRef::convert($item, $level); $output .= $_convert; } } @@ -142,7 +142,7 @@ public static function convert(\Record\Fam &$fam, $level = 0) if (!empty($even) && count($even) > 0) { foreach ($even as $item) { if ($item) { - $_convert = \Writer\Fam\Even::convert($item, $level); + $_convert = \Gedcom\Writer\Fam\Even::convert($item, $level); $output .= $_convert; } } diff --git a/src/Writer/Fam/Even.php b/src/Writer/Fam/Even.php index 518c66ec..23354236 100644 --- a/src/Writer/Fam/Even.php +++ b/src/Writer/Fam/Even.php @@ -17,12 +17,12 @@ class Even { /** - * @param \Record\Fam\Even $even + * @param \Gedcom\Record\Fam\Even $even * @param int $level * * @return string */ - public static function convert(\Record\Fam\Even &$even, $level) + public static function convert (\Gedcom\Record\Fam\Even &$even, $level) { $output = ''; @@ -50,7 +50,7 @@ public static function convert(\Record\Fam\Even &$even, $level) // Plac $plac = $even->getPlac(); if (!empty($plac)) { - $_convert = \Writer\Indi\Even\Plac::convert($plac, $level); + $_convert = \Gedcom\Writer\Indi\Even\Plac::convert($plac, $level); $output .= $_convert; } @@ -69,7 +69,7 @@ public static function convert(\Record\Fam\Even &$even, $level) // $addr $addr = $even->getAddr(); if (!empty($addr)) { - $_convert = \Writer\Addr::convert($addr, $level); + $_convert = \Gedcom\Writer\Addr::convert($addr, $level); $output .= $_convert; } @@ -77,7 +77,7 @@ public static function convert(\Record\Fam\Even &$even, $level) $phon = $even->getPhon(); if (!empty($phon) && count($phon) > 0) { foreach ($phon as $item) { - $_convert = \Writer\Phon::convert($item, $level); + $_convert = \Gedcom\Writer\Phon::convert($item, $level); $output .= $_convert; } } @@ -90,14 +90,14 @@ public static function convert(\Record\Fam\Even &$even, $level) // HUSB $husb = $even->getHusb(); if (!empty($husb)) { - $_convert = \Writer\Fam\Even\Husb::convert($husb, $level); + $_convert = \Gedcom\Writer\Fam\Even\Husb::convert($husb, $level); $output .= $_convert; } // WIFE $wife = $even->getWife(); if (!empty($wife)) { - $_convert = \Writer\Fam\Even\Wife::convert($wife, $level); + $_convert = \Gedcom\Writer\Fam\Even\Wife::convert($wife, $level); $output .= $_convert; } @@ -108,7 +108,7 @@ public static function convert(\Record\Fam\Even &$even, $level) $obje = $even->getObje(); if (!empty($obje) && count($obje) > 0) { foreach ($obje as $item) { - $_convert = \Writer\ObjeRef::convert($item, $level); + $_convert = \Gedcom\Writer\ObjeRef::convert($item, $level); $output .= $_convert; } } @@ -116,7 +116,7 @@ public static function convert(\Record\Fam\Even &$even, $level) $sour = $even->getSour(); if (!empty($sour) && count($sour) > 0) { foreach ($sour as $item) { - $_convert = \Writer\SourRef::convert($item, $level); + $_convert = \Gedcom\Writer\SourRef::convert($item, $level); $output .= $_convert; } } @@ -124,7 +124,7 @@ public static function convert(\Record\Fam\Even &$even, $level) $note = $even->getNote(); if (!empty($note) && count($note) > 0) { foreach ($note as $item) { - $_convert = \Writer\NoteRef::convert($item, $level); + $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); $output .= $_convert; } } diff --git a/src/Writer/Fam/Even/Husb.php b/src/Writer/Fam/Even/Husb.php index ec14911b..4dec8364 100644 --- a/src/Writer/Fam/Even/Husb.php +++ b/src/Writer/Fam/Even/Husb.php @@ -17,12 +17,12 @@ class Husb { /** - * @param \Record\Fam\Even\Husb $attr + * @param \Gedcom\Record\Fam\Even\Husb $attr * @param int $level * * @return string */ - public static function convert(\Record\Fam\Even\Husb &$husb, $level = 0) + public static function convert (\Gedcom\Record\Fam\Even\Husb &$husb, $level = 0) { $output = ''; diff --git a/src/Writer/Fam/Even/Wife.php b/src/Writer/Fam/Even/Wife.php index 65059df6..9e85ba7b 100644 --- a/src/Writer/Fam/Even/Wife.php +++ b/src/Writer/Fam/Even/Wife.php @@ -17,12 +17,12 @@ class Wife { /** - * @param \Record\Fam\Even\Wife $attr + * @param \Gedcom\Record\Fam\Even\Wife $attr * @param int $level * * @return string */ - public static function convert(\Record\Fam\Even\Wife &$wife, $level = 0) + public static function convert (\Gedcom\Record\Fam\Even\Wife &$wife, $level = 0) { $output = ''; diff --git a/src/Writer/Fam/Slgs.php b/src/Writer/Fam/Slgs.php index 95727b05..108d38e3 100644 --- a/src/Writer/Fam/Slgs.php +++ b/src/Writer/Fam/Slgs.php @@ -17,12 +17,12 @@ class Slgs { /** - * @param \Record\Fam\Slgs $slgs + * @param \Gedcom\Record\Fam\Slgs $slgs * @param int $level * * @return string */ - public static function convert(\Record\Fam\Slgs &$slgs, $level) + public static function convert (\Gedcom\Record\Fam\Slgs &$slgs, $level) { $output = ''; $output .= $level." SLGS \n"; @@ -58,7 +58,7 @@ public static function convert(\Record\Fam\Slgs &$slgs, $level) $sour = $slgs->getSour(); if (!empty($sour) && count($sour) > 0) { foreach ($sour as $item) { - $_convert = \Writer\SourRef::convert($item, $level); + $_convert = \Gedcom\Writer\SourRef::convert($item, $level); $output .= $_convert; } } @@ -66,7 +66,7 @@ public static function convert(\Record\Fam\Slgs &$slgs, $level) $note = $slgs->getNote(); if (!empty($note) && count($note) > 0) { foreach ($note as $item) { - $_convert = \Writer\NoteRef::convert($item, $level); + $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); $output .= $_convert; } } diff --git a/src/Writer/Head.php b/src/Writer/Head.php index 38e310b8..440028f0 100644 --- a/src/Writer/Head.php +++ b/src/Writer/Head.php @@ -17,12 +17,12 @@ class Head { /** - * @param \Record\Head $head + * @param \Gedcom\Record\Head $head * @param string $format * * @return string */ - public static function convert(\Record\Head &$head, $format = self::GEDCOM55) + public static function convert (\Gedcom\Record\Head &$head, $format = self::GEDCOM55) { $level = 0; $output = $level." HEAD\n"; @@ -33,7 +33,7 @@ public static function convert(\Record\Head &$head, $format = self::GEDCOM55) //SOUR $sour = $head->getSour(); if ($sour) { - $_convert = \Writer\Head\Sour::convert($sour, $level); + $_convert = \Gedcom\Writer\Head\Sour::convert($sour, $level); $output .= $_convert; } @@ -75,27 +75,27 @@ public static function convert(\Record\Head &$head, $format = self::GEDCOM55) // DATE $date = $head->getDate(); if ($date) { - $_convert = \Writer\Head\Date::convert($date, $level); + $_convert = \Gedcom\Writer\Head\Date::convert($date, $level); $output .= $_convert; } // GEDC $gedc = $head->getGedc(); if ($gedc) { - $_convert = \Writer\Head\Gedc::convert($gedc, $level); + $_convert = \Gedcom\Writer\Head\Gedc::convert($gedc, $level); $output .= $_convert; } // CHAR $char = $head->getChar(); if ($char) { - $_convert = \Writer\Head\Char::convert($char, $level); + $_convert = \Gedcom\Writer\Head\Char::convert($char, $level); $output .= $_convert; } // PLAC $plac = $head->getPlac(); if ($plac) { - $_convert = \Writer\Head\Plac::convert($plac, $level); + $_convert = \Gedcom\Writer\Head\Plac::convert($plac, $level); $output .= $_convert; } diff --git a/src/Writer/Head/Char.php b/src/Writer/Head/Char.php index 38dd35bb..b11aa694 100644 --- a/src/Writer/Head/Char.php +++ b/src/Writer/Head/Char.php @@ -17,13 +17,13 @@ class Char { /** - * @param \Record\Head\Char $char + * @param \Gedcom\Record\Head\Char $char * @param string $format * @param int $level * * @return string */ - public static function convert(\Record\Head\Char &$char, $level) + public static function convert (\Gedcom\Record\Head\Char &$char, $level) { $output = ''; // char diff --git a/src/Writer/Head/Date.php b/src/Writer/Head/Date.php index 11909c57..b5abe28a 100644 --- a/src/Writer/Head/Date.php +++ b/src/Writer/Head/Date.php @@ -17,13 +17,13 @@ class Date { /** - * @param \Record\Head\Date $date + * @param \Gedcom\Record\Head\Date $date * @param string $format * @param int $level * * @return string */ - public static function convert(\Record\Head\Date &$date, $level) + public static function convert (\Gedcom\Record\Head\Date &$date, $level) { $output = ''; $_date = $date->getDate(); diff --git a/src/Writer/Head/Gedc.php b/src/Writer/Head/Gedc.php index ddea7755..5d850119 100644 --- a/src/Writer/Head/Gedc.php +++ b/src/Writer/Head/Gedc.php @@ -17,13 +17,13 @@ class Gedc { /** - * @param \Record\Head\Gedc $gedc + * @param \Gedcom\Record\Head\Gedc $gedc * @param string $format * @param int $level * * @return string */ - public static function convert(\Record\Head\Gedc &$gedc, $level) + public static function convert (\Gedcom\Record\Head\Gedc &$gedc, $level) { $output = $level." GEDC \n"; diff --git a/src/Writer/Head/Plac.php b/src/Writer/Head/Plac.php index 46baeb2c..7717fc80 100644 --- a/src/Writer/Head/Plac.php +++ b/src/Writer/Head/Plac.php @@ -17,13 +17,13 @@ class Plac { /** - * @param \Record\Head\Plac $plac + * @param \Gedcom\Record\Head\Plac $plac * @param string $format * @param int $level * * @return string */ - public static function convert(\Record\Head\Plac &$plac, $level) + public static function convert (\Gedcom\Record\Head\Plac &$plac, $level) { $output = $level." PLAC \n"; diff --git a/src/Writer/Head/Sour.php b/src/Writer/Head/Sour.php index 9a692ccf..79786a8a 100644 --- a/src/Writer/Head/Sour.php +++ b/src/Writer/Head/Sour.php @@ -17,13 +17,13 @@ class Sour { /** - * @param \Record\Head\Sour $sour + * @param \Gedcom\Record\Head\Sour $sour * @param string $format * @param int $level * * @return string */ - public static function convert(\Record\Head\Sour &$sour, $level) + public static function convert (\Gedcom\Record\Head\Sour &$sour, $level) { $output = ''; $_sour = $sour->getSour(); @@ -51,14 +51,14 @@ public static function convert(\Record\Head\Sour &$sour, $level) // CORP $corp = $sour->getCorp(); if ($corp) { - $_convert = \Writer\Head\Sour\Corp::convert($corp, $level); + $_convert = \Gedcom\Writer\Head\Sour\Corp::convert($corp, $level); $output .= $_convert; } // DATA $data = $sour->getData(); if ($data) { - $_convert = \Writer\Head\Sour\Data::convert($data, $level); + $_convert = \Gedcom\Writer\Head\Sour\Data::convert($data, $level); $output .= $_convert; } diff --git a/src/Writer/Head/Sour/Corp.php b/src/Writer/Head/Sour/Corp.php index 10dac0b6..21a68124 100644 --- a/src/Writer/Head/Sour/Corp.php +++ b/src/Writer/Head/Sour/Corp.php @@ -17,13 +17,13 @@ class Corp { /** - * @param \Record\Head\Sour\Corp $corp + * @param \Gedcom\Record\Head\Sour\Corp $corp * @param string $format * @param int $level * * @return string */ - public static function convert(\Record\Head\Sour\Corp &$corp, $level) + public static function convert (\Gedcom\Record\Head\Sour\Corp &$corp, $level) { $output = ''; $_corp = $corp->getCorp(); @@ -39,7 +39,7 @@ public static function convert(\Record\Head\Sour\Corp &$corp, $level) // ADDR $addr = $corp->getAddr(); if ($addr) { - $_convert = \Writer\Addr::convert($addr, $level); + $_convert = \Gedcom\Writer\Addr::convert($addr, $level); $output .= $_convert; } @@ -48,7 +48,7 @@ public static function convert(\Record\Head\Sour\Corp &$corp, $level) if ($phon && count($phon) > 0) { foreach ($phon as $item) { if ($item) { - $_convert = \Writer\Phon::convert($item, $level); + $_convert = \Gedcom\Writer\Phon::convert($item, $level); $output .= $_convert; } } diff --git a/src/Writer/Head/Sour/Data.php b/src/Writer/Head/Sour/Data.php index 17097756..a9aedcab 100644 --- a/src/Writer/Head/Sour/Data.php +++ b/src/Writer/Head/Sour/Data.php @@ -17,13 +17,13 @@ class Data { /** - * @param \Record\Head\Sour\Data $data + * @param \Gedcom\Record\Head\Sour\Data $data * @param string $format * @param int $level * * @return string */ - public static function convert(\Record\Head\Sour\Data &$data, $level) + public static function convert (\Gedcom\Record\Head\Sour\Data &$data, $level) { $output = ''; $_data = $data->getData(); diff --git a/src/Writer/Indi.php b/src/Writer/Indi.php index 28bc8cd5..d2f26dc6 100644 --- a/src/Writer/Indi.php +++ b/src/Writer/Indi.php @@ -17,12 +17,12 @@ class Indi { /** - * @param \Record\Indi $indi + * @param \Gedcom\Record\Indi $indi * @param string $format * * @return string */ - public static function convert(\Record\Indi &$indi) + public static function convert (\Gedcom\Record\Indi &$indi) { $level = 0; @@ -46,12 +46,12 @@ public static function convert(\Record\Indi &$indi) } // $attr - // PhpGedcom/Record/Attr extend PhpGedcom/Record/Even and there is no change. + // Gedcom/Record/Attr extend Gedcom/Record/Even and there is no change. // So used convert Even $attr = $indi->getAllAttr(); if (!empty($attr) && count($attr) > 0) { foreach ($attr as $item) { - $_convert = \Writer\Indi\Even::convert($item, $level); + $_convert = \Gedcom\Writer\Indi\Even::convert($item, $level); $output .= $_convert; } } @@ -60,7 +60,7 @@ public static function convert(\Record\Indi &$indi) $even = $indi->getAllEven(); if (!empty($even) && count($even) > 0) { foreach ($even as $item) { - $_convert = \Writer\Indi\Even::convert($item, $level); + $_convert = \Gedcom\Writer\Indi\Even::convert($item, $level); $output .= $_convert; } } @@ -70,7 +70,7 @@ public static function convert(\Record\Indi &$indi) $note = $indi->getNote(); if (!empty($note) && count($note) > 0) { foreach ($note as $item) { - $_convert = \Writer\NoteRef::convert($item, $level); + $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); $output .= $_convert; } } @@ -79,7 +79,7 @@ public static function convert(\Record\Indi &$indi) $obje = $indi->getObje(); if (!empty($obje) && count($obje) > 0) { foreach ($obje as $item) { - $_convert = \Writer\ObjeRef::convert($item, $level); + $_convert = \Gedcom\Writer\ObjeRef::convert($item, $level); $output .= $_convert; } } @@ -88,7 +88,7 @@ public static function convert(\Record\Indi &$indi) $sour = $indi->getSour(); if (!empty($sour) && count($sour) > 0) { foreach ($sour as $item) { - $_convert = \Writer\SourRef::convert($item, $level); + $_convert = \Gedcom\Writer\SourRef::convert($item, $level); $output .= $_convert; } } @@ -97,7 +97,7 @@ public static function convert(\Record\Indi &$indi) $name = $indi->getName(); if (!empty($name) && count($name) > 0) { foreach ($name as $item) { - $_convert = \Writer\Indi\Name::convert($item, $level); + $_convert = \Gedcom\Writer\Indi\Name::convert($item, $level); $output .= $_convert; } } @@ -147,7 +147,7 @@ public static function convert(\Record\Indi &$indi) $fams = $indi->getFams(); if (!empty($fams) && count($fams) > 0) { foreach ($fams as $item) { - $_convert = \Writer\Indi\Fams::convert($item, $level); + $_convert = \Gedcom\Writer\Indi\Fams::convert($item, $level); $output .= $_convert; } } @@ -156,7 +156,7 @@ public static function convert(\Record\Indi &$indi) $famc = $indi->getFamc(); if (!empty($famc) && count($famc) > 0) { foreach ($famc as $item) { - $_convert = \Writer\Indi\Famc::convert($item, $level); + $_convert = \Gedcom\Writer\Indi\Famc::convert($item, $level); $output .= $_convert; } } @@ -165,7 +165,7 @@ public static function convert(\Record\Indi &$indi) $asso = $indi->getAsso(); if (!empty($asso) && count($asso) > 0) { foreach ($asso as $item) { - $_convert = \Writer\Indi\Asso::convert($item, $level); + $_convert = \Gedcom\Writer\Indi\Asso::convert($item, $level); $output .= $_convert; } } @@ -203,7 +203,7 @@ public static function convert(\Record\Indi &$indi) $refn = $indi->getRefn(); if (!empty($refn) && count($refn) > 0) { foreach ($refn as $item) { - $_convert = \Writer\Refn::convert($item, $level); + $_convert = \Gedcom\Writer\Refn::convert($item, $level); $output .= $_convert; } } @@ -212,7 +212,7 @@ public static function convert(\Record\Indi &$indi) // Currently Bapl is empty // $bapl = $indi->getBapl(); // if(!empty($bapl)){ - // $_convert = \Writer\Indi\Bapl::convert($bapl, $level); + // $_convert = \Gedcom\Writer\Indi\Bapl::convert($bapl, $level); // $output.=$_convert; // } @@ -220,7 +220,7 @@ public static function convert(\Record\Indi &$indi) // Currently Conl is empty // $conl = $indi->getConl(); // if(!empty($conl)){ - // $_convert = \Writer\Indi\Conl::convert($conl, $level); + // $_convert = \Gedcom\Writer\Indi\Conl::convert($conl, $level); // $output.=$_convert; // } @@ -228,7 +228,7 @@ public static function convert(\Record\Indi &$indi) // Currently Endl is empty // $endl = $indi->getEndl(); // if(!empty($endl)){ - // $_convert = \Writer\Indi\Endl::convert($endl, $level); + // $_convert = \Gedcom\Writer\Indi\Endl::convert($endl, $level); // $output.=$_convert; // } @@ -236,7 +236,7 @@ public static function convert(\Record\Indi &$indi) // Currently Endl is empty // $slgc = $indi->getSlgc(); // if(!empty($slgc)){ - // $_convert = \Writer\Indi\Slgc::convert($slgc, $level); + // $_convert = \Gedcom\Writer\Indi\Slgc::convert($slgc, $level); // $output.=$_convert; // } diff --git a/src/Writer/Indi/Asso.php b/src/Writer/Indi/Asso.php index cf862f8c..fe8d5e41 100644 --- a/src/Writer/Indi/Asso.php +++ b/src/Writer/Indi/Asso.php @@ -17,12 +17,12 @@ class Asso { /** - * @param \Record\Indi\Asso $attr + * @param \Gedcom\Record\Indi\Asso $attr * @param int $level * * @return string */ - public static function convert(\Record\Indi\Asso &$asso, $level = 0) + public static function convert (\Gedcom\Record\Indi\Asso &$asso, $level = 0) { $output = ''; // _indi @@ -43,7 +43,7 @@ public static function convert(\Record\Indi\Asso &$asso, $level = 0) $sour = $asso->getSour(); if (!empty($sour) && count($sour) > 0) { foreach ($sour as $item) { - $_convert = \Writer\SourRef::convert($item, $level); + $_convert = \Gedcom\Writer\SourRef::convert($item, $level); $output .= $_convert; } } @@ -52,7 +52,7 @@ public static function convert(\Record\Indi\Asso &$asso, $level = 0) $note = $asso->getSour(); if (!empty($note) && count($note) > 0) { foreach ($note as $item) { - $_convert = \Writer\NoteRef::convert($item, $level); + $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); $output .= $_convert; } } diff --git a/src/Writer/Indi/Attr.php b/src/Writer/Indi/Attr.php index 2cc7ff37..fdb1aec9 100644 --- a/src/Writer/Indi/Attr.php +++ b/src/Writer/Indi/Attr.php @@ -17,12 +17,12 @@ class Attr { /** - * @param \Record\Indi\Attr $attr + * @param \Gedcom\Record\Indi\Attr $attr * @param int $level * * @return string */ - public static function convert(\Record\Indi\Attr &$attr, $level = 0) + public static function convert (\Gedcom\Record\Indi\Attr &$attr, $level = 0) { $output = ''; diff --git a/src/Writer/Indi/Even.php b/src/Writer/Indi/Even.php index 473514ab..18b438e4 100644 --- a/src/Writer/Indi/Even.php +++ b/src/Writer/Indi/Even.php @@ -17,12 +17,12 @@ class Even { /** - * @param \Record\Indi\Even $even + * @param \Gedcom\Record\Indi\Even $even * @param int $level * * @return string */ - public static function convert(\Record\Indi\Even &$even, $level = 0) + public static function convert (\Gedcom\Record\Indi\Even &$even, $level = 0) { $output = ''; @@ -50,7 +50,7 @@ public static function convert(\Record\Indi\Even &$even, $level = 0) // Plac $plac = $even->getPlac(); if (!empty($plac)) { - $_convert = \Writer\Indi\Even\Plac::convert($plac, $level); + $_convert = \Gedcom\Writer\Indi\Even\Plac::convert($plac, $level); $output .= $_convert; } @@ -69,7 +69,7 @@ public static function convert(\Record\Indi\Even &$even, $level = 0) // $addr $addr = $even->getAddr(); if (!empty($addr)) { - $_convert = \Writer\Addr::convert($addr, $level); + $_convert = \Gedcom\Writer\Addr::convert($addr, $level); $output .= $_convert; } @@ -77,7 +77,7 @@ public static function convert(\Record\Indi\Even &$even, $level = 0) $phon = $even->getPhon(); if (!empty($phon) && count($phon) > 0) { foreach ($phon as $item) { - $_convert = \Writer\Phon::convert($item, $level); + $_convert = \Gedcom\Writer\Phon::convert($item, $level); $output .= $_convert; } } @@ -94,7 +94,7 @@ public static function convert(\Record\Indi\Even &$even, $level = 0) $obje = $even->getObje(); if (!empty($obje) && count($obje) > 0) { foreach ($obje as $item) { - $_convert = \Writer\ObjeRef::convert($item, $level); + $_convert = \Gedcom\Writer\ObjeRef::convert($item, $level); $output .= $_convert; } } @@ -102,7 +102,7 @@ public static function convert(\Record\Indi\Even &$even, $level = 0) $sour = $even->getSour(); if (!empty($sour) && count($sour) > 0) { foreach ($sour as $item) { - $_convert = \Writer\SourRef::convert($item, $level); + $_convert = \Gedcom\Writer\SourRef::convert($item, $level); $output .= $_convert; } } @@ -110,14 +110,14 @@ public static function convert(\Record\Indi\Even &$even, $level = 0) $note = $even->getSour(); if (!empty($note) && count($note) > 0) { foreach ($note as $item) { - $_convert = \Writer\NoteRef::convert($item, $level); + $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); $output .= $_convert; } } // Record\Chan $chan = $even->getChan(); if (!empty($chan)) { - $_convert = \Writer\Chan::convert($item, $level); + $_convert = \Gedcom\Writer\Chan::convert($item, $level); $output .= $_convert; } diff --git a/src/Writer/Indi/Even/Plac.php b/src/Writer/Indi/Even/Plac.php index 15cbbd84..240600b4 100644 --- a/src/Writer/Indi/Even/Plac.php +++ b/src/Writer/Indi/Even/Plac.php @@ -17,12 +17,12 @@ class Plac { /** - * @param \Record\Indi\Even\Plac $plac + * @param \Gedcom\Record\Indi\Even\Plac $plac * @param int $level * * @return string */ - public static function convert(\Record\Indi\Even\Plac &$plac, $level = 0) + public static function convert (\Gedcom\Record\Indi\Even\Plac &$plac, $level = 0) { $output = ''; @@ -47,7 +47,7 @@ public static function convert(\Record\Indi\Even\Plac &$plac, $level = 0) $note = $plac->getNote(); if ($note && count($note) > 0) { foreach ($note as $item) { - $_convert = \Writer\NoteRef::convert($item, $level); + $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); $output .= $_convert; } } @@ -55,7 +55,7 @@ public static function convert(\Record\Indi\Even\Plac &$plac, $level = 0) $sour = $plac->getSour(); if ($sour && count($sour) > 0) { foreach ($sour as $item) { - $_convert = \Writer\SourRef::convert($item, $level); + $_convert = \Gedcom\Writer\SourRef::convert($item, $level); $output .= $_convert; } } diff --git a/src/Writer/Indi/Famc.php b/src/Writer/Indi/Famc.php index cb46f259..9cee6f19 100644 --- a/src/Writer/Indi/Famc.php +++ b/src/Writer/Indi/Famc.php @@ -17,12 +17,12 @@ class Famc { /** - * @param \Record\Indi\Famc $attr + * @param \Gedcom\Record\Indi\Famc $attr * @param int $level * * @return string */ - public static function convert(\Record\Indi\Famc &$famc, $level = 0) + public static function convert (\Gedcom\Record\Indi\Famc &$famc, $level = 0) { $output = ''; // NAME @@ -44,7 +44,7 @@ public static function convert(\Record\Indi\Famc &$famc, $level = 0) $note = $famc->getSour(); if (!empty($note) && count($note) > 0) { foreach ($note as $item) { - $_convert = \Writer\NoteRef::convert($item, $level); + $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); $output .= $_convert; } } diff --git a/src/Writer/Indi/Fams.php b/src/Writer/Indi/Fams.php index 3bc51bbb..ce04059d 100644 --- a/src/Writer/Indi/Fams.php +++ b/src/Writer/Indi/Fams.php @@ -17,12 +17,12 @@ class Fams { /** - * @param \Record\Indi\Fams $attr + * @param \Gedcom\Record\Indi\Fams $attr * @param int $level * * @return string */ - public static function convert(\Record\Indi\Fams &$fams, $level = 0) + public static function convert (\Gedcom\Record\Indi\Fams &$fams, $level = 0) { $output = ''; // NAME @@ -38,7 +38,7 @@ public static function convert(\Record\Indi\Fams &$fams, $level = 0) $note = $fams->getNote(); if (!empty($note) && count($note) > 0) { foreach ($note as $item) { - $_convert = \Writer\NoteRef::convert($item, $level); + $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); $output .= $_convert; } } diff --git a/src/Writer/Indi/Name.php b/src/Writer/Indi/Name.php index 3caf48b9..adb6f09e 100644 --- a/src/Writer/Indi/Name.php +++ b/src/Writer/Indi/Name.php @@ -17,12 +17,12 @@ class Name { /** - * @param \Record\Indi\Name $attr + * @param \Gedcom\Record\Indi\Name $attr * @param int $level * * @return string */ - public static function convert(\Record\Indi\Name &$name, $level = 0) + public static function convert (\Gedcom\Record\Indi\Name &$name, $level = 0) { $output = ''; // NAME @@ -69,7 +69,7 @@ public static function convert(\Record\Indi\Name &$name, $level = 0) $sour = $name->getSour(); if (!empty($sour) && count($sour) > 0) { foreach ($sour as $item) { - $_convert = \Writer\SourRef::convert($item, $level); + $_convert = \Gedcom\Writer\SourRef::convert($item, $level); $output .= $_convert; } } @@ -77,7 +77,7 @@ public static function convert(\Record\Indi\Name &$name, $level = 0) $note = $name->getSour(); if (!empty($note) && count($note) > 0) { foreach ($note as $item) { - $_convert = \Writer\NoteRef::convert($item, $level); + $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); $output .= $_convert; } } diff --git a/src/Writer/Note.php b/src/Writer/Note.php index d090adbf..29b1fa1a 100644 --- a/src/Writer/Note.php +++ b/src/Writer/Note.php @@ -17,12 +17,12 @@ class Note { /** - * @param \Record\Note $sour + * @param \Gedcom\Record\Note $sour * @param int $level * * @return string */ - public static function convert(\Record\Note &$note) + public static function convert (\Gedcom\Record\Note &$note) { $level = 0; $output = ''; @@ -52,7 +52,7 @@ public static function convert(\Record\Note &$note) if (!empty($refn) && count($refn) > 0) { foreach ($refn as $item) { if ($item) { - $_convert = \Writer\Refn::convert($item, $level); + $_convert = \Gedcom\Writer\Refn::convert($item, $level); $output .= $_convert; } } @@ -60,7 +60,7 @@ public static function convert(\Record\Note &$note) // CHAN $chan = $note->getChan(); if ($chan) { - $_convert = \Writer\Chan::convert($chan, $level); + $_convert = \Gedcom\Writer\Chan::convert($chan, $level); $output .= $_convert; } @@ -69,7 +69,7 @@ public static function convert(\Record\Note &$note) if (!empty($sour) && count($sour) > 0) { foreach ($sour as $item) { if ($item) { - $_convert = \Writer\SourRef::convert($item, $level); + $_convert = \Gedcom\Writer\SourRef::convert($item, $level); $output .= $_convert; } } diff --git a/src/Writer/NoteRef.php b/src/Writer/NoteRef.php index 41850c28..9e68504b 100644 --- a/src/Writer/NoteRef.php +++ b/src/Writer/NoteRef.php @@ -17,12 +17,12 @@ class NoteRef { /** - * @param \Record\NoteRef $note + * @param \Gedcom\Record\NoteRef $note * @param int $level * * @return string */ - public static function convert(\Record\NoteRef &$note, $level) + public static function convert (\Gedcom\Record\NoteRef &$note, $level) { $output = ''; @@ -37,7 +37,7 @@ public static function convert(\Record\NoteRef &$note, $level) $sour = $note->getSour(); if ($sour && count($sour) > 0) { foreach ($sour as $item) { - $_convert = \Writer\SourRef::convert($item, $level); + $_convert = \Gedcom\Writer\SourRef::convert($item, $level); $output .= $_convert; } } diff --git a/src/Writer/Obje.php b/src/Writer/Obje.php index 5b2caed5..1ea82fe1 100644 --- a/src/Writer/Obje.php +++ b/src/Writer/Obje.php @@ -17,12 +17,12 @@ class Obje { /** - * @param \Record\Obje $sour + * @param \Gedcom\Record\Obje $sour * @param int $level * * @return string */ - public static function convert(\Record\Obje &$obje) + public static function convert (\Gedcom\Record\Obje &$obje) { $level = 0; $output = ''; @@ -62,7 +62,7 @@ public static function convert(\Record\Obje &$obje) if (!empty($refn) && count($refn) > 0) { foreach ($refn as $item) { if ($item) { - $_convert = \Writer\Refn::convert($item, $level); + $_convert = \Gedcom\Writer\Refn::convert($item, $level); $output .= $_convert; } } @@ -79,7 +79,7 @@ public static function convert(\Record\Obje &$obje) if ($note && count($note) > 0) { foreach ($note as $item) { if ($item) { - $_convert = \Writer\NoteRef::convert($item, $level); + $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); $output .= $_convert; } } @@ -88,7 +88,7 @@ public static function convert(\Record\Obje &$obje) // CHAN $chan = $obje->getChan(); if ($chan) { - $_convert = \Writer\Chan::convert($chan, $level); + $_convert = \Gedcom\Writer\Chan::convert($chan, $level); $output .= $_convert; } diff --git a/src/Writer/ObjeRef.php b/src/Writer/ObjeRef.php index 05a40736..4a21a934 100644 --- a/src/Writer/ObjeRef.php +++ b/src/Writer/ObjeRef.php @@ -17,12 +17,12 @@ class ObjeRef { /** - * @param \Record\ObjeRef $note + * @param \Gedcom\Record\ObjeRef $note * @param int $level * * @return string */ - public static function convert(\Record\ObjeRef &$obje, $level) + public static function convert (\Gedcom\Record\ObjeRef &$obje, $level) { $output = ''; @@ -57,7 +57,7 @@ public static function convert(\Record\ObjeRef &$obje, $level) $_note = $obje->getNote(); if (!empty($_note) && count($_note) > 0) { foreach ($_note as $item) { - $_convert = \Writer\NoteRef::convert($item, $level); + $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); $output .= $_convert; } } diff --git a/src/Writer/Refn.php b/src/Writer/Refn.php index 930d11ca..acb233d0 100644 --- a/src/Writer/Refn.php +++ b/src/Writer/Refn.php @@ -17,12 +17,12 @@ class Refn { /** - * @param \Record\Refn $note + * @param \Gedcom\Record\Refn $note * @param int $level * * @return string */ - public static function convert(\Record\Refn &$refn, $level) + public static function convert (\Gedcom\Record\Refn &$refn, $level) { $output = ''; $_refn = $refn->getRefn(); diff --git a/src/Writer/Repo.php b/src/Writer/Repo.php index f6ab589d..30e4bbfa 100644 --- a/src/Writer/Repo.php +++ b/src/Writer/Repo.php @@ -17,12 +17,12 @@ class Repo { /** - * @param \Record\Repo $sour + * @param \Gedcom\Record\Repo $sour * @param int $level * * @return string */ - public static function convert(\Record\Repo &$repo) + public static function convert (\Gedcom\Record\Repo &$repo) { $level = 0; $output = ''; @@ -45,14 +45,14 @@ public static function convert(\Record\Repo &$repo) // ADDR $addr = $repo->getAddr(); if ($addr) { - $_convert = \Writer\Addr::convert($addr, $level); + $_convert = \Gedcom\Writer\Addr::convert($addr, $level); $output .= $_convert; } // PHON $phon = $repo->getPhon(); if ($phon) { - $_convert = \Writer\Phon::convert($phon, $level); + $_convert = \Gedcom\Writer\Phon::convert($phon, $level); $output .= $_convert; } @@ -61,7 +61,7 @@ public static function convert(\Record\Repo &$repo) if ($note && count($note) > 0) { foreach ($note as $item) { if ($item) { - $_convert = \Writer\NoteRef::convert($item, $level); + $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); $output .= $_convert; } } @@ -72,7 +72,7 @@ public static function convert(\Record\Repo &$repo) if (!empty($refn) && count($refn) > 0) { foreach ($refn as $item) { if ($item) { - $_convert = \Writer\Refn::convert($item, $level); + $_convert = \Gedcom\Writer\Refn::convert($item, $level); $output .= $_convert; } } @@ -81,7 +81,7 @@ public static function convert(\Record\Repo &$repo) // CHAN $chan = $repo->getChan(); if ($chan) { - $_convert = \Writer\Chan::convert($chan, $level); + $_convert = \Gedcom\Writer\Chan::convert($chan, $level); $output .= $_convert; } diff --git a/src/Writer/RepoRef.php b/src/Writer/RepoRef.php index f54e15e4..72e64d1a 100644 --- a/src/Writer/RepoRef.php +++ b/src/Writer/RepoRef.php @@ -17,12 +17,12 @@ class RepoRef { /** - * @param \Record\RepoRef $reporef + * @param \Gedcom\Record\RepoRef $reporef * @param int $level * * @return string */ - public static function convert(\Record\RepoRef &$reporef, $level) + public static function convert (\Gedcom\Record\RepoRef &$reporef, $level) { $output = ''; $_repo = $reporef->getRepo(); @@ -38,7 +38,7 @@ public static function convert(\Record\RepoRef &$reporef, $level) $note = $reporef->getNote(); if (!empty($note) && count($note) > 0) { foreach ($note as $item) { - $_convert = \Writer\NoteRef::convert($item, $level); + $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); $output .= $_convert; } } @@ -47,7 +47,7 @@ public static function convert(\Record\RepoRef &$reporef, $level) $_caln = $reporef->getCaln(); if (!empty($_caln) && count($_caln) > 0) { foreach ($_caln as $item) { - $_convert = \Writer\Caln::convert($item, $level); + $_convert = \Gedcom\Writer\Caln::convert($item, $level); $output .= $_convert; } } diff --git a/src/Writer/Sour.php b/src/Writer/Sour.php index d51c1c30..9cb516d9 100644 --- a/src/Writer/Sour.php +++ b/src/Writer/Sour.php @@ -17,12 +17,12 @@ class Sour { /** - * @param \Record\Sour $sour + * @param \Gedcom\Record\Sour $sour * @param int $level * * @return string */ - public static function convert(\Record\Sour &$sour, $level) + public static function convert (\Gedcom\Record\Sour &$sour, $level) { $output = ''; $_sour = $sour->getSour(); @@ -73,7 +73,7 @@ public static function convert(\Record\Sour &$sour, $level) // REPO $repo = $sour->getRepo(); if (!empty($repo)) { - $_convert = \Writer\RepoRef::convert($repo, $level); + $_convert = \Gedcom\Writer\RepoRef::convert($repo, $level); $output .= $_convert; } @@ -81,7 +81,7 @@ public static function convert(\Record\Sour &$sour, $level) $note = $sour->getNote(); if (!empty($note) && count($note) > 0) { foreach ($note as $item) { - $_convert = \Writer\NoteRef::convert($item, $level); + $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); $output .= $_convert; } } @@ -89,7 +89,7 @@ public static function convert(\Record\Sour &$sour, $level) // DATA $data = $sour->getData(); if (!empty($data)) { - $_convert = \Writer\Sour\Data::convert($data, $level); + $_convert = \Gedcom\Writer\Sour\Data::convert($data, $level); $output .= $_convert; } @@ -97,7 +97,7 @@ public static function convert(\Record\Sour &$sour, $level) $obje = $sour->getObje(); if (!empty($obje) && count($obje) > 0) { foreach ($obje as $item) { - $_convert = \Writer\ObjeRef::convert($item, $level); + $_convert = \Gedcom\Writer\ObjeRef::convert($item, $level); $output .= $_convert; } } @@ -106,7 +106,7 @@ public static function convert(\Record\Sour &$sour, $level) $refn = $sour->getRefn(); if (!empty($refn) && count($refn) > 0) { foreach ($refn as $item) { - $_convert = \Writer\Refn::convert($item, $level); + $_convert = \Gedcom\Writer\Refn::convert($item, $level); $output .= $_convert; } } @@ -114,7 +114,7 @@ public static function convert(\Record\Sour &$sour, $level) // chan $chan = $sour->getChan(); if (!empty($chan)) { - $_convert = \Writer\Chan::convert($chan, $level); + $_convert = \Gedcom\Writer\Chan::convert($chan, $level); $output .= $_convert; } diff --git a/src/Writer/Sour/Data.php b/src/Writer/Sour/Data.php index daa01af9..7cc9596c 100644 --- a/src/Writer/Sour/Data.php +++ b/src/Writer/Sour/Data.php @@ -17,12 +17,12 @@ class Data { /** - * @param \Record\Sour\Data $data + * @param \Gedcom\Record\Sour\Data $data * @param int $level * * @return string */ - public static function convert(\Record\Sour\Data &$data, $level = 0) + public static function convert (\Gedcom\Record\Sour\Data &$data, $level = 0) { $output = ''; @@ -51,7 +51,7 @@ public static function convert(\Record\Sour\Data &$data, $level = 0) $note = $data->getNote(); if ($note && count($note) > 0) { foreach ($note as $item) { - $_convert = \Writer\NoteRef::convert($item, $level); + $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); $output .= $_convert; } } @@ -60,7 +60,7 @@ public static function convert(\Record\Sour\Data &$data, $level = 0) $_even = $data->getEven(); if ($_even && count($_even) > 0) { foreach ($_even as $item) { - $_convert = \Writer\Sour\Data\Even::convert($item, $level); + $_convert = \Gedcom\Writer\Sour\Data\Even::convert($item, $level); $output .= $_convert; } } diff --git a/src/Writer/Sour/Data/Even.php b/src/Writer/Sour/Data/Even.php index 120bff37..e7f164e5 100644 --- a/src/Writer/Sour/Data/Even.php +++ b/src/Writer/Sour/Data/Even.php @@ -17,12 +17,12 @@ class Even { /** - * @param \Record\Sour\Data\Even $even + * @param \Gedcom\Record\Sour\Data\Even $even * @param int $level * * @return string */ - public static function convert(\Record\Sour\Data\Even &$even, $level) + public static function convert (\Gedcom\Record\Sour\Data\Even &$even, $level) { $output = ''; diff --git a/src/Writer/SourRef.php b/src/Writer/SourRef.php index 454fb5e5..eb314c3a 100644 --- a/src/Writer/SourRef.php +++ b/src/Writer/SourRef.php @@ -17,12 +17,12 @@ class SourRef { /** - * @param \Record\SourRef $sour + * @param \Gedcom\Record\SourRef $sour * @param int $level * * @return string */ - public static function convert(\Record\SourRef &$sour, $level) + public static function convert (\Gedcom\Record\SourRef &$sour, $level) { $output = ''; $_sour = $sour->getSour(); @@ -39,14 +39,14 @@ public static function convert(\Record\SourRef &$sour, $level) $note = $sour->getNote(); if ($note && count($note) > 0) { foreach ($note as $item) { - $_convert = \Writer\NoteRef::convert($item, $level); + $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); $output .= $_convert; } } // protected $_data = null; $_data = $sour->getData(); if ($_data) { - $_convert = \Writer\Sour\Data::convert($_data, $level); + $_convert = \Gedcom\Writer\Sour\Data::convert($_data, $level); $output .= $_convert; } // protected $_page setPage @@ -57,7 +57,7 @@ public static function convert(\Record\SourRef &$sour, $level) // protected $_even = null; $_even = $sour->getData(); if ($_even) { - $_convert = \Writer\SourRef\Even::convert($_even, $level); + $_convert = \Gedcom\Writer\SourRef\Even::convert($_even, $level); $output .= $_convert; } // protected $_quay diff --git a/src/Writer/SourRef/Even.php b/src/Writer/SourRef/Even.php index b1f6f812..4ad1c695 100644 --- a/src/Writer/SourRef/Even.php +++ b/src/Writer/SourRef/Even.php @@ -17,12 +17,12 @@ class Even { /** - * @param \Record\SourRef\Even $even + * @param \Gedcom\Record\SourRef\Even $even * @param int $level * * @return string */ - public static function convert(\Record\SourRef\Even &$even, $level = 0) + public static function convert (\Gedcom\Record\SourRef\Even &$even, $level = 0) { $output = ''; diff --git a/src/Writer/Subm.php b/src/Writer/Subm.php index e5c3537a..e9e5cb29 100644 --- a/src/Writer/Subm.php +++ b/src/Writer/Subm.php @@ -17,12 +17,12 @@ class Subm { /** - * @param \Record\Subm $note + * @param \Gedcom\Record\Subm $note * @param int $level * * @return string */ - public static function convert(\Record\Subm &$subm) + public static function convert (\Gedcom\Record\Subm &$subm) { $level = 0; $output = ''; @@ -43,14 +43,14 @@ public static function convert(\Record\Subm &$subm) // $chan $chan = $subm->getChan(); if ($chan) { - $_convert = \Writer\Chan::convert($chan, $level); + $_convert = \Gedcom\Writer\Chan::convert($chan, $level); $output .= $_convert; } // $addr $addr = $subm->getAddr(); if ($addr) { - $_convert = \Writer\Addr::convert($addr, $level); + $_convert = \Gedcom\Writer\Addr::convert($addr, $level); $output .= $_convert; } @@ -82,7 +82,7 @@ public static function convert(\Record\Subm &$subm) if (!empty($phon) && count($phon) > 0) { foreach ($phon as $item) { if ($item) { - $_convert = \Writer\Phon::convert($item, $level); + $_convert = \Gedcom\Writer\Phon::convert($item, $level); $output .= $_convert; } } @@ -92,7 +92,7 @@ public static function convert(\Record\Subm &$subm) $obje = $subm->getObje(); if (!empty($obje) && count($obje) > 0) { foreach ($obje as $item) { - $_convert = \Writer\ObjeRef::convert($item, $level); + $_convert = \Gedcom\Writer\ObjeRef::convert($item, $level); $output .= $_convert; } } @@ -101,7 +101,7 @@ public static function convert(\Record\Subm &$subm) $note = $subm->getNote(); if (!empty($note) && count($note) > 0) { foreach ($note as $item) { - $_convert = \Writer\NoteRef::convert($item, $level); + $_convert = \Gedcom\Writer\NoteRef::convert($item, $level); $output .= $_convert; } } diff --git a/src/Writer/Subn.php b/src/Writer/Subn.php index b49dbe33..95727885 100644 --- a/src/Writer/Subn.php +++ b/src/Writer/Subn.php @@ -17,12 +17,12 @@ class Subn { /** - * @param \Record\Subn $note + * @param \Gedcom\Record\Subn $note * @param int $level * * @return string */ - public static function convert(\Record\Subn &$subn) + public static function convert (\Gedcom\Record\Subn &$subn) { $level = 0; $output = ''; diff --git a/tests/issue/Issue00012Test.php b/tests/issue/Issue00012Test.php index 8c772ede..c741bc30 100644 --- a/tests/issue/Issue00012Test.php +++ b/tests/issue/Issue00012Test.php @@ -1,8 +1,8 @@ Date: Sat, 17 Jul 2021 23:36:06 +0100 Subject: [PATCH 74/99] Update PSR4. --- src/Parser/Head.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/Parser/Head.php b/src/Parser/Head.php index 98bc4355..b7182db1 100644 --- a/src/Parser/Head.php +++ b/src/Parser/Head.php @@ -33,7 +33,7 @@ public static function parse(\Gedcom\Parser $parser) return null; } - $head = new Record\Head(); + $head = new \Gedcom\Record\Head(); $parser->getGedcom()->setHead($head); @@ -51,12 +51,9 @@ public static function parse(\Gedcom\Parser $parser) switch ($recordType) { case 'SOUR': - $sour = Parser\Head\Sour::parse($parser); + $sour = \Gedcom\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; @@ -76,19 +73,19 @@ public static function parse(\Gedcom\Parser $parser) $head->setLang(trim($record[2])); break; case 'DATE': - $date = Parser\Head\Date::parse($parser); + $date = \Gedcom\Parser\Head\Date::parse($parser); $head->setDate($date); break; case 'GEDC': - $gedc = Parser\Head\Gedc::parse($parser); + $gedc = \Gedcom\Parser\Head\Gedc::parse($parser); $head->setGedc($gedc); break; case 'CHAR': - $char = Parser\Head\Char::parse($parser); + $char = \Gedcom\Parser\Head\Char::parse($parser); $head->setChar($char); break; case 'PLAC': - $plac = Parser\Head\Plac::parse($parser); + $plac = \Gedcom\Parser\Head\Plac::parse($parser); $head->setPlac($plac); break; case 'NOTE': From 6e1be72e64a007042fc5213cc88a18d52a471a25 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sat, 17 Jul 2021 23:40:15 +0100 Subject: [PATCH 75/99] Update PSR4. --- src/Parser.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Parser.php b/src/Parser.php index b940cab1..c42ce21e 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -240,23 +240,23 @@ public function parse($fileName) } if (isset($record[1]) && trim($record[1]) == 'HEAD') { - Parser\Head::parse($this); + \Gedcom\Parser\Head::parse($this); } elseif (isset($record[2]) && trim($record[2]) == 'SUBN') { - Parser\Subn::parse($this); + \Gedcom\Parser\Subn::parse($this); } elseif (isset($record[2]) && trim($record[2]) == 'SUBM') { - Parser\Subm::parse($this); + \Gedcom\Parser\Subm::parse($this); } elseif (isset($record[2]) && $record[2] == 'SOUR') { - Parser\Sour::parse($this); + \Gedcom\Parser\Sour::parse($this); } elseif (isset($record[2]) && $record[2] == 'INDI') { - Parser\Indi::parse($this); + \Gedcom\Parser\Indi::parse($this); } elseif (isset($record[2]) && $record[2] == 'FAM') { - Parser\Fam::parse($this); + \Gedcom\Parser\Fam::parse($this); } elseif (isset($record[2]) && substr(trim($record[2]), 0, 4) == 'NOTE') { - Parser\Note::parse($this); + \Gedcom\Parser\Note::parse($this); } elseif (isset($record[2]) && $record[2] == 'REPO') { - Parser\Repo::parse($this); + \Gedcom\Parser\Repo::parse($this); } elseif (isset($record[2]) && $record[2] == 'OBJE') { - Parser\Obje::parse($this); + \Gedcom\Parser\Obje::parse($this); } elseif (isset($record[1]) && trim($record[1]) == 'TRLR') { // EOF break; From 485994eaed4d2bcd2050e54de54ee07f9ba44b62 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sat, 17 Jul 2021 23:43:01 +0100 Subject: [PATCH 76/99] Update PSR4. --- src/Gedcom.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Gedcom.php b/src/Gedcom.php index b0b6e581..cfee5c88 100644 --- a/src/Gedcom.php +++ b/src/Gedcom.php @@ -95,7 +95,7 @@ class Gedcom * * @param \Gedcom\Record\Head $head */ - public function setHead (\Record\Head $head) + public function setHead (\Gedcom\Record\Head $head) { $this->head = $head; } @@ -105,7 +105,7 @@ public function setHead (\Record\Head $head) * * @param \Gedcom\Record\Subn $subn */ - public function setSubn (\Record\Subn $subn) + public function setSubn (\Gedcom\Record\Subn $subn) { $this->subn = $subn; } @@ -115,7 +115,7 @@ public function setSubn (\Record\Subn $subn) * * @param \Gedcom\Record\Sour $sour */ - public function addSour (\Record\Sour $sour) + public function addSour (\Gedcom\Record\Sour $sour) { $this->sour[$sour->getSour()] = $sour; } @@ -125,7 +125,7 @@ public function addSour (\Record\Sour $sour) * * @param \Gedcom\Record\Indi $indi */ - public function addIndi (\Record\Indi $indi) + public function addIndi (\Gedcom\Record\Indi $indi) { $this->indi[$indi->getId()] = $indi; if ($indi->getUid()) { @@ -138,7 +138,7 @@ public function addIndi (\Record\Indi $indi) * * @param \Gedcom\Record\Fam $fam */ - public function addFam (\Record\Fam $fam) + public function addFam (\Gedcom\Record\Fam $fam) { $this->fam[$fam->getId()] = $fam; } @@ -148,7 +148,7 @@ public function addFam (\Record\Fam $fam) * * @param \Gedcom\Record\Note $note */ - public function addNote (\Record\Note $note) + public function addNote (\Gedcom\Record\Note $note) { $this->note[$note->getId()] = $note; } @@ -158,7 +158,7 @@ public function addNote (\Record\Note $note) * * @param \Gedcom\Record\Repo $repo */ - public function addRepo (\Record\Repo $repo) + public function addRepo (\Gedcom\Record\Repo $repo) { $this->repo[$repo->getRepo()] = $repo; } @@ -168,7 +168,7 @@ public function addRepo (\Record\Repo $repo) * * @param \Gedcom\Record\Obje $obje */ - public function addObje (\Record\Obje $obje) + public function addObje (\Gedcom\Record\Obje $obje) { $this->obje[$obje->getId()] = $obje; } @@ -178,7 +178,7 @@ public function addObje (\Record\Obje $obje) * * @param \Gedcom\Record\Subm $subm */ - public function addSubm (\Record\Subm $subm) + public function addSubm (\Gedcom\Record\Subm $subm) { $this->subm[$subm->getSubm()] = $subm; } From 3aa2ca689e665889f204c98d54a1fec119049eea Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sat, 17 Jul 2021 23:49:00 +0100 Subject: [PATCH 77/99] Update PSR4. --- src/Parser/Fam.php | 2 +- src/Parser/Indi.php | 6 +++--- src/Parser/Indi/Attr.php | 4 ++-- src/Parser/Indi/Even.php | 4 ++-- src/Parser/Indi/Lds.php | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Parser/Fam.php b/src/Parser/Fam.php index 25ff495b..8f2dfb9b 100644 --- a/src/Parser/Fam.php +++ b/src/Parser/Fam.php @@ -74,7 +74,7 @@ public static function parse(\Gedcom\Parser $parser) case 'MARL': case 'MARS': $className = ucfirst(strtolower($recordType)); - $class = 'GedcomzParserzFamz'.$className; + $class = 'GedcomParserFam'.$className; $even = $class::parse($parser); $fam->addEven($even); diff --git a/src/Parser/Indi.php b/src/Parser/Indi.php index 5abd2556..0b3b2710 100644 --- a/src/Parser/Indi.php +++ b/src/Parser/Indi.php @@ -83,7 +83,7 @@ public static function parse(\Gedcom\Parser $parser) case 'WILL': case 'EVEN': $className = ucfirst(strtolower($recordType)); - $class = 'GedcomzParserzIndiz'.$className; + $class = 'GedcomParserIndi'.$className; $event = $class::parse($parser); $indi->addEven($event); @@ -102,7 +102,7 @@ public static function parse(\Gedcom\Parser $parser) case 'SSN': case 'TITL': $className = ucfirst(strtolower($recordType)); - $class = 'GedcomzParserzIndiz'.$className; + $class = 'GedcomParserIndi'.$className; $att = $class::parse($parser); $indi->addAttr($att); @@ -112,7 +112,7 @@ public static function parse(\Gedcom\Parser $parser) case 'ENDL': case 'SLGC': $className = ucfirst(strtolower($recordType)); - $class = 'GedcomzParserzIndiz'.$className; + $class = 'GedcomParserIndiz'.$className; $lds = $class::parse($parser); $indi->{'add'.$recordType}[] = $lds; diff --git a/src/Parser/Indi/Attr.php b/src/Parser/Indi/Attr.php index 350dde57..53905d8d 100644 --- a/src/Parser/Indi/Attr.php +++ b/src/Parser/Indi/Attr.php @@ -21,7 +21,7 @@ public static function parse(\Gedcom\Parser $parser) $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[1])) { - $className = 'GedcomzRecordzIndiz'.ucfirst(strtolower(trim($record[1]))); + $className = 'GedcomRecordzIndiz'.ucfirst(strtolower(trim($record[1]))); $attr = new $className(); $attr->setType(trim($record[1])); @@ -59,7 +59,7 @@ public static function parse(\Gedcom\Parser $parser) $attr->setPlac($plac); break; case 'ADDR': - $attr->setAddr(\Parser\Addr::parse($parser)); + $attr->setAddr(\Gedcom\Parser\Addr::parse($parser)); break; case 'PHON': $phone = \Gedcom\Parser\Phon::parse($parser); diff --git a/src/Parser/Indi/Even.php b/src/Parser/Indi/Even.php index 9030ace0..c56b9fbd 100644 --- a/src/Parser/Indi/Even.php +++ b/src/Parser/Indi/Even.php @@ -31,7 +31,7 @@ public static function parse(\Gedcom\Parser $parser) $even = null; if (strtoupper(trim($record[1])) != 'EVEN') { - $className = 'GedcomzRecordzIndiz'.ucfirst(strtolower(trim($record[1]))); + $className = 'GedcomRecordzIndiz'.ucfirst(strtolower(trim($record[1]))); $even = new $className(); } else { $even = new \Gedcom\Record\Indi\Even(); @@ -72,7 +72,7 @@ public static function parse(\Gedcom\Parser $parser) $even->setPlac($plac); break; case 'ADDR': - $even->setAddr(\Parser\Addr::parse($parser)); + $even->setAddr(\Gedcom\Parser\Addr::parse($parser)); break; case 'PHON': $phone = \Gedcom\Parser\Phon::parse($parser); diff --git a/src/Parser/Indi/Lds.php b/src/Parser/Indi/Lds.php index b6bcbbb2..1976ae5c 100644 --- a/src/Parser/Indi/Lds.php +++ b/src/Parser/Indi/Lds.php @@ -21,7 +21,7 @@ public static function parse(\Gedcom\Parser $parser) $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[1])) { - $className = 'GedcomzRecordzIndiz'.ucfirst(strtolower(trim($record[1]))); + $className = 'GedcomRecordzIndiz'.ucfirst(strtolower(trim($record[1]))); $lds = new $className(); } else { $parser->skipToNextLevel($depth); From 99601485c19bf8fea57c8e03ceac6f982db771c8 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sat, 17 Jul 2021 23:59:49 +0100 Subject: [PATCH 78/99] Update PSR4. --- src/Parser/Indi.php | 2 +- src/Parser/Indi/Attr.php | 2 +- src/Parser/Indi/Even.php | 4 ++-- src/Parser/Indi/Lds.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Parser/Indi.php b/src/Parser/Indi.php index 0b3b2710..02e1e50b 100644 --- a/src/Parser/Indi.php +++ b/src/Parser/Indi.php @@ -112,7 +112,7 @@ public static function parse(\Gedcom\Parser $parser) case 'ENDL': case 'SLGC': $className = ucfirst(strtolower($recordType)); - $class = 'GedcomParserIndiz'.$className; + $class = 'GedcomParserIndi'.$className; $lds = $class::parse($parser); $indi->{'add'.$recordType}[] = $lds; diff --git a/src/Parser/Indi/Attr.php b/src/Parser/Indi/Attr.php index 53905d8d..37530694 100644 --- a/src/Parser/Indi/Attr.php +++ b/src/Parser/Indi/Attr.php @@ -21,7 +21,7 @@ public static function parse(\Gedcom\Parser $parser) $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[1])) { - $className = 'GedcomRecordzIndiz'.ucfirst(strtolower(trim($record[1]))); + $className = 'GedcomRecordIndi'.ucfirst(strtolower(trim($record[1]))); $attr = new $className(); $attr->setType(trim($record[1])); diff --git a/src/Parser/Indi/Even.php b/src/Parser/Indi/Even.php index c56b9fbd..368e8725 100644 --- a/src/Parser/Indi/Even.php +++ b/src/Parser/Indi/Even.php @@ -31,7 +31,7 @@ public static function parse(\Gedcom\Parser $parser) $even = null; if (strtoupper(trim($record[1])) != 'EVEN') { - $className = 'GedcomRecordzIndiz'.ucfirst(strtolower(trim($record[1]))); + $className = 'GedcomRecordIndi'.ucfirst(strtolower(trim($record[1]))); $even = new $className(); } else { $even = new \Gedcom\Record\Indi\Even(); @@ -102,7 +102,7 @@ public static function parse(\Gedcom\Parser $parser) } break; case 'CHAN': - $change = Chan::parse($parser); + $change = \Gedcom\Parser\Chan::parse($parser); $even->setChan($change); break; default: diff --git a/src/Parser/Indi/Lds.php b/src/Parser/Indi/Lds.php index 1976ae5c..056480ac 100644 --- a/src/Parser/Indi/Lds.php +++ b/src/Parser/Indi/Lds.php @@ -21,7 +21,7 @@ public static function parse(\Gedcom\Parser $parser) $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[1])) { - $className = 'GedcomRecordzIndiz'.ucfirst(strtolower(trim($record[1]))); + $className = 'GedcomRecordIndi'.ucfirst(strtolower(trim($record[1]))); $lds = new $className(); } else { $parser->skipToNextLevel($depth); From 5d6ecbf89cd57bcbcf1091468456b6b08fe349d3 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sun, 18 Jul 2021 20:44:46 +0100 Subject: [PATCH 79/99] Update PSR4. --- src/Parser/Fam.php | 2 +- src/Parser/Indi.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Parser/Fam.php b/src/Parser/Fam.php index 8f2dfb9b..e178c476 100644 --- a/src/Parser/Fam.php +++ b/src/Parser/Fam.php @@ -74,7 +74,7 @@ public static function parse(\Gedcom\Parser $parser) case 'MARL': case 'MARS': $className = ucfirst(strtolower($recordType)); - $class = 'GedcomParserFam'.$className; + $class = '\\Gedcom\\Parser\\Fam\\'.$className; $even = $class::parse($parser); $fam->addEven($even); diff --git a/src/Parser/Indi.php b/src/Parser/Indi.php index 02e1e50b..3fd6ede1 100644 --- a/src/Parser/Indi.php +++ b/src/Parser/Indi.php @@ -83,7 +83,7 @@ public static function parse(\Gedcom\Parser $parser) case 'WILL': case 'EVEN': $className = ucfirst(strtolower($recordType)); - $class = 'GedcomParserIndi'.$className; + $class = '\\Gedcom\\Parser\\Indi\\'.$className; $event = $class::parse($parser); $indi->addEven($event); @@ -102,7 +102,7 @@ public static function parse(\Gedcom\Parser $parser) case 'SSN': case 'TITL': $className = ucfirst(strtolower($recordType)); - $class = 'GedcomParserIndi'.$className; + $class = '\\Gedcom\\Parser\\Indi\\'.$className; $att = $class::parse($parser); $indi->addAttr($att); @@ -112,7 +112,7 @@ public static function parse(\Gedcom\Parser $parser) case 'ENDL': case 'SLGC': $className = ucfirst(strtolower($recordType)); - $class = 'GedcomParserIndi'.$className; + $class = '\\Gedcom\\Parser\\Indi\\'.$className; $lds = $class::parse($parser); $indi->{'add'.$recordType}[] = $lds; From 6d289d535768a5b758820a083d0526dfb4d70762 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Mon, 23 Aug 2021 17:47:34 +0100 Subject: [PATCH 80/99] PHP 8.0 --- composer.json | 9 +- composer.lock | 2249 +++++++++++++++++++++++++++--- rector.php | 23 + src/Gedcom.php | 18 - src/Parser.php | 15 +- src/Parser/Addr.php | 2 +- src/Parser/Caln.php | 2 +- src/Parser/Chan.php | 2 +- src/Parser/Fam.php | 2 +- src/Parser/Fam/Even.php | 2 +- src/Parser/Fam/Even/Husb.php | 2 +- src/Parser/Fam/Even/Wife.php | 2 +- src/Parser/Fam/Slgs.php | 2 +- src/Parser/Fam/Slgs/Stat.php | 2 +- src/Parser/Head.php | 6 +- src/Parser/Head/Char.php | 2 +- src/Parser/Head/Date.php | 2 +- src/Parser/Head/Gedc.php | 2 +- src/Parser/Head/Plac.php | 2 +- src/Parser/Head/Sour.php | 2 +- src/Parser/Head/Sour/Corp.php | 2 +- src/Parser/Head/Sour/Data.php | 2 +- src/Parser/Indi.php | 2 +- src/Parser/Indi/Asso.php | 2 +- src/Parser/Indi/Attr.php | 2 +- src/Parser/Indi/Even.php | 2 - src/Parser/Indi/Even/Plac.php | 2 +- src/Parser/Indi/Famc.php | 4 +- src/Parser/Indi/Fams.php | 4 +- src/Parser/Indi/Name.php | 2 +- src/Parser/Indi/Name/Fone.php | 2 +- src/Parser/Indi/Name/Romn.php | 2 +- src/Parser/Note.php | 2 +- src/Parser/NoteRef.php | 6 +- src/Parser/Obje.php | 5 +- src/Parser/ObjeRef.php | 2 +- src/Parser/ObjeRef/File.php | 2 +- src/Parser/ObjeRef/File/Form.php | 2 +- src/Parser/Phon.php | 2 +- src/Parser/Plac.php | 2 +- src/Parser/Plac/Fone.php | 2 +- src/Parser/Plac/Map.php | 2 +- src/Parser/Plac/Romn.php | 2 +- src/Parser/Refn.php | 2 +- src/Parser/Repo.php | 2 +- src/Parser/RepoRef.php | 2 +- src/Parser/Sour.php | 2 +- src/Parser/Sour/Data.php | 2 +- src/Parser/Sour/Data/Even.php | 2 +- src/Parser/Sour/Repo.php | 2 +- src/Parser/Sour/Repo/Caln.php | 2 +- src/Parser/SourRef.php | 2 +- src/Parser/SourRef/Data.php | 2 +- src/Parser/SourRef/Even.php | 2 +- src/Parser/Subm.php | 2 +- src/Parser/Subn.php | 2 +- src/Record.php | 10 +- src/Record/Date.php | 2 +- src/Record/Fam.php | 14 +- src/Record/Fam/Even.php | 18 +- src/Record/Fam/Even/Husb.php | 2 +- src/Record/Fam/Even/Wife.php | 2 +- src/Record/Fam/Slgs/Stat.php | 4 +- src/Record/Head.php | 24 +- src/Record/Head/Char.php | 4 +- src/Record/Head/Date.php | 4 +- src/Record/Head/Gedc.php | 4 +- src/Record/Head/Plac.php | 2 +- src/Record/Head/Sour.php | 10 +- src/Record/Head/Sour/Corp.php | 4 +- src/Record/Head/Sour/Data.php | 6 +- src/Record/Indi/Adop.php | 4 +- src/Record/Indi/Asso.php | 4 +- src/Record/Indi/Attr.php | 4 +- src/Record/Indi/Chr.php | 2 +- src/Record/Indi/Famc.php | 4 +- src/Record/Indi/Fams.php | 2 +- src/Record/Indi/Name.php | 20 +- src/Record/Indi/Name/Fone.php | 12 +- src/Record/Indi/Name/Romn.php | 12 +- src/Record/Indi/Slgc.php | 2 +- src/Record/Note.php | 10 +- src/Record/Obje.php | 6 +- src/Record/ObjeRef.php | 6 +- src/Record/Phon.php | 2 +- src/Record/Plac.php | 12 +- src/Record/RepoRef.php | 2 +- src/Record/Sour/Data.php | 6 +- src/Record/Sour/Data/Even.php | 4 +- src/Record/Sour/Repo.php | 2 +- src/Record/Sour/Repo/Caln.php | 4 +- src/Record/SourRef.php | 12 +- src/Record/SourRef/Data.php | 4 +- src/Record/SourRef/Even.php | 4 +- src/Record/Subn.php | 2 +- src/Writer.php | 2 +- src/Writer/Addr.php | 8 +- src/Writer/Fam/Even.php | 2 - src/Writer/Fam/Slgs.php | 2 - src/Writer/Head.php | 2 - src/Writer/Head/Char.php | 2 - src/Writer/Head/Date.php | 2 - src/Writer/Head/Gedc.php | 2 - src/Writer/Head/Plac.php | 2 - src/Writer/Head/Sour.php | 2 - src/Writer/Head/Sour/Corp.php | 2 - src/Writer/Head/Sour/Data.php | 2 - src/Writer/Indi.php | 2 - src/Writer/Indi/Attr.php | 6 +- src/Writer/Indi/Even.php | 2 - src/Writer/Indi/Even/Plac.php | 2 - src/Writer/NoteRef.php | 2 - src/Writer/Phon.php | 4 +- src/Writer/RepoRef.php | 2 - src/Writer/Sour.php | 2 - src/Writer/Sour/Data.php | 4 - src/Writer/Sour/Data/Even.php | 4 - src/Writer/SourRef.php | 2 - src/Writer/SourRef/Even.php | 2 - 119 files changed, 2265 insertions(+), 482 deletions(-) create mode 100644 rector.php diff --git a/composer.json b/composer.json index 603642f6..e69c68c9 100644 --- a/composer.json +++ b/composer.json @@ -1,16 +1,17 @@ { "name": "familytree365/php-gedcom", - "description": "A GEDCOM file parser (read + write) for PHP 7.3+", + "description": "A GEDCOM file parser (read + write) for PHP 8.0+", "type": "library", "keywords": ["gedcom","parser"], "homepage": "http://github.com/familytree365/php-gedcom", "license": "MIT", "require": { - "php": ">=7.3" + "php": ">=8.0" }, "require-dev": { - "phpunit/phpunit": "5.7.*", - "squizlabs/php_codesniffer": "3.5.*" + "phpunit/phpunit": "9.*", + "squizlabs/php_codesniffer": "3.6.*", + "rector/rector": "^0.11.49" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 8e907109..980f3ae6 100644 --- a/composer.lock +++ b/composer.lock @@ -1,293 +1,1962 @@ { - "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#installing-dependencies", + "This file is @generated automatically" ], + "content-hash": "38312646739c9b3b1718b9add4133108", + "packages": [], "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-11-10T18:47:58+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.10.2", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-11-13T09:40:50+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.12.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "6608f01670c3cc5079e18c1dab1104e002579143" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6608f01670c3cc5079e18c1dab1104e002579143", + "reference": "6608f01670c3cc5079e18c1dab1104e002579143", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.12.0" + }, + "time": "2021-07-21T10:44:31+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "bae7c545bef187884426f042434e561ab1ddb182" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.0" + }, + "time": "2021-02-23T14:00:09+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.2.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, + "time": "2020-09-03T19:13:55+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + }, + "time": "2020-09-17T18:55:26+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.13.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.1", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.13.0" + }, + "time": "2021-03-17T13:42:18+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "0.12.95", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "4ffddfe86e85dcc494a47e5f3dcfd1a2dccdce58" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/4ffddfe86e85dcc494a47e5f3dcfd1a2dccdce58", + "reference": "4ffddfe86e85dcc494a47e5f3dcfd1a2dccdce58", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.12-dev" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "support": { + "issues": "https://github.com/phpstan/phpstan/issues", + "source": "https://github.com/phpstan/phpstan/tree/0.12.95" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpstan", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2021-08-20T12:53:41+00:00" + }, { "name": "phpunit/php-code-coverage", - "version": "1.2.7", + "version": "9.2.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "f6293e1b30a2354e8428e004689671b83871edde" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", + "reference": "f6293e1b30a2354e8428e004689671b83871edde", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.10.2", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "*", + "ext-xdebug": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.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" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-03-28T07:26:59+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:57:25+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.5.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "191768ccd5c85513b4068bdbe99bb6390c7d54fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/191768ccd5c85513b4068bdbe99bb6390c7d54fb", + "reference": "191768ccd5c85513b4068bdbe99bb6390c7d54fb", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.3", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3.4", + "sebastian/version": "^3.0.2" + }, + "require-dev": { + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.8" + }, + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-07-31T15:17:34+00:00" + }, + { + "name": "rector/rector", + "version": "0.11.49", + "source": { + "type": "git", + "url": "https://github.com/rectorphp/rector.git", + "reference": "fdf11ed923d79c1777f993ef755fc8fe111a25a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/fdf11ed923d79c1777f993ef755fc8fe111a25a2", + "reference": "fdf11ed923d79c1777f993ef755fc8fe111a25a2", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0", + "phpstan/phpstan": "0.12.95" + }, + "conflict": { + "phpstan/phpdoc-parser": "<=0.5.3", + "phpstan/phpstan": "<=0.12.82", + "rector/rector-cakephp": "*", + "rector/rector-doctrine": "*", + "rector/rector-nette": "*", + "rector/rector-phpunit": "*", + "rector/rector-prefixed": "*", + "rector/rector-symfony": "*" + }, + "bin": [ + "bin/rector" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.11-dev" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Prefixed and PHP 7.1 downgraded version of rector/rector", + "support": { + "issues": "https://github.com/rectorphp/rector/issues", + "source": "https://github.com/rectorphp/rector/tree/0.11.49" + }, + "funding": [ + { + "url": "https://github.com/tomasvotruba", + "type": "github" + } + ], + "time": "2021-08-23T11:18:30+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:49:45+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:52:38+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:24:23+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.3", "source": { "type": "git", - "url": "git://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "1.2.7" + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" }, "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/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", "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" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, - "suggest": { + "require-dev": { "ext-dom": "*", - "ext-xdebug": ">=2.0.5" + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" }, - "time": "2012-12-02 14:54:55", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, "autoload": { "classmap": [ - "PHP/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", "keywords": [ - "testing", - "coverage", - "xunit" - ] + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-11T13:31:12+00:00" }, { - "name": "phpunit/php-file-iterator", - "version": "1.3.3", + "name": "sebastian/lines-of-code", + "version": "1.0.3", "source": { "type": "git", - "url": "git://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "1.3.3" + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" }, "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/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", "shasum": "" }, "require": { - "php": ">=5.3.3" + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, - "time": "2012-10-11 04:44:38", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, "autoload": { "classmap": [ - "File/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "http://www.phpunit.de/", - "keywords": [ - "filesystem", - "iterator" - ] + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" }, { - "name": "phpunit/php-text-template", - "version": "1.1.4", + "name": "sebastian/object-enumerator", + "version": "4.0.4", "source": { "type": "git", - "url": "git://github.com/sebastianbergmann/php-text-template.git", - "reference": "1.1.4" + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" }, "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/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, - "time": "2012-10-31 11:15:28", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, "autoload": { "classmap": [ - "Text/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ] + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" }, { - "name": "phpunit/php-timer", - "version": "1.0.4", + "name": "sebastian/object-reflector", + "version": "2.0.4", "source": { "type": "git", - "url": "git://github.com/sebastianbergmann/php-timer.git", - "reference": "1.0.4" + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" }, "dist": { "type": "zip", - "url": "https://github.com/sebastianbergmann/php-timer/zipball/1.0.4", - "reference": "1.0.4", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, - "time": "2012-10-11 04:45:58", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "classmap": [ - "PHP/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "Utility class for timing", - "homepage": "http://www.phpunit.de/", - "keywords": [ - "timer" - ] + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" }, { - "name": "phpunit/php-token-stream", - "version": "1.1.5", + "name": "sebastian/recursion-context", + "version": "4.0.4", "source": { "type": "git", - "url": "git://github.com/sebastianbergmann/php-token-stream.git", - "reference": "1.1.5" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" }, "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/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, - "time": "2012-10-11 04:47:14", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, "autoload": { "classmap": [ - "PHP/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "http://www.phpunit.de/", - "keywords": [ - "tokenizer" - ] + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:17:30+00:00" }, { - "name": "phpunit/phpunit", - "version": "3.7.13", + "name": "sebastian/resource-operations", + "version": "3.0.3", "source": { "type": "git", - "url": "git://github.com/sebastianbergmann/phpunit.git", - "reference": "3.7.13" + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" }, "dist": { "type": "zip", - "url": "https://github.com/sebastianbergmann/phpunit/archive/3.7.13.zip", - "reference": "3.7.13", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", "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": ">=7.3" }, - "suggest": { - "phpunit/php-invoker": ">=1.1.0", - "ext-json": "*", - "ext-simplexml": "*", - "ext-tokenizer": "*" + "require-dev": { + "phpunit/phpunit": "^9.0" }, - "time": "2013-01-13 10:21:19", - "bin": [ - "composer/bin/phpunit" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "3.7.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { "classmap": [ - "PHPUnit/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "", - "../../symfony/yaml/" + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "2.3.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -298,89 +1967,105 @@ "role": "lead" } ], - "description": "The PHP Unit Testing framework.", - "homepage": "http://www.phpunit.de/", - "keywords": [ - "testing", - "phpunit", - "xunit" - ] + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-15T12:49:02+00:00" }, { - "name": "phpunit/phpunit-mock-objects", - "version": "1.2.3", + "name": "sebastian/version", + "version": "3.0.2", "source": { "type": "git", - "url": "git://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "1.2.3" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "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/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/php-text-template": ">=1.1.1@stable" - }, - "suggest": { - "ext-soap": "*" + "php": ">=7.3" }, - "time": "2013-01-13 10:24:48", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, "autoload": { "classmap": [ - "PHPUnit/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ] + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "1.4.3", + "version": "3.6.0", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer", - "reference": "1.4.3" + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625" }, "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/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625", "shasum": "" }, "require": { - "php": ">=5.1.2" + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, - "time": "2012-12-04 03:15:31", "bin": [ - "scripts/phpcs" + "bin/phpcs", + "bin/phpcbf" ], "type": "library", - "autoload": { - "classmap": [ - "." - ] + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -392,61 +2077,215 @@ "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", + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", "keywords": [ - "standards", - "phpcs" - ] + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2021-04-09T00:54:41+00:00" }, { - "name": "symfony/yaml", - "version": "v2.1.7", - "target-dir": "Symfony/Component/Yaml", + "name": "symfony/polyfill-ctype", + "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/symfony/Yaml", - "reference": "v2.1.7" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" }, "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/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" + }, + "suggest": { + "ext-ctype": "For best performance" }, - "time": "2013-01-17 21:21:51", "type": "library", - "autoload": { - "psr-0": { - "Symfony\\Component\\Yaml": "" + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" }, { "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-19T12:13:01+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.10.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], - "description": "Symfony Yaml Component", - "homepage": "http://symfony.com" + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.10.0" + }, + "time": "2021-03-09T10:59:23+00:00" } ], - "aliases": [ - - ], + "aliases": [], "minimum-stability": "stable", - "stability-flags": [ - - ] + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=8.0" + }, + "platform-dev": [], + "plugin-api-version": "2.1.0" } diff --git a/rector.php b/rector.php new file mode 100644 index 00000000..1aad037f --- /dev/null +++ b/rector.php @@ -0,0 +1,23 @@ +import(SetList::PHP_80); + // get parameters + $parameters = $containerConfigurator->parameters(); + + // Define what rule sets will be applied + $containerConfigurator->import(SetList::DEAD_CODE); + + // get services (needed for register a single rule) + // $services = $containerConfigurator->services(); + + // register a single rule + // $services->set(TypedPropertyRector::class); +}; diff --git a/src/Gedcom.php b/src/Gedcom.php index cfee5c88..efff3d54 100644 --- a/src/Gedcom.php +++ b/src/Gedcom.php @@ -92,8 +92,6 @@ class Gedcom /** * Retrieves the header record of the GEDCOM file. - * - * @param \Gedcom\Record\Head $head */ public function setHead (\Gedcom\Record\Head $head) { @@ -102,8 +100,6 @@ public function setHead (\Gedcom\Record\Head $head) /** * Retrieves the submission record of the GEDCOM file. - * - * @param \Gedcom\Record\Subn $subn */ public function setSubn (\Gedcom\Record\Subn $subn) { @@ -112,8 +108,6 @@ public function setSubn (\Gedcom\Record\Subn $subn) /** * Adds a source to the collection of sources. - * - * @param \Gedcom\Record\Sour $sour */ public function addSour (\Gedcom\Record\Sour $sour) { @@ -122,8 +116,6 @@ public function addSour (\Gedcom\Record\Sour $sour) /** * Adds an individual to the collection of individuals. - * - * @param \Gedcom\Record\Indi $indi */ public function addIndi (\Gedcom\Record\Indi $indi) { @@ -135,8 +127,6 @@ public function addIndi (\Gedcom\Record\Indi $indi) /** * Adds a family to the collection of families. - * - * @param \Gedcom\Record\Fam $fam */ public function addFam (\Gedcom\Record\Fam $fam) { @@ -145,8 +135,6 @@ public function addFam (\Gedcom\Record\Fam $fam) /** * Adds a note to the collection of notes. - * - * @param \Gedcom\Record\Note $note */ public function addNote (\Gedcom\Record\Note $note) { @@ -155,8 +143,6 @@ public function addNote (\Gedcom\Record\Note $note) /** * Adds a repository to the collection of repositories. - * - * @param \Gedcom\Record\Repo $repo */ public function addRepo (\Gedcom\Record\Repo $repo) { @@ -165,8 +151,6 @@ public function addRepo (\Gedcom\Record\Repo $repo) /** * Adds an object to the collection of objects. - * - * @param \Gedcom\Record\Obje $obje */ public function addObje (\Gedcom\Record\Obje $obje) { @@ -175,8 +159,6 @@ public function addObje (\Gedcom\Record\Obje $obje) /** * Adds a submitter record to the collection of submitters. - * - * @param \Gedcom\Record\Subm $subm */ public function addSubm (\Gedcom\Record\Subm $subm) { diff --git a/src/Parser.php b/src/Parser.php index c42ce21e..7a9e959f 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -16,9 +16,9 @@ class Parser { - protected $_file = null; + protected $_file; - protected $_gedcom = null; + protected $_gedcom; protected $_errorLog = []; @@ -26,7 +26,7 @@ class Parser protected $_line = ''; - protected $_lineRecord = null; + protected $_lineRecord; protected $_linePieces = 0; @@ -201,9 +201,8 @@ public function getErrors() public function normalizeIdentifier($identifier) { $identifier = trim($identifier); - $identifier = trim($identifier, '@'); - return $identifier; + return trim($identifier, '@'); } /** @@ -236,7 +235,7 @@ public function parse($fileName) if ($depth == 0) { // Although not always an identifier (HEAD,TRLR): if (isset($record[1])) { - $identifier = $this->normalizeIdentifier($record[1]); + $this->normalizeIdentifier($record[1]); } if (isset($record[1]) && trim($record[1]) == 'HEAD') { @@ -261,10 +260,10 @@ public function parse($fileName) // EOF break; } else { - $this->logUnhandledRecord(get_class().' @ '.__LINE__); + $this->logUnhandledRecord(self::class.' @ '.__LINE__); } } else { - $this->logUnhandledRecord(get_class().' @ '.__LINE__); + $this->logUnhandledRecord(self::class.' @ '.__LINE__); } $this->forward(); diff --git a/src/Parser/Addr.php b/src/Parser/Addr.php index 2d86ab43..2dcfa390 100644 --- a/src/Parser/Addr.php +++ b/src/Parser/Addr.php @@ -46,7 +46,7 @@ public static function parse(\Gedcom\Parser $parser) $addr->setAddr($addr->getAddr().trim($record[2])); } } else { - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } } diff --git a/src/Parser/Caln.php b/src/Parser/Caln.php index c35491f6..0f5762f1 100644 --- a/src/Parser/Caln.php +++ b/src/Parser/Caln.php @@ -46,7 +46,7 @@ public static function parse(\Gedcom\Parser $parser) if ($caln->hasAttribute($recordType)) { $caln->{'set'.$recordType}(trim($record[2])); } else { - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Chan.php b/src/Parser/Chan.php index 741543ed..4f355a17 100644 --- a/src/Parser/Chan.php +++ b/src/Parser/Chan.php @@ -49,7 +49,7 @@ public static function parse(\Gedcom\Parser $parser) } break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Fam.php b/src/Parser/Fam.php index e178c476..3b56c45c 100644 --- a/src/Parser/Fam.php +++ b/src/Parser/Fam.php @@ -125,7 +125,7 @@ public static function parse(\Gedcom\Parser $parser) break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Fam/Even.php b/src/Parser/Fam/Even.php index 81c86251..3358afb7 100644 --- a/src/Parser/Fam/Even.php +++ b/src/Parser/Fam/Even.php @@ -92,7 +92,7 @@ public static function parse(\Gedcom\Parser $parser) } break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Fam/Even/Husb.php b/src/Parser/Fam/Even/Husb.php index 802ec307..af251300 100644 --- a/src/Parser/Fam/Even/Husb.php +++ b/src/Parser/Fam/Even/Husb.php @@ -40,7 +40,7 @@ public static function parse(\Gedcom\Parser $parser) $husband->setAge(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Fam/Even/Wife.php b/src/Parser/Fam/Even/Wife.php index 46d9285c..c1da3c02 100644 --- a/src/Parser/Fam/Even/Wife.php +++ b/src/Parser/Fam/Even/Wife.php @@ -40,7 +40,7 @@ public static function parse(\Gedcom\Parser $parser) $wife->setAge(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Fam/Slgs.php b/src/Parser/Fam/Slgs.php index f7f8ef4b..474945f4 100644 --- a/src/Parser/Fam/Slgs.php +++ b/src/Parser/Fam/Slgs.php @@ -60,7 +60,7 @@ public static function parse(\Gedcom\Parser $parser) } break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Fam/Slgs/Stat.php b/src/Parser/Fam/Slgs/Stat.php index 9afbeac5..ec163e86 100644 --- a/src/Parser/Fam/Slgs/Stat.php +++ b/src/Parser/Fam/Slgs/Stat.php @@ -48,7 +48,7 @@ public static function parse(\Gedcom\Parser $parser) $stat->setDate(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Head.php b/src/Parser/Head.php index b7182db1..c5686b41 100644 --- a/src/Parser/Head.php +++ b/src/Parser/Head.php @@ -17,8 +17,6 @@ class Head extends \Gedcom\Parser\Component { /** - * @param \Gedcom\Parser $parser - * * @return \Gedcom\Record\Head */ public static function parse(\Gedcom\Parser $parser) @@ -26,7 +24,7 @@ public static function parse(\Gedcom\Parser $parser) $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[1])) { - $identifier = $parser->normalizeIdentifier($record[1]); + $parser->normalizeIdentifier($record[1]); } else { $parser->skipToNextLevel($depth); @@ -92,7 +90,7 @@ public static function parse(\Gedcom\Parser $parser) $head->setNote($parser->parseMultiLineRecord()); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Head/Char.php b/src/Parser/Head/Char.php index 5c2b62d1..97ae49ea 100644 --- a/src/Parser/Head/Char.php +++ b/src/Parser/Head/Char.php @@ -46,7 +46,7 @@ public static function parse(\Gedcom\Parser $parser) $char->setVers(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Head/Date.php b/src/Parser/Head/Date.php index b07ac049..b0a28873 100644 --- a/src/Parser/Head/Date.php +++ b/src/Parser/Head/Date.php @@ -46,7 +46,7 @@ public static function parse(\Gedcom\Parser $parser) $date->setTime(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Head/Gedc.php b/src/Parser/Head/Gedc.php index c3b27f6f..f74c7cbe 100644 --- a/src/Parser/Head/Gedc.php +++ b/src/Parser/Head/Gedc.php @@ -43,7 +43,7 @@ public static function parse(\Gedcom\Parser $parser) $gedc->setForm(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Head/Plac.php b/src/Parser/Head/Plac.php index dbf30eea..541132f9 100644 --- a/src/Parser/Head/Plac.php +++ b/src/Parser/Head/Plac.php @@ -40,7 +40,7 @@ public static function parse(\Gedcom\Parser $parser) $plac->setForm(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Head/Sour.php b/src/Parser/Head/Sour.php index 95728151..381c5e37 100644 --- a/src/Parser/Head/Sour.php +++ b/src/Parser/Head/Sour.php @@ -57,7 +57,7 @@ public static function parse(\Gedcom\Parser $parser) $source->setData($data); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Head/Sour/Corp.php b/src/Parser/Head/Sour/Corp.php index 4442604e..1eed32b2 100644 --- a/src/Parser/Head/Sour/Corp.php +++ b/src/Parser/Head/Sour/Corp.php @@ -49,7 +49,7 @@ public static function parse(\Gedcom\Parser $parser) $corp->addPhon(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Head/Sour/Data.php b/src/Parser/Head/Sour/Data.php index 47bb9d03..58090a24 100644 --- a/src/Parser/Head/Sour/Data.php +++ b/src/Parser/Head/Sour/Data.php @@ -49,7 +49,7 @@ public static function parse(\Gedcom\Parser $parser) $data->setCopr(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Indi.php b/src/Parser/Indi.php index 3fd6ede1..3aca2077 100644 --- a/src/Parser/Indi.php +++ b/src/Parser/Indi.php @@ -177,7 +177,7 @@ public static function parse(\Gedcom\Parser $parser) $indi->addObje($obje); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Indi/Asso.php b/src/Parser/Indi/Asso.php index bbcb2e1c..4fc024a1 100644 --- a/src/Parser/Indi/Asso.php +++ b/src/Parser/Indi/Asso.php @@ -56,7 +56,7 @@ public static function parse(\Gedcom\Parser $parser) } break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Indi/Attr.php b/src/Parser/Indi/Attr.php index 37530694..84431ae2 100644 --- a/src/Parser/Indi/Attr.php +++ b/src/Parser/Indi/Attr.php @@ -89,7 +89,7 @@ public static function parse(\Gedcom\Parser $parser) } break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Indi/Even.php b/src/Parser/Indi/Even.php index 368e8725..d7667c32 100644 --- a/src/Parser/Indi/Even.php +++ b/src/Parser/Indi/Even.php @@ -28,8 +28,6 @@ public static function parse(\Gedcom\Parser $parser) return null; } - $even = null; - if (strtoupper(trim($record[1])) != 'EVEN') { $className = 'GedcomRecordIndi'.ucfirst(strtolower(trim($record[1]))); $even = new $className(); diff --git a/src/Parser/Indi/Even/Plac.php b/src/Parser/Indi/Even/Plac.php index d0947847..dbc1d318 100644 --- a/src/Parser/Indi/Even/Plac.php +++ b/src/Parser/Indi/Even/Plac.php @@ -54,7 +54,7 @@ public static function parse(\Gedcom\Parser $parser) $plac->addSour($sour); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Indi/Famc.php b/src/Parser/Indi/Famc.php index c50ecc3e..86da0696 100644 --- a/src/Parser/Indi/Famc.php +++ b/src/Parser/Indi/Famc.php @@ -22,7 +22,7 @@ public static function parse(\Gedcom\Parser $parser) $depth = (int) $record[0]; if (count($record) < 3) { - $parser->logSkippedRecord('Missing family information; '.get_class(), ' @ '.__LINE__); + $parser->logSkippedRecord('Missing family information; '.self::class, ' @ '.__LINE__); $parser->skipToNextLevel($depth); return null; @@ -56,7 +56,7 @@ public static function parse(\Gedcom\Parser $parser) } break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Indi/Fams.php b/src/Parser/Indi/Fams.php index 71687986..f3a79eac 100644 --- a/src/Parser/Indi/Fams.php +++ b/src/Parser/Indi/Fams.php @@ -22,7 +22,7 @@ public static function parse(\Gedcom\Parser $parser) $depth = (int) $record[0]; if (count($record) < 3) { - $parser->logSkippedRecord('Missing family information; '.get_class(), ' @ '.__LINE__); + $parser->logSkippedRecord('Missing family information; '.self::class, ' @ '.__LINE__); $parser->skipToNextLevel($depth); return null; @@ -53,7 +53,7 @@ public static function parse(\Gedcom\Parser $parser) } break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Indi/Name.php b/src/Parser/Indi/Name.php index 8105ee60..3f6e7cb7 100644 --- a/src/Parser/Indi/Name.php +++ b/src/Parser/Indi/Name.php @@ -84,7 +84,7 @@ public static function parse(\Gedcom\Parser $parser) $name->setRomn(\Parser\Indi\Name\Romn::parse($parser)); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Indi/Name/Fone.php b/src/Parser/Indi/Name/Fone.php index ab20e952..a1f5e409 100644 --- a/src/Parser/Indi/Name/Fone.php +++ b/src/Parser/Indi/Name/Fone.php @@ -66,7 +66,7 @@ public static function parse(\Gedcom\Parser $parser) $fone->setNsfx(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Indi/Name/Romn.php b/src/Parser/Indi/Name/Romn.php index d5a1b095..ba4bc786 100644 --- a/src/Parser/Indi/Name/Romn.php +++ b/src/Parser/Indi/Name/Romn.php @@ -68,7 +68,7 @@ public static function parse(\Gedcom\Parser $parser) $romn->setNsfx(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Note.php b/src/Parser/Note.php index 6ee432c5..70a2da1f 100644 --- a/src/Parser/Note.php +++ b/src/Parser/Note.php @@ -75,7 +75,7 @@ public static function parse(\Gedcom\Parser $parser) $note->setChan($chan); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/NoteRef.php b/src/Parser/NoteRef.php index 0bb2a2b0..bfbd4966 100644 --- a/src/Parser/NoteRef.php +++ b/src/Parser/NoteRef.php @@ -24,7 +24,7 @@ public static function parse(\Gedcom\Parser $parser) $note = new \Gedcom\Record\NoteRef(); if (count($record) < 3) { - $parser->logSkippedRecord('Missing note information; '.get_class(), ' @ '.__LINE__); + $parser->logSkippedRecord('Missing note information; '.self::class, ' @ '.__LINE__); $parser->skipToNextLevel($depth); return null; @@ -34,7 +34,7 @@ public static function parse(\Gedcom\Parser $parser) $note->setIsReference(true); $note->setNote($parser->normalizeIdentifier($record[2])); } else { - $before = $parser->getCurrentLine(); + $parser->getCurrentLine(); $note->setIsReference(false); $note->setNote($parser->parseMultiLineRecord()); } @@ -57,7 +57,7 @@ public static function parse(\Gedcom\Parser $parser) $note->addSour($sour); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Obje.php b/src/Parser/Obje.php index c569d86b..db6a9668 100644 --- a/src/Parser/Obje.php +++ b/src/Parser/Obje.php @@ -64,9 +64,6 @@ public static function parse(\Gedcom\Parser $parser) } break; case 'SOUR': - $chan = \Gedcom\Parser\Chan::parse($parser); - $obje->setChan($chan); - break; case 'CHAN': $chan = \Gedcom\Parser\Chan::parse($parser); @@ -74,7 +71,7 @@ public static function parse(\Gedcom\Parser $parser) break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/ObjeRef.php b/src/Parser/ObjeRef.php index fcae92d1..538c6ddc 100644 --- a/src/Parser/ObjeRef.php +++ b/src/Parser/ObjeRef.php @@ -50,7 +50,7 @@ public static function parse(\Gedcom\Parser $parser) $obje->setFile(\Parser\ObjeRef\File::parse($parser)); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/ObjeRef/File.php b/src/Parser/ObjeRef/File.php index a22f4a82..b0710380 100644 --- a/src/Parser/ObjeRef/File.php +++ b/src/Parser/ObjeRef/File.php @@ -45,7 +45,7 @@ public static function parse(\Gedcom\Parser $parser) case 'TITL': $file->setTitl(trim($record[2])); default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/ObjeRef/File/Form.php b/src/Parser/ObjeRef/File/Form.php index f1fb8efb..307d0047 100644 --- a/src/Parser/ObjeRef/File/Form.php +++ b/src/Parser/ObjeRef/File/Form.php @@ -48,7 +48,7 @@ public static function parse(\Gedcom\Parser $parser) $form->setType(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Phon.php b/src/Parser/Phon.php index 3b206586..82ed5f6c 100644 --- a/src/Parser/Phon.php +++ b/src/Parser/Phon.php @@ -43,7 +43,7 @@ public static function parse(\Gedcom\Parser $parser) switch ($recordType) { default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Plac.php b/src/Parser/Plac.php index 487ced99..6a4e8af5 100644 --- a/src/Parser/Plac.php +++ b/src/Parser/Plac.php @@ -65,7 +65,7 @@ public static function parse(\Gedcom\Parser $parser) $plac->setMap($map); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Plac/Fone.php b/src/Parser/Plac/Fone.php index 639eb4f1..314301ff 100644 --- a/src/Parser/Plac/Fone.php +++ b/src/Parser/Plac/Fone.php @@ -48,7 +48,7 @@ public static function parse(\Gedcom\Parser $parser) $fone->setType(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Plac/Map.php b/src/Parser/Plac/Map.php index adf8df47..a7cf39d8 100644 --- a/src/Parser/Plac/Map.php +++ b/src/Parser/Plac/Map.php @@ -43,7 +43,7 @@ public static function parse(\Gedcom\Parser $parser) $map->setLong(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Plac/Romn.php b/src/Parser/Plac/Romn.php index d29aeb69..2bc9e442 100644 --- a/src/Parser/Plac/Romn.php +++ b/src/Parser/Plac/Romn.php @@ -48,7 +48,7 @@ public static function parse(\Gedcom\Parser $parser) $romn->setType(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Refn.php b/src/Parser/Refn.php index b4894a8a..6791ea21 100644 --- a/src/Parser/Refn.php +++ b/src/Parser/Refn.php @@ -46,7 +46,7 @@ public static function parse(\Gedcom\Parser $parser) $refn->setType(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Repo.php b/src/Parser/Repo.php index c8ce8bf8..39486e9f 100644 --- a/src/Parser/Repo.php +++ b/src/Parser/Repo.php @@ -82,7 +82,7 @@ public static function parse(\Gedcom\Parser $parser) $repo->setChan($chan); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/RepoRef.php b/src/Parser/RepoRef.php index 48c154c3..63af5d91 100644 --- a/src/Parser/RepoRef.php +++ b/src/Parser/RepoRef.php @@ -54,7 +54,7 @@ public static function parse(\Gedcom\Parser $parser) } break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Sour.php b/src/Parser/Sour.php index cfc76b16..526d38c2 100644 --- a/src/Parser/Sour.php +++ b/src/Parser/Sour.php @@ -89,7 +89,7 @@ public static function parse(\Gedcom\Parser $parser) $sour->addObje($obje); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Sour/Data.php b/src/Parser/Sour/Data.php index 081f9c0e..0818d8c2 100644 --- a/src/Parser/Sour/Data.php +++ b/src/Parser/Sour/Data.php @@ -55,7 +55,7 @@ public static function parse(\Gedcom\Parser $parser) $data->setText($parser->parseMultiLineRecord()); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Sour/Data/Even.php b/src/Parser/Sour/Data/Even.php index 4b386704..10d5975d 100644 --- a/src/Parser/Sour/Data/Even.php +++ b/src/Parser/Sour/Data/Even.php @@ -43,7 +43,7 @@ public static function parse(\Gedcom\Parser $parser) $even->setPlac(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Sour/Repo.php b/src/Parser/Sour/Repo.php index 6739cd0a..c2e9c2fd 100644 --- a/src/Parser/Sour/Repo.php +++ b/src/Parser/Sour/Repo.php @@ -46,7 +46,7 @@ public static function parse(\Gedcom\Parser $parser) $repo->addCaln(\Parser\Sour\Repo\Caln::parse($parser)); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Sour/Repo/Caln.php b/src/Parser/Sour/Repo/Caln.php index 10061af6..96b83f06 100644 --- a/src/Parser/Sour/Repo/Caln.php +++ b/src/Parser/Sour/Repo/Caln.php @@ -45,7 +45,7 @@ public static function parse(\Gedcom\Parser $parser) $caln->setMedi(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/SourRef.php b/src/Parser/SourRef.php index 389311dd..89f4e915 100644 --- a/src/Parser/SourRef.php +++ b/src/Parser/SourRef.php @@ -71,7 +71,7 @@ public static function parse(\Gedcom\Parser $parser) $sour->setQuay(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/SourRef/Data.php b/src/Parser/SourRef/Data.php index bdff2dd1..05ac8ce0 100644 --- a/src/Parser/SourRef/Data.php +++ b/src/Parser/SourRef/Data.php @@ -42,7 +42,7 @@ public static function parse(\Gedcom\Parser $parser) $data->setText($parser->parseMultiLineRecord()); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/SourRef/Even.php b/src/Parser/SourRef/Even.php index ef7968f4..2724058b 100644 --- a/src/Parser/SourRef/Even.php +++ b/src/Parser/SourRef/Even.php @@ -46,7 +46,7 @@ public static function parse(\Gedcom\Parser $parser) $even->setRole(trim($record[2])); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Subm.php b/src/Parser/Subm.php index 280df97e..0699daa9 100644 --- a/src/Parser/Subm.php +++ b/src/Parser/Subm.php @@ -93,7 +93,7 @@ public static function parse(\Gedcom\Parser $parser) $subm->addLang(isset($record[2]) ? trim($record[2]) : ''); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Parser/Subn.php b/src/Parser/Subn.php index b2a8f93a..025e64a6 100644 --- a/src/Parser/Subn.php +++ b/src/Parser/Subn.php @@ -78,7 +78,7 @@ public static function parse(\Gedcom\Parser $parser) $subn->setChan($chan); break; default: - $parser->logUnhandledRecord(get_class().' @ '.__LINE__); + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); } $parser->forward(); diff --git a/src/Record.php b/src/Record.php index fed79144..4bb92bce 100644 --- a/src/Record.php +++ b/src/Record.php @@ -22,7 +22,7 @@ public function __call($method, $args) $arr = strtolower(substr($method, 3)); if (!property_exists($this, '_'.$arr) || !is_array($this->{'_'.$arr})) { - throw new \Gedcom\Exception('Unknown '.get_class($this).'::'.$arr); + throw new \Gedcom\Exception('Unknown '.$this::class.'::'.$arr); } if (!is_array($args)) { @@ -45,7 +45,7 @@ public function __call($method, $args) $arr = strtolower(substr($method, 3)); if (!property_exists($this, '_'.$arr)) { - throw new \Gedcom\Exception('Unknown '.get_class($this).'::'.$arr); + throw new \Gedcom\Exception('Unknown '.$this::class.'::'.$arr); } if (!is_array($args)) { @@ -70,14 +70,14 @@ public function __call($method, $args) // hotfix getData if ('data' == $arr) { if (!property_exists($this, '_text')) { - throw new \Gedcom\Exception('Unknown '.get_class($this).'::'.$arr); + throw new \Gedcom\Exception('Unknown '.$this::class.'::'.$arr); } return $this->{'_text'}; } if (!property_exists($this, '_'.$arr)) { - throw new \Gedcom\Exception('Unknown '.get_class($this).'::'.$arr); + throw new \Gedcom\Exception('Unknown '.$this::class.'::'.$arr); } return $this->{'_'.$arr}; @@ -89,7 +89,7 @@ public function __call($method, $args) public function __set($var, $val) { // this class does not have any public vars - throw new \Gedcom\Exception('Undefined property '.get_class().'::'.$var); + throw new \Gedcom\Exception('Undefined property '.self::class.'::'.$var); } /** diff --git a/src/Record/Date.php b/src/Record/Date.php index 2761628b..d8eb29e2 100644 --- a/src/Record/Date.php +++ b/src/Record/Date.php @@ -24,7 +24,7 @@ class Date extends \Gedcom\Record /** * @var string */ - protected $date = null; + protected $date; /** * @var array diff --git a/src/Record/Fam.php b/src/Record/Fam.php index 575e9c00..bde80852 100644 --- a/src/Record/Fam.php +++ b/src/Record/Fam.php @@ -16,19 +16,19 @@ class Fam extends \Gedcom\Record implements Noteable, Sourceable, Objectable { - protected $_id = null; + protected $_id; - protected $_resn = null; + protected $_resn; protected $_even = []; - protected $_husb = null; + protected $_husb; - protected $_wife = null; + protected $_wife; protected $_chil = []; - protected $_nchi = null; + protected $_nchi; protected $_subm = []; @@ -36,9 +36,9 @@ class Fam extends \Gedcom\Record implements Noteable, Sourceable, Objectable protected $_refn = []; - protected $_rin = null; + protected $_rin; - protected $_chan = null; + protected $_chan; protected $_note = []; diff --git a/src/Record/Fam/Even.php b/src/Record/Fam/Even.php index aa18b20b..df6c90dc 100644 --- a/src/Record/Fam/Even.php +++ b/src/Record/Fam/Even.php @@ -27,20 +27,20 @@ */ class Even extends \Gedcom\Record implements Objectable, Sourceable, Noteable { - protected $_type = null; - protected $_date = null; - protected $_plac = null; - protected $_caus = null; - protected $_age = null; + protected $_type; + protected $_date; + protected $_plac; + protected $_caus; + protected $_age; - protected $_addr = null; + protected $_addr; protected $_phon = []; - protected $_agnc = null; + protected $_agnc; - protected $_husb = null; - protected $_wife = null; + protected $_husb; + protected $_wife; protected $_obje = []; diff --git a/src/Record/Fam/Even/Husb.php b/src/Record/Fam/Even/Husb.php index a7a9f8de..d3ad66eb 100644 --- a/src/Record/Fam/Even/Husb.php +++ b/src/Record/Fam/Even/Husb.php @@ -16,5 +16,5 @@ class Husb extends \Gedcom\Record { - protected $_age = null; + protected $_age; } diff --git a/src/Record/Fam/Even/Wife.php b/src/Record/Fam/Even/Wife.php index 3f618a9a..1f58cd40 100644 --- a/src/Record/Fam/Even/Wife.php +++ b/src/Record/Fam/Even/Wife.php @@ -16,5 +16,5 @@ class Wife extends \Gedcom\Record { - protected $_age = null; + protected $_age; } diff --git a/src/Record/Fam/Slgs/Stat.php b/src/Record/Fam/Slgs/Stat.php index c312f8c7..c19ad201 100644 --- a/src/Record/Fam/Slgs/Stat.php +++ b/src/Record/Fam/Slgs/Stat.php @@ -20,10 +20,10 @@ class Stat extends \Gedcom\Record * string lds_spouse_sealing_date_status * 2020/06/27 blue. */ - protected $_stat = null; + protected $_stat; /** * string change_date. */ - protected $_date = null; + protected $_date; } diff --git a/src/Record/Head.php b/src/Record/Head.php index 5fab8814..d445a15b 100644 --- a/src/Record/Head.php +++ b/src/Record/Head.php @@ -24,62 +24,62 @@ class Head extends \Gedcom\Record /** * @var Head\Sour */ - protected $sour = null; + protected $sour; /** * @var string */ - protected $dest = null; + protected $dest; /** * @var Head\Date */ - protected $date = null; + protected $date; /** * @var string */ - protected $subm = null; + protected $subm; /** * @var string */ - protected $subn = null; + protected $subn; /** * @var string */ - protected $file = null; + protected $file; /** * @var string */ - protected $copr = null; + protected $copr; /** * @var Head\Gedc */ - protected $gedc = null; + protected $gedc; /** * @var Head\Char */ - protected $char = null; + protected $char; /** * @var string */ - protected $lang = null; + protected $lang; /** * @var Head\Plac */ - protected $plac = null; + protected $plac; /** * @var string */ - protected $note = null; + protected $note; /** * @param \Gedcom\Record\Head\Sour $sour diff --git a/src/Record/Head/Char.php b/src/Record/Head/Char.php index e671cf27..b0aedf92 100644 --- a/src/Record/Head/Char.php +++ b/src/Record/Head/Char.php @@ -16,6 +16,6 @@ class Char extends \Gedcom\Record { - protected $_char = null; - protected $_vers = null; + protected $_char; + protected $_vers; } diff --git a/src/Record/Head/Date.php b/src/Record/Head/Date.php index 3d827035..0f9e8608 100644 --- a/src/Record/Head/Date.php +++ b/src/Record/Head/Date.php @@ -16,6 +16,6 @@ class Date extends \Gedcom\Record { - protected $_date = null; - protected $_time = null; + protected $_date; + protected $_time; } diff --git a/src/Record/Head/Gedc.php b/src/Record/Head/Gedc.php index 28e5c0fb..c62c4e04 100644 --- a/src/Record/Head/Gedc.php +++ b/src/Record/Head/Gedc.php @@ -16,9 +16,9 @@ class Gedc extends \Gedcom\Record { - protected $_vers = null; + protected $_vers; - protected $_form = null; + protected $_form; /** * @return Gedc/version diff --git a/src/Record/Head/Plac.php b/src/Record/Head/Plac.php index 95b45e27..70ea4bfd 100644 --- a/src/Record/Head/Plac.php +++ b/src/Record/Head/Plac.php @@ -16,5 +16,5 @@ class Plac extends \Gedcom\Record { - protected $_form = null; + protected $_form; } diff --git a/src/Record/Head/Sour.php b/src/Record/Head/Sour.php index bd2a6974..b1a9281c 100644 --- a/src/Record/Head/Sour.php +++ b/src/Record/Head/Sour.php @@ -16,15 +16,15 @@ class Sour extends \Gedcom\Record { - protected $_sour = null; + protected $_sour; - protected $_vers = null; + protected $_vers; - protected $_name = null; + protected $_name; - protected $_corp = null; + protected $_corp; - protected $_data = null; + protected $_data; /** * @param Sour\Corp $corp diff --git a/src/Record/Head/Sour/Corp.php b/src/Record/Head/Sour/Corp.php index c8b5d581..4eb29203 100644 --- a/src/Record/Head/Sour/Corp.php +++ b/src/Record/Head/Sour/Corp.php @@ -16,8 +16,8 @@ class Corp extends \Gedcom\Record { - protected $_corp = null; - protected $_addr = null; + protected $_corp; + protected $_addr; protected $_phon = []; diff --git a/src/Record/Head/Sour/Data.php b/src/Record/Head/Sour/Data.php index a8f90912..cf09846d 100644 --- a/src/Record/Head/Sour/Data.php +++ b/src/Record/Head/Sour/Data.php @@ -16,7 +16,7 @@ class Data extends \Gedcom\Record { - protected $_data = null; - protected $_date = null; - protected $_copr = null; + protected $_data; + protected $_date; + protected $_copr; } diff --git a/src/Record/Indi/Adop.php b/src/Record/Indi/Adop.php index bfdc769e..d63a3647 100644 --- a/src/Record/Indi/Adop.php +++ b/src/Record/Indi/Adop.php @@ -16,6 +16,6 @@ class Adop extends \Gedcom\Record\Indi\Even { - protected $_adop = null; - protected $_famc = null; + protected $_adop; + protected $_famc; } diff --git a/src/Record/Indi/Asso.php b/src/Record/Indi/Asso.php index bc19952f..02ad6580 100644 --- a/src/Record/Indi/Asso.php +++ b/src/Record/Indi/Asso.php @@ -19,8 +19,8 @@ class Asso extends \Gedcom\Record implements Sourceable, Noteable { - protected $_indi = null; - protected $_rela = null; + protected $_indi; + protected $_rela; protected $_note = []; diff --git a/src/Record/Indi/Attr.php b/src/Record/Indi/Attr.php index 93a99775..b041f7c1 100644 --- a/src/Record/Indi/Attr.php +++ b/src/Record/Indi/Attr.php @@ -20,8 +20,8 @@ class Attr extends \Gedcom\Record\Indi\Even implements Sourceable, Noteable, Objectable { - protected $type = null; - protected $_attr = null; + protected $type; + protected $_attr; protected $sour = []; diff --git a/src/Record/Indi/Chr.php b/src/Record/Indi/Chr.php index e6d9eaf0..45b80d19 100644 --- a/src/Record/Indi/Chr.php +++ b/src/Record/Indi/Chr.php @@ -16,5 +16,5 @@ class Chr extends \Gedcom\Record\Indi\Even { - protected $_famc = null; + protected $_famc; } diff --git a/src/Record/Indi/Famc.php b/src/Record/Indi/Famc.php index e66d2c88..3ae88ef4 100644 --- a/src/Record/Indi/Famc.php +++ b/src/Record/Indi/Famc.php @@ -18,8 +18,8 @@ class Famc extends \Gedcom\Record implements Noteable { - protected $_famc = null; - protected $_pedi = null; + protected $_famc; + protected $_pedi; protected $_note = []; diff --git a/src/Record/Indi/Fams.php b/src/Record/Indi/Fams.php index 90d463f5..1d8646bf 100644 --- a/src/Record/Indi/Fams.php +++ b/src/Record/Indi/Fams.php @@ -18,7 +18,7 @@ class Fams extends \Gedcom\Record implements Noteable { - protected $_fams = null; + protected $_fams; protected $_note = []; diff --git a/src/Record/Indi/Name.php b/src/Record/Indi/Name.php index 10ca61d0..9336f20d 100644 --- a/src/Record/Indi/Name.php +++ b/src/Record/Indi/Name.php @@ -25,16 +25,16 @@ */ class Name extends \Gedcom\Record implements \Gedcom\Record\Sourceable { - protected $_name = null; - protected $_npfx = null; - protected $_givn = null; - protected $_nick = null; - protected $_spfx = null; - protected $_surn = null; - protected $_nsfx = null; - protected $_fone = null; // Gedcom/ - protected $_romn = null; - protected $_type = null; + protected $_name; + protected $_npfx; + protected $_givn; + protected $_nick; + protected $_spfx; + protected $_surn; + protected $_nsfx; + protected $_fone; // Gedcom/ + protected $_romn; + protected $_type; protected $_note = []; diff --git a/src/Record/Indi/Name/Fone.php b/src/Record/Indi/Name/Fone.php index 2d9f8f5a..ba4c641d 100644 --- a/src/Record/Indi/Name/Fone.php +++ b/src/Record/Indi/Name/Fone.php @@ -33,27 +33,27 @@ class Fone extends \Gedcom\Record /** * string name_piece_prefix. */ - protected $_npfx = null; + protected $_npfx; /** * string name_piece_given. */ - protected $_givn = null; + protected $_givn; /** * string name_piece_nickname. */ - protected $_nick = null; + protected $_nick; /** * strign name_piece_surname_prefix. */ - protected $_spfx = null; + protected $_spfx; /** * string name_piece_surname. */ - protected $_surn = null; + protected $_surn; /** * string name_piece_suffix. */ - protected $_nsfx = null; + protected $_nsfx; /** * PhpRecord\NoteRef. diff --git a/src/Record/Indi/Name/Romn.php b/src/Record/Indi/Name/Romn.php index 05296dee..b525a74f 100644 --- a/src/Record/Indi/Name/Romn.php +++ b/src/Record/Indi/Name/Romn.php @@ -33,27 +33,27 @@ class Romn extends \Gedcom\Record /** * string name_piece_prefix. */ - protected $_npfx = null; + protected $_npfx; /** * string name_piece_given. */ - protected $_givn = null; + protected $_givn; /** * string name_piece_nickname. */ - protected $_nick = null; + protected $_nick; /** * strign name_piece_surname_prefix. */ - protected $_spfx = null; + protected $_spfx; /** * string name_piece_surname. */ - protected $_surn = null; + protected $_surn; /** * string name_piece_suffix. */ - protected $_nsfx = null; + protected $_nsfx; /** * PhpRecord\NoteRef. diff --git a/src/Record/Indi/Slgc.php b/src/Record/Indi/Slgc.php index 6dc1e6c0..28b1815a 100644 --- a/src/Record/Indi/Slgc.php +++ b/src/Record/Indi/Slgc.php @@ -16,5 +16,5 @@ class Slgc extends Lds { - protected $_famc = null; + protected $_famc; } diff --git a/src/Record/Note.php b/src/Record/Note.php index 3a6b9a9e..6fd4b913 100644 --- a/src/Record/Note.php +++ b/src/Record/Note.php @@ -16,15 +16,15 @@ class Note extends \Gedcom\Record implements Sourceable { - protected $_id = null; - protected $_note = null; + protected $_id; + protected $_note; - protected $_even = null; + protected $_even; protected $_refn = []; - protected $_rin = null; + protected $_rin; protected $_sour = []; - protected $_chan = null; + protected $_chan; public function addRefn($refn = []) { diff --git a/src/Record/Obje.php b/src/Record/Obje.php index e660f0ae..ff347cc6 100644 --- a/src/Record/Obje.php +++ b/src/Record/Obje.php @@ -16,11 +16,11 @@ class Obje extends \Gedcom\Record implements Noteable { - protected $_id = null; + protected $_id; protected $_file = []; - protected $_rin = null; - protected $_chan = null; + protected $_rin; + protected $_chan; protected $_refn = []; diff --git a/src/Record/ObjeRef.php b/src/Record/ObjeRef.php index 9781ec9e..85065c56 100644 --- a/src/Record/ObjeRef.php +++ b/src/Record/ObjeRef.php @@ -18,11 +18,11 @@ class ObjeRef extends \Gedcom\Record { protected $_isRef = false; - protected $_obje = null; + protected $_obje; - protected $_titl = null; + protected $_titl; - protected $_file = null; + protected $_file; public function setIsReference($isReference = true) { diff --git a/src/Record/Phon.php b/src/Record/Phon.php index 0d69e138..b4daf055 100644 --- a/src/Record/Phon.php +++ b/src/Record/Phon.php @@ -24,7 +24,7 @@ class Phon extends \Gedcom\Record /** * @var string */ - protected $phon = null; + protected $phon; /** * @param $phon diff --git a/src/Record/Plac.php b/src/Record/Plac.php index 749dbb14..4090202c 100644 --- a/src/Record/Plac.php +++ b/src/Record/Plac.php @@ -19,27 +19,27 @@ class Plac extends \Gedcom\Record implements Noteable /** * string plac. */ - protected $_plac = null; + protected $_plac; /** * string place_hierarchy. */ - protected $_form = null; + protected $_form; /** * array PhpRecord\Plac\Fone. */ - protected $_fone = null; + protected $_fone; /** * array PhpRecord\Plac\Romn. */ - protected $_romn = null; + protected $_romn; /** * PhpRecord\Plac\Map. */ - protected $_map = null; + protected $_map; /** * array PhpRecord\NoteRef. */ - protected $_note = null; + protected $_note; /** * @param PhpRecord\NoteRef $note diff --git a/src/Record/RepoRef.php b/src/Record/RepoRef.php index 70580625..be0b3b8b 100644 --- a/src/Record/RepoRef.php +++ b/src/Record/RepoRef.php @@ -16,7 +16,7 @@ class RepoRef extends \Gedcom\Record implements Noteable { - protected $_repo = null; + protected $_repo; protected $_caln = []; diff --git a/src/Record/Sour/Data.php b/src/Record/Sour/Data.php index 5322995b..3ae92e92 100644 --- a/src/Record/Sour/Data.php +++ b/src/Record/Sour/Data.php @@ -19,10 +19,10 @@ class Data extends \Gedcom\Record implements Noteable { protected $_even = []; - protected $_agnc = null; - protected $_date = null; + protected $_agnc; + protected $_date; - protected $_text = null; + protected $_text; protected $_note = []; diff --git a/src/Record/Sour/Data/Even.php b/src/Record/Sour/Data/Even.php index 7cd96073..4ba9107e 100644 --- a/src/Record/Sour/Data/Even.php +++ b/src/Record/Sour/Data/Even.php @@ -16,6 +16,6 @@ class Even extends \Gedcom\Record { - protected $_date = null; - protected $_plac = null; + protected $_date; + protected $_plac; } diff --git a/src/Record/Sour/Repo.php b/src/Record/Sour/Repo.php index 8306402c..91a0a4fd 100644 --- a/src/Record/Sour/Repo.php +++ b/src/Record/Sour/Repo.php @@ -18,7 +18,7 @@ class Repo extends \Gedcom\Record implements Noteable { - protected $_repo = null; + protected $_repo; /** * array PhpRecord\Sour\Repo\Caln. */ diff --git a/src/Record/Sour/Repo/Caln.php b/src/Record/Sour/Repo/Caln.php index f2291a8b..d6cb32aa 100644 --- a/src/Record/Sour/Repo/Caln.php +++ b/src/Record/Sour/Repo/Caln.php @@ -19,9 +19,9 @@ class Caln extends \Gedcom\Record /** * string source_call_number. */ - protected $_caln = null; + protected $_caln; /** * string source_media_type. */ - protected $_medi = null; + protected $_medi; } diff --git a/src/Record/SourRef.php b/src/Record/SourRef.php index e495f57e..35da924a 100644 --- a/src/Record/SourRef.php +++ b/src/Record/SourRef.php @@ -18,12 +18,12 @@ class SourRef extends \Gedcom\Record { protected $_isRef = false; - protected $_sour = null; - protected $_page = null; - protected $_even = null; - protected $_data = null; - protected $_quay = null; - protected $_text = null; + protected $_sour; + protected $_page; + protected $_even; + protected $_data; + protected $_quay; + protected $_text; protected $_obje = []; protected $_note = []; diff --git a/src/Record/SourRef/Data.php b/src/Record/SourRef/Data.php index 1b73550c..465e5bfb 100644 --- a/src/Record/SourRef/Data.php +++ b/src/Record/SourRef/Data.php @@ -19,9 +19,9 @@ class Data extends \Gedcom\Record /** * string entry_recording_date. */ - protected $_date = null; + protected $_date; /** * string text_from_source. */ - protected $_text = null; + protected $_text; } diff --git a/src/Record/SourRef/Even.php b/src/Record/SourRef/Even.php index dc902604..4a155961 100644 --- a/src/Record/SourRef/Even.php +++ b/src/Record/SourRef/Even.php @@ -16,6 +16,6 @@ class Even extends \Gedcom\Record { - protected $_even = null; - protected $_role = null; + protected $_even; + protected $_role; } diff --git a/src/Record/Subn.php b/src/Record/Subn.php index 49aa9f87..1a3c058b 100644 --- a/src/Record/Subn.php +++ b/src/Record/Subn.php @@ -69,7 +69,7 @@ class Subn extends \Gedcom\Record /** * @var \Gedcom\Record\Chan */ - protected $_chan = null; + protected $_chan; public function setChan($chan) { diff --git a/src/Writer.php b/src/Writer.php index 0ed3bdbf..00d65c05 100644 --- a/src/Writer.php +++ b/src/Writer.php @@ -28,7 +28,7 @@ class Writer { const GEDCOM55 = 'gedcom5.5'; - protected $_output = null; + protected $_output; /** * @param $gedcom The GEDCOM object diff --git a/src/Writer/Addr.php b/src/Writer/Addr.php index deef3b95..f14ba562 100644 --- a/src/Writer/Addr.php +++ b/src/Writer/Addr.php @@ -17,10 +17,8 @@ class Addr { /** - * @param \Gedcom\Record\Addr $addr * @param string $format * @param int $level - * * @return string */ public static function convert (\Gedcom\Record\Addr &$addr, $format = self::GEDCOM55, $level = 1) @@ -35,13 +33,11 @@ public static function convert (\Gedcom\Record\Addr &$addr, $format = self::GEDC $output .= ($level + 1).' CONT '.$cont."\n"; } - $output .= ($level + 1).' ADR1 '.$addr->adr1."\n". + return $output . (($level + 1).' ADR1 '.$addr->adr1."\n". ($level + 1).' ADR2 '.$addr->getAdr2()."\n". ($level + 1).' CITY '.$addr->getCity()."\n". ($level + 1).' STAE '.$addr->getStae()."\n". ($level + 1).' POST '.$addr->getPost()."\n". - ($level + 1).' CTRY '.$addr->getCtry()."\n"; - - return $output; + ($level + 1).' CTRY '.$addr->getCtry()."\n"); } } diff --git a/src/Writer/Fam/Even.php b/src/Writer/Fam/Even.php index 23354236..2ac0a664 100644 --- a/src/Writer/Fam/Even.php +++ b/src/Writer/Fam/Even.php @@ -17,9 +17,7 @@ class Even { /** - * @param \Gedcom\Record\Fam\Even $even * @param int $level - * * @return string */ public static function convert (\Gedcom\Record\Fam\Even &$even, $level) diff --git a/src/Writer/Fam/Slgs.php b/src/Writer/Fam/Slgs.php index 108d38e3..08ebd387 100644 --- a/src/Writer/Fam/Slgs.php +++ b/src/Writer/Fam/Slgs.php @@ -17,9 +17,7 @@ class Slgs { /** - * @param \Gedcom\Record\Fam\Slgs $slgs * @param int $level - * * @return string */ public static function convert (\Gedcom\Record\Fam\Slgs &$slgs, $level) diff --git a/src/Writer/Head.php b/src/Writer/Head.php index 440028f0..3dd42c3c 100644 --- a/src/Writer/Head.php +++ b/src/Writer/Head.php @@ -17,9 +17,7 @@ class Head { /** - * @param \Gedcom\Record\Head $head * @param string $format - * * @return string */ public static function convert (\Gedcom\Record\Head &$head, $format = self::GEDCOM55) diff --git a/src/Writer/Head/Char.php b/src/Writer/Head/Char.php index b11aa694..6d942961 100644 --- a/src/Writer/Head/Char.php +++ b/src/Writer/Head/Char.php @@ -17,10 +17,8 @@ class Char { /** - * @param \Gedcom\Record\Head\Char $char * @param string $format * @param int $level - * * @return string */ public static function convert (\Gedcom\Record\Head\Char &$char, $level) diff --git a/src/Writer/Head/Date.php b/src/Writer/Head/Date.php index b5abe28a..1875d3a3 100644 --- a/src/Writer/Head/Date.php +++ b/src/Writer/Head/Date.php @@ -17,10 +17,8 @@ class Date { /** - * @param \Gedcom\Record\Head\Date $date * @param string $format * @param int $level - * * @return string */ public static function convert (\Gedcom\Record\Head\Date &$date, $level) diff --git a/src/Writer/Head/Gedc.php b/src/Writer/Head/Gedc.php index 5d850119..6e2a77dc 100644 --- a/src/Writer/Head/Gedc.php +++ b/src/Writer/Head/Gedc.php @@ -17,10 +17,8 @@ class Gedc { /** - * @param \Gedcom\Record\Head\Gedc $gedc * @param string $format * @param int $level - * * @return string */ public static function convert (\Gedcom\Record\Head\Gedc &$gedc, $level) diff --git a/src/Writer/Head/Plac.php b/src/Writer/Head/Plac.php index 7717fc80..9bc5cef5 100644 --- a/src/Writer/Head/Plac.php +++ b/src/Writer/Head/Plac.php @@ -17,10 +17,8 @@ class Plac { /** - * @param \Gedcom\Record\Head\Plac $plac * @param string $format * @param int $level - * * @return string */ public static function convert (\Gedcom\Record\Head\Plac &$plac, $level) diff --git a/src/Writer/Head/Sour.php b/src/Writer/Head/Sour.php index 79786a8a..661f52e1 100644 --- a/src/Writer/Head/Sour.php +++ b/src/Writer/Head/Sour.php @@ -17,10 +17,8 @@ class Sour { /** - * @param \Gedcom\Record\Head\Sour $sour * @param string $format * @param int $level - * * @return string */ public static function convert (\Gedcom\Record\Head\Sour &$sour, $level) diff --git a/src/Writer/Head/Sour/Corp.php b/src/Writer/Head/Sour/Corp.php index 21a68124..05256a77 100644 --- a/src/Writer/Head/Sour/Corp.php +++ b/src/Writer/Head/Sour/Corp.php @@ -17,10 +17,8 @@ class Corp { /** - * @param \Gedcom\Record\Head\Sour\Corp $corp * @param string $format * @param int $level - * * @return string */ public static function convert (\Gedcom\Record\Head\Sour\Corp &$corp, $level) diff --git a/src/Writer/Head/Sour/Data.php b/src/Writer/Head/Sour/Data.php index a9aedcab..316c9054 100644 --- a/src/Writer/Head/Sour/Data.php +++ b/src/Writer/Head/Sour/Data.php @@ -17,10 +17,8 @@ class Data { /** - * @param \Gedcom\Record\Head\Sour\Data $data * @param string $format * @param int $level - * * @return string */ public static function convert (\Gedcom\Record\Head\Sour\Data &$data, $level) diff --git a/src/Writer/Indi.php b/src/Writer/Indi.php index d2f26dc6..f379cf33 100644 --- a/src/Writer/Indi.php +++ b/src/Writer/Indi.php @@ -17,9 +17,7 @@ class Indi { /** - * @param \Gedcom\Record\Indi $indi * @param string $format - * * @return string */ public static function convert (\Gedcom\Record\Indi &$indi) diff --git a/src/Writer/Indi/Attr.php b/src/Writer/Indi/Attr.php index fdb1aec9..c704b53e 100644 --- a/src/Writer/Indi/Attr.php +++ b/src/Writer/Indi/Attr.php @@ -17,15 +17,11 @@ class Attr { /** - * @param \Gedcom\Record\Indi\Attr $attr * @param int $level - * * @return string */ public static function convert (\Gedcom\Record\Indi\Attr &$attr, $level = 0) { - $output = ''; - - return $output; + return ''; } } diff --git a/src/Writer/Indi/Even.php b/src/Writer/Indi/Even.php index 18b438e4..4fbe126e 100644 --- a/src/Writer/Indi/Even.php +++ b/src/Writer/Indi/Even.php @@ -17,9 +17,7 @@ class Even { /** - * @param \Gedcom\Record\Indi\Even $even * @param int $level - * * @return string */ public static function convert (\Gedcom\Record\Indi\Even &$even, $level = 0) diff --git a/src/Writer/Indi/Even/Plac.php b/src/Writer/Indi/Even/Plac.php index 240600b4..9fa713eb 100644 --- a/src/Writer/Indi/Even/Plac.php +++ b/src/Writer/Indi/Even/Plac.php @@ -17,9 +17,7 @@ class Plac { /** - * @param \Gedcom\Record\Indi\Even\Plac $plac * @param int $level - * * @return string */ public static function convert (\Gedcom\Record\Indi\Even\Plac &$plac, $level = 0) diff --git a/src/Writer/NoteRef.php b/src/Writer/NoteRef.php index 9e68504b..97b15c4a 100644 --- a/src/Writer/NoteRef.php +++ b/src/Writer/NoteRef.php @@ -17,9 +17,7 @@ class NoteRef { /** - * @param \Gedcom\Record\NoteRef $note * @param int $level - * * @return string */ public static function convert (\Gedcom\Record\NoteRef &$note, $level) diff --git a/src/Writer/Phon.php b/src/Writer/Phon.php index 97827445..e700859f 100644 --- a/src/Writer/Phon.php +++ b/src/Writer/Phon.php @@ -25,8 +25,6 @@ class Phon */ public static function convert($phon, $level = 1) { - $output = "{$level} PHON ".$phon."\n"; - - return $output; + return "{$level} PHON ".$phon."\n"; } } diff --git a/src/Writer/RepoRef.php b/src/Writer/RepoRef.php index 72e64d1a..54060fe3 100644 --- a/src/Writer/RepoRef.php +++ b/src/Writer/RepoRef.php @@ -17,9 +17,7 @@ class RepoRef { /** - * @param \Gedcom\Record\RepoRef $reporef * @param int $level - * * @return string */ public static function convert (\Gedcom\Record\RepoRef &$reporef, $level) diff --git a/src/Writer/Sour.php b/src/Writer/Sour.php index 9cb516d9..82b17d02 100644 --- a/src/Writer/Sour.php +++ b/src/Writer/Sour.php @@ -17,9 +17,7 @@ class Sour { /** - * @param \Gedcom\Record\Sour $sour * @param int $level - * * @return string */ public static function convert (\Gedcom\Record\Sour &$sour, $level) diff --git a/src/Writer/Sour/Data.php b/src/Writer/Sour/Data.php index 7cc9596c..0539ee51 100644 --- a/src/Writer/Sour/Data.php +++ b/src/Writer/Sour/Data.php @@ -17,15 +17,11 @@ class Data { /** - * @param \Gedcom\Record\Sour\Data $data * @param int $level - * * @return string */ public static function convert (\Gedcom\Record\Sour\Data &$data, $level = 0) { - $output = ''; - $output = $level." DATA\n"; $level++; diff --git a/src/Writer/Sour/Data/Even.php b/src/Writer/Sour/Data/Even.php index e7f164e5..470e51bd 100644 --- a/src/Writer/Sour/Data/Even.php +++ b/src/Writer/Sour/Data/Even.php @@ -17,15 +17,11 @@ class Even { /** - * @param \Gedcom\Record\Sour\Data\Even $even * @param int $level - * * @return string */ public static function convert (\Gedcom\Record\Sour\Data\Even &$even, $level) { - $output = ''; - $output = $level." EVEN\n"; $level++; diff --git a/src/Writer/SourRef.php b/src/Writer/SourRef.php index eb314c3a..1dfa7996 100644 --- a/src/Writer/SourRef.php +++ b/src/Writer/SourRef.php @@ -17,9 +17,7 @@ class SourRef { /** - * @param \Gedcom\Record\SourRef $sour * @param int $level - * * @return string */ public static function convert (\Gedcom\Record\SourRef &$sour, $level) diff --git a/src/Writer/SourRef/Even.php b/src/Writer/SourRef/Even.php index 4ad1c695..5605e244 100644 --- a/src/Writer/SourRef/Even.php +++ b/src/Writer/SourRef/Even.php @@ -17,9 +17,7 @@ class Even { /** - * @param \Gedcom\Record\SourRef\Even $even * @param int $level - * * @return string */ public static function convert (\Gedcom\Record\SourRef\Even &$even, $level = 0) From dc9108661f0f4846030ab6a0dda0fcfb5828bf46 Mon Sep 17 00:00:00 2001 From: Heru Firmansyah Date: Wed, 25 Aug 2021 12:54:41 +0800 Subject: [PATCH 81/99] Fix error when import gedcom file --- src/Parser/Date.php | 10 +++++++++- src/Parser/Head/Sour.php | 2 +- src/Parser/Head/Sour/Corp.php | 2 +- src/Parser/Indi.php | 4 ++++ src/Parser/Sour.php | 4 ++-- src/Record/Indi.php | 14 ++++++++++++++ 6 files changed, 31 insertions(+), 5 deletions(-) diff --git a/src/Parser/Date.php b/src/Parser/Date.php index 652e125b..1154905d 100644 --- a/src/Parser/Date.php +++ b/src/Parser/Date.php @@ -20,6 +20,10 @@ public static function parse(\Gedcom\Parser $parser) { $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; + + $parser->forward(); + $record = $parser->getCurrentLineRecord(); + if (isset($record[1])) { $dat = new \Gedcom\Record\Date(); if (!empty($record[2])) { @@ -30,7 +34,11 @@ public static function parse(\Gedcom\Parser $parser) return null; } + + if ($dat->getYear() && $dat->getMonth() && $dat->getDay()) { + return $dat->getYear() .'-'. substr("0{$dat->getMonth()}", -2) .'-'. substr("0{$dat->getDay()}", -2); + } - return $dat; + return null; } } diff --git a/src/Parser/Head/Sour.php b/src/Parser/Head/Sour.php index 95728151..d5586ff9 100644 --- a/src/Parser/Head/Sour.php +++ b/src/Parser/Head/Sour.php @@ -49,7 +49,7 @@ public static function parse(\Gedcom\Parser $parser) $source->setName(trim($record[2])); break; case 'CORP': - $corp = Parser\Head\Sour\Corp::parse($parser); + $corp = \Gedcom\Parser\Head\Sour\Corp::parse($parser); $source->setCorp($corp); break; case 'DATA': diff --git a/src/Parser/Head/Sour/Corp.php b/src/Parser/Head/Sour/Corp.php index 4442604e..39e9d839 100644 --- a/src/Parser/Head/Sour/Corp.php +++ b/src/Parser/Head/Sour/Corp.php @@ -43,7 +43,7 @@ public static function parse(\Gedcom\Parser $parser) switch ($recordType) { case 'ADDR': - $corp->setAddr(\Parser\Addr::parse($parser)); + $corp->setAddr(\Gedcom\Parser\Addr::parse($parser)); break; case 'PHON': $corp->addPhon(trim($record[2])); diff --git a/src/Parser/Indi.php b/src/Parser/Indi.php index 3fd6ede1..ba44a748 100644 --- a/src/Parser/Indi.php +++ b/src/Parser/Indi.php @@ -61,6 +61,9 @@ public static function parse(\Gedcom\Parser $parser) break; case 'ADOP': case 'BIRT': + $birthday = \Gedcom\Parser\Date::parse($parser); + $indi->setBirthday($birthday); + break; case 'BAPM': case 'BARM': case 'BASM': @@ -72,6 +75,7 @@ public static function parse(\Gedcom\Parser $parser) case 'CONF': case 'CREM': case 'DEAT': + break; case 'EMIG': case 'FCOM': case 'GRAD': diff --git a/src/Parser/Sour.php b/src/Parser/Sour.php index cfc76b16..f96627f9 100644 --- a/src/Parser/Sour.php +++ b/src/Parser/Sour.php @@ -47,7 +47,7 @@ public static function parse(\Gedcom\Parser $parser) switch ($recordType) { case 'DATA': - $sour->setData(\Parser\Sour\Data::parse($parser)); + $sour->setData(\Gedcom\Parser\Sour\Data::parse($parser)); break; case 'AUTH': $sour->setAuth($parser->parseMultilineRecord()); @@ -65,7 +65,7 @@ public static function parse(\Gedcom\Parser $parser) $sour->setText($parser->parseMultilineRecord()); break; case 'REPO': - $sour->setRepo(\Parser\Sour\Repo::parse($parser)); + $sour->setRepo(\Gedcom\Parser\Sour\Repo::parse($parser)); break; case 'REFN': $refn = \Gedcom\Parser\Refn::parse($parser); diff --git a/src/Record/Indi.php b/src/Record/Indi.php index bce03a26..6e9d8c7b 100644 --- a/src/Record/Indi.php +++ b/src/Record/Indi.php @@ -138,6 +138,20 @@ class Indi extends \Gedcom\Record implements Noteable, Objectable, Sourceable * @var Indi\Asso[] */ protected $asso = []; + + protected $birthday; + + public function setBirthday($birthday = '') + { + $this->birthday = $birthday; + + return $this; + } + + public function getBirthday() + { + return $this->birthday; + } /** * @param string $id From 5d715952e0e47fcf2716cd0bd6713eeed32c627a Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Wed, 25 Aug 2021 11:36:45 +0100 Subject: [PATCH 82/99] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6b58e63b..8ce3350d 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ ## Requirements -* php-gedcom 1.0+ requires PHP 7.3 (or later). +* php-gedcom 1.0+ requires PHP 8.0 (or later). ## Installation From c0c99048165a26fb13e4f4a414f35f7519e4d3d0 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Wed, 25 Aug 2021 10:37:23 +0000 Subject: [PATCH 83/99] Apply fixes from StyleCI --- rector.php | 1 - src/Gedcom.php | 18 +++++++++--------- src/Parser.php | 18 +++++++++--------- src/Parser/Date.php | 6 +++--- src/Parser/Indi/Even.php | 2 -- src/Record/Addr.php | 2 -- src/Record/Caln.php | 2 -- src/Record/Chan.php | 2 +- src/Record/Data.php | 2 -- src/Record/Date.php | 2 -- src/Record/Fam/Even.php | 10 +++++----- src/Record/Fam/Slgs.php | 4 ++-- src/Record/Head.php | 2 -- src/Record/Indi.php | 11 ++++------- src/Record/Indi/Asso.php | 4 ++-- src/Record/Indi/Attr.php | 6 +++--- src/Record/Indi/Even.php | 2 +- src/Record/Indi/Even/Plac.php | 2 +- src/Record/Indi/Famc.php | 2 +- src/Record/Indi/Fams.php | 2 +- src/Record/Indi/Lds.php | 4 ++-- src/Record/Indi/Name/Fone.php | 2 -- src/Record/Indi/Name/Romn.php | 2 -- src/Record/ObjeRef/File.php | 2 -- src/Record/ObjeRef/File/Form.php | 2 -- src/Record/Phon.php | 2 -- src/Record/Plac/Fone.php | 2 -- src/Record/Plac/Map.php | 2 -- src/Record/Plac/Romn.php | 2 -- src/Record/Refn.php | 2 -- src/Record/Repo.php | 2 -- src/Record/Sour.php | 2 -- src/Record/Sour/Data.php | 2 +- src/Record/Sour/Repo.php | 2 +- src/Record/Subm.php | 2 +- src/Record/Subn.php | 2 -- src/Writer.php | 20 ++++++++++---------- src/Writer/Addr.php | 9 +++++---- src/Writer/Caln.php | 4 ++-- src/Writer/Chan.php | 4 ++-- src/Writer/Fam.php | 4 ++-- src/Writer/Fam/Even.php | 5 +++-- src/Writer/Fam/Even/Husb.php | 4 ++-- src/Writer/Fam/Even/Wife.php | 4 ++-- src/Writer/Fam/Slgs.php | 5 +++-- src/Writer/Head.php | 5 +++-- src/Writer/Head/Char.php | 7 ++++--- src/Writer/Head/Date.php | 7 ++++--- src/Writer/Head/Gedc.php | 7 ++++--- src/Writer/Head/Plac.php | 7 ++++--- src/Writer/Head/Sour.php | 7 ++++--- src/Writer/Head/Sour/Corp.php | 7 ++++--- src/Writer/Head/Sour/Data.php | 7 ++++--- src/Writer/Indi.php | 5 +++-- src/Writer/Indi/Asso.php | 4 ++-- src/Writer/Indi/Attr.php | 5 +++-- src/Writer/Indi/Even.php | 5 +++-- src/Writer/Indi/Even/Plac.php | 5 +++-- src/Writer/Indi/Famc.php | 4 ++-- src/Writer/Indi/Fams.php | 4 ++-- src/Writer/Indi/Name.php | 4 ++-- src/Writer/Note.php | 4 ++-- src/Writer/NoteRef.php | 5 +++-- src/Writer/Obje.php | 4 ++-- src/Writer/ObjeRef.php | 4 ++-- src/Writer/Refn.php | 4 ++-- src/Writer/Repo.php | 4 ++-- src/Writer/RepoRef.php | 5 +++-- src/Writer/Sour.php | 5 +++-- src/Writer/Sour/Data.php | 5 +++-- src/Writer/Sour/Data/Even.php | 5 +++-- src/Writer/SourRef.php | 5 +++-- src/Writer/SourRef/Even.php | 5 +++-- src/Writer/Subm.php | 4 ++-- src/Writer/Subn.php | 4 ++-- 75 files changed, 164 insertions(+), 182 deletions(-) diff --git a/rector.php b/rector.php index 1aad037f..5d5ce730 100644 --- a/rector.php +++ b/rector.php @@ -2,7 +2,6 @@ declare(strict_types=1); -use Rector\Core\Configuration\Option; use Rector\Php74\Rector\Property\TypedPropertyRector; use Rector\Set\ValueObject\SetList; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; diff --git a/src/Gedcom.php b/src/Gedcom.php index efff3d54..20cca366 100644 --- a/src/Gedcom.php +++ b/src/Gedcom.php @@ -93,7 +93,7 @@ class Gedcom /** * Retrieves the header record of the GEDCOM file. */ - public function setHead (\Gedcom\Record\Head $head) + public function setHead(\Gedcom\Record\Head $head) { $this->head = $head; } @@ -101,7 +101,7 @@ public function setHead (\Gedcom\Record\Head $head) /** * Retrieves the submission record of the GEDCOM file. */ - public function setSubn (\Gedcom\Record\Subn $subn) + public function setSubn(\Gedcom\Record\Subn $subn) { $this->subn = $subn; } @@ -109,7 +109,7 @@ public function setSubn (\Gedcom\Record\Subn $subn) /** * Adds a source to the collection of sources. */ - public function addSour (\Gedcom\Record\Sour $sour) + public function addSour(\Gedcom\Record\Sour $sour) { $this->sour[$sour->getSour()] = $sour; } @@ -117,7 +117,7 @@ public function addSour (\Gedcom\Record\Sour $sour) /** * Adds an individual to the collection of individuals. */ - public function addIndi (\Gedcom\Record\Indi $indi) + public function addIndi(\Gedcom\Record\Indi $indi) { $this->indi[$indi->getId()] = $indi; if ($indi->getUid()) { @@ -128,7 +128,7 @@ public function addIndi (\Gedcom\Record\Indi $indi) /** * Adds a family to the collection of families. */ - public function addFam (\Gedcom\Record\Fam $fam) + public function addFam(\Gedcom\Record\Fam $fam) { $this->fam[$fam->getId()] = $fam; } @@ -136,7 +136,7 @@ public function addFam (\Gedcom\Record\Fam $fam) /** * Adds a note to the collection of notes. */ - public function addNote (\Gedcom\Record\Note $note) + public function addNote(\Gedcom\Record\Note $note) { $this->note[$note->getId()] = $note; } @@ -144,7 +144,7 @@ public function addNote (\Gedcom\Record\Note $note) /** * Adds a repository to the collection of repositories. */ - public function addRepo (\Gedcom\Record\Repo $repo) + public function addRepo(\Gedcom\Record\Repo $repo) { $this->repo[$repo->getRepo()] = $repo; } @@ -152,7 +152,7 @@ public function addRepo (\Gedcom\Record\Repo $repo) /** * Adds an object to the collection of objects. */ - public function addObje (\Gedcom\Record\Obje $obje) + public function addObje(\Gedcom\Record\Obje $obje) { $this->obje[$obje->getId()] = $obje; } @@ -160,7 +160,7 @@ public function addObje (\Gedcom\Record\Obje $obje) /** * Adds a submitter record to the collection of submitters. */ - public function addSubm (\Gedcom\Record\Subm $subm) + public function addSubm(\Gedcom\Record\Subm $subm) { $this->subm[$subm->getSubm()] = $subm; } diff --git a/src/Parser.php b/src/Parser.php index 7a9e959f..3c3ee40c 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -239,23 +239,23 @@ public function parse($fileName) } if (isset($record[1]) && trim($record[1]) == 'HEAD') { - \Gedcom\Parser\Head::parse($this); + \Gedcom\Parser\Head::parse($this); } elseif (isset($record[2]) && trim($record[2]) == 'SUBN') { - \Gedcom\Parser\Subn::parse($this); + \Gedcom\Parser\Subn::parse($this); } elseif (isset($record[2]) && trim($record[2]) == 'SUBM') { - \Gedcom\Parser\Subm::parse($this); + \Gedcom\Parser\Subm::parse($this); } elseif (isset($record[2]) && $record[2] == 'SOUR') { - \Gedcom\Parser\Sour::parse($this); + \Gedcom\Parser\Sour::parse($this); } elseif (isset($record[2]) && $record[2] == 'INDI') { - \Gedcom\Parser\Indi::parse($this); + \Gedcom\Parser\Indi::parse($this); } elseif (isset($record[2]) && $record[2] == 'FAM') { - \Gedcom\Parser\Fam::parse($this); + \Gedcom\Parser\Fam::parse($this); } elseif (isset($record[2]) && substr(trim($record[2]), 0, 4) == 'NOTE') { - \Gedcom\Parser\Note::parse($this); + \Gedcom\Parser\Note::parse($this); } elseif (isset($record[2]) && $record[2] == 'REPO') { - \Gedcom\Parser\Repo::parse($this); + \Gedcom\Parser\Repo::parse($this); } elseif (isset($record[2]) && $record[2] == 'OBJE') { - \Gedcom\Parser\Obje::parse($this); + \Gedcom\Parser\Obje::parse($this); } elseif (isset($record[1]) && trim($record[1]) == 'TRLR') { // EOF break; diff --git a/src/Parser/Date.php b/src/Parser/Date.php index 1154905d..df8ef1f7 100644 --- a/src/Parser/Date.php +++ b/src/Parser/Date.php @@ -23,7 +23,7 @@ public static function parse(\Gedcom\Parser $parser) $parser->forward(); $record = $parser->getCurrentLineRecord(); - + if (isset($record[1])) { $dat = new \Gedcom\Record\Date(); if (!empty($record[2])) { @@ -34,9 +34,9 @@ public static function parse(\Gedcom\Parser $parser) return null; } - + if ($dat->getYear() && $dat->getMonth() && $dat->getDay()) { - return $dat->getYear() .'-'. substr("0{$dat->getMonth()}", -2) .'-'. substr("0{$dat->getDay()}", -2); + return $dat->getYear().'-'.substr("0{$dat->getMonth()}", -2).'-'.substr("0{$dat->getDay()}", -2); } return null; diff --git a/src/Parser/Indi/Even.php b/src/Parser/Indi/Even.php index d7667c32..bc8db5bf 100644 --- a/src/Parser/Indi/Even.php +++ b/src/Parser/Indi/Even.php @@ -14,8 +14,6 @@ namespace Gedcom\Parser\Indi; -use \Gedcom\Parser\Chan; - class Even extends \Gedcom\Parser\Component { public static function parse(\Gedcom\Parser $parser) diff --git a/src/Record/Addr.php b/src/Record/Addr.php index 8223b414..0830aab3 100644 --- a/src/Record/Addr.php +++ b/src/Record/Addr.php @@ -14,8 +14,6 @@ namespace Gedcom\Record; -use \Gedcom\Record; - /** * Class Addr. */ diff --git a/src/Record/Caln.php b/src/Record/Caln.php index 98ed34da..5927b008 100644 --- a/src/Record/Caln.php +++ b/src/Record/Caln.php @@ -14,8 +14,6 @@ namespace Gedcom\Record; -use \Gedcom\Record; - /** * Class Caln. */ diff --git a/src/Record/Chan.php b/src/Record/Chan.php index 89ac85de..1d6a3542 100644 --- a/src/Record/Chan.php +++ b/src/Record/Chan.php @@ -14,7 +14,7 @@ namespace Gedcom\Record; -use \Gedcom\Record; +use Gedcom\Record; /** * Class Chan. diff --git a/src/Record/Data.php b/src/Record/Data.php index 1b48e3aa..e600d5ce 100644 --- a/src/Record/Data.php +++ b/src/Record/Data.php @@ -14,8 +14,6 @@ namespace Gedcom\Record; -use \Gedcom\Record; - /** * Class Data. */ diff --git a/src/Record/Date.php b/src/Record/Date.php index d8eb29e2..6a8799ad 100644 --- a/src/Record/Date.php +++ b/src/Record/Date.php @@ -14,8 +14,6 @@ namespace Gedcom\Record; -use \Gedcom\Record; - /** * Class Date. */ diff --git a/src/Record/Fam/Even.php b/src/Record/Fam/Even.php index df6c90dc..c0cdb614 100644 --- a/src/Record/Fam/Even.php +++ b/src/Record/Fam/Even.php @@ -14,16 +14,16 @@ namespace Gedcom\Record\Fam; -use \Gedcom\Record\Noteable; -use \Gedcom\Record\Objectable; -use \Gedcom\Record\Sourceable; +use Gedcom\Record\Noteable; +use Gedcom\Record\Objectable; +use Gedcom\Record\Sourceable; /** * Event record. * - * @method mixed getType() + * @method mixed getType() * @method \Record\Date getDate() - * @method string getPlac() + * @method string getPlac() */ class Even extends \Gedcom\Record implements Objectable, Sourceable, Noteable { diff --git a/src/Record/Fam/Slgs.php b/src/Record/Fam/Slgs.php index ce470b21..7d230947 100644 --- a/src/Record/Fam/Slgs.php +++ b/src/Record/Fam/Slgs.php @@ -14,8 +14,8 @@ namespace Gedcom\Record\Fam; -use \Gedcom\Record\Noteable; -use \Gedcom\Record\Sourceable; +use Gedcom\Record\Noteable; +use Gedcom\Record\Sourceable; class Slgs extends \Gedcom\Record implements Sourceable, Noteable { diff --git a/src/Record/Head.php b/src/Record/Head.php index d445a15b..4553a053 100644 --- a/src/Record/Head.php +++ b/src/Record/Head.php @@ -14,8 +14,6 @@ namespace Gedcom\Record; -use \Gedcom\Record; - /** * Stores the data from the HEAD section of a GEDCOM 5.5 file. */ diff --git a/src/Record/Indi.php b/src/Record/Indi.php index 6e9d8c7b..a4f36946 100644 --- a/src/Record/Indi.php +++ b/src/Record/Indi.php @@ -14,9 +14,6 @@ namespace Gedcom\Record; -use \Gedcom\Record; - - /** * Class Indi. */ @@ -138,16 +135,16 @@ class Indi extends \Gedcom\Record implements Noteable, Objectable, Sourceable * @var Indi\Asso[] */ protected $asso = []; - + protected $birthday; - + public function setBirthday($birthday = '') { $this->birthday = $birthday; - + return $this; } - + public function getBirthday() { return $this->birthday; diff --git a/src/Record/Indi/Asso.php b/src/Record/Indi/Asso.php index 02ad6580..fac6ef1d 100644 --- a/src/Record/Indi/Asso.php +++ b/src/Record/Indi/Asso.php @@ -14,8 +14,8 @@ namespace Gedcom\Record\Indi; -use \Gedcom\Record\Noteable; -use \Gedcom\Record\Sourceable; +use Gedcom\Record\Noteable; +use Gedcom\Record\Sourceable; class Asso extends \Gedcom\Record implements Sourceable, Noteable { diff --git a/src/Record/Indi/Attr.php b/src/Record/Indi/Attr.php index b041f7c1..cd40ea13 100644 --- a/src/Record/Indi/Attr.php +++ b/src/Record/Indi/Attr.php @@ -14,9 +14,9 @@ namespace Gedcom\Record\Indi; -use \Gedcom\Record\Noteable; -use \Gedcom\Record\Objectable; -use \Gedcom\Record\Sourceable; +use Gedcom\Record\Noteable; +use Gedcom\Record\Objectable; +use Gedcom\Record\Sourceable; class Attr extends \Gedcom\Record\Indi\Even implements Sourceable, Noteable, Objectable { diff --git a/src/Record/Indi/Even.php b/src/Record/Indi/Even.php index fa81d105..3c8c177e 100644 --- a/src/Record/Indi/Even.php +++ b/src/Record/Indi/Even.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\Indi; -use \Gedcom\Record; +use Gedcom\Record; /** * Class Even. diff --git a/src/Record/Indi/Even/Plac.php b/src/Record/Indi/Even/Plac.php index 9b234317..92421686 100644 --- a/src/Record/Indi/Even/Plac.php +++ b/src/Record/Indi/Even/Plac.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\Indi\Even; -use \Gedcom\Record; +use Gedcom\Record; /** * Class Plac. diff --git a/src/Record/Indi/Famc.php b/src/Record/Indi/Famc.php index 3ae88ef4..0429b984 100644 --- a/src/Record/Indi/Famc.php +++ b/src/Record/Indi/Famc.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\Indi; -use \Gedcom\Record\Noteable; +use Gedcom\Record\Noteable; class Famc extends \Gedcom\Record implements Noteable { diff --git a/src/Record/Indi/Fams.php b/src/Record/Indi/Fams.php index 1d8646bf..a1106a20 100644 --- a/src/Record/Indi/Fams.php +++ b/src/Record/Indi/Fams.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\Indi; -use \Gedcom\Record\Noteable; +use Gedcom\Record\Noteable; class Fams extends \Gedcom\Record implements Noteable { diff --git a/src/Record/Indi/Lds.php b/src/Record/Indi/Lds.php index 31db0f8e..d2b8fb10 100644 --- a/src/Record/Indi/Lds.php +++ b/src/Record/Indi/Lds.php @@ -14,8 +14,8 @@ namespace Gedcom\Record\Indi; -use \Gedcom\Record\Noteable; -use \Gedcom\Record\Sourceable; +use Gedcom\Record\Noteable; +use Gedcom\Record\Sourceable; abstract class Lds extends \Gedcom\Record implements Sourceable, Noteable { diff --git a/src/Record/Indi/Name/Fone.php b/src/Record/Indi/Name/Fone.php index ba4c641d..bd8bf9f3 100644 --- a/src/Record/Indi/Name/Fone.php +++ b/src/Record/Indi/Name/Fone.php @@ -14,8 +14,6 @@ namespace Gedcom\Record\Indi\Name; -use \Gedcom\Record; - /** * Class Refn. */ diff --git a/src/Record/Indi/Name/Romn.php b/src/Record/Indi/Name/Romn.php index b525a74f..f8f8f6af 100644 --- a/src/Record/Indi/Name/Romn.php +++ b/src/Record/Indi/Name/Romn.php @@ -14,8 +14,6 @@ namespace Gedcom\Record\Indi\Name; -use \Gedcom\Record; - /** * Class Refn. */ diff --git a/src/Record/ObjeRef/File.php b/src/Record/ObjeRef/File.php index 973b2c48..f2f16da9 100644 --- a/src/Record/ObjeRef/File.php +++ b/src/Record/ObjeRef/File.php @@ -14,8 +14,6 @@ namespace Gedcom\Record\ObjeRef; -use \Gedcom\Record; - /** * Class Refn. */ diff --git a/src/Record/ObjeRef/File/Form.php b/src/Record/ObjeRef/File/Form.php index 5d696ea4..3444ffca 100644 --- a/src/Record/ObjeRef/File/Form.php +++ b/src/Record/ObjeRef/File/Form.php @@ -14,8 +14,6 @@ namespace Gedcom\Record\ObjeRef\File; -use \Gedcom\Record; - /** * Class Refn. */ diff --git a/src/Record/Phon.php b/src/Record/Phon.php index b4daf055..c784d559 100644 --- a/src/Record/Phon.php +++ b/src/Record/Phon.php @@ -14,8 +14,6 @@ namespace Gedcom\Record; -use \Gedcom\Record; - /** * Class Phon. */ diff --git a/src/Record/Plac/Fone.php b/src/Record/Plac/Fone.php index b4428164..e155c32d 100644 --- a/src/Record/Plac/Fone.php +++ b/src/Record/Plac/Fone.php @@ -14,8 +14,6 @@ namespace Gedcom\Record\Plac; -use \Gedcom\Record; - /** * Class Refn. */ diff --git a/src/Record/Plac/Map.php b/src/Record/Plac/Map.php index a7afea63..1df6caae 100644 --- a/src/Record/Plac/Map.php +++ b/src/Record/Plac/Map.php @@ -14,8 +14,6 @@ namespace Gedcom\Record\Plac; -use \Gedcom\Record; - /** * Class Refn. */ diff --git a/src/Record/Plac/Romn.php b/src/Record/Plac/Romn.php index c35f2ed7..72a33795 100644 --- a/src/Record/Plac/Romn.php +++ b/src/Record/Plac/Romn.php @@ -14,8 +14,6 @@ namespace Gedcom\Record\Plac; -use \Gedcom\Record; - /** * Class Refn. */ diff --git a/src/Record/Refn.php b/src/Record/Refn.php index 8eff0345..a3457c88 100644 --- a/src/Record/Refn.php +++ b/src/Record/Refn.php @@ -14,8 +14,6 @@ namespace Gedcom\Record; -use \Gedcom\Record; - /** * Class Refn. */ diff --git a/src/Record/Repo.php b/src/Record/Repo.php index 7d052013..e0101871 100644 --- a/src/Record/Repo.php +++ b/src/Record/Repo.php @@ -14,8 +14,6 @@ namespace Gedcom\Record; -use \Gedcom\Record; - /** * Class Repo. */ diff --git a/src/Record/Sour.php b/src/Record/Sour.php index e8a8ffbf..50274125 100644 --- a/src/Record/Sour.php +++ b/src/Record/Sour.php @@ -14,8 +14,6 @@ namespace Gedcom\Record; -use \Gedcom\Record; - /** * Class Sour. */ diff --git a/src/Record/Sour/Data.php b/src/Record/Sour/Data.php index 3ae92e92..cc47087f 100644 --- a/src/Record/Sour/Data.php +++ b/src/Record/Sour/Data.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\Sour; -use \Gedcom\Record\Noteable; +use Gedcom\Record\Noteable; class Data extends \Gedcom\Record implements Noteable { diff --git a/src/Record/Sour/Repo.php b/src/Record/Sour/Repo.php index 91a0a4fd..1b986e21 100644 --- a/src/Record/Sour/Repo.php +++ b/src/Record/Sour/Repo.php @@ -14,7 +14,7 @@ namespace Gedcom\Record\Sour; -use \Gedcom\Record\Noteable; +use Gedcom\Record\Noteable; class Repo extends \Gedcom\Record implements Noteable { diff --git a/src/Record/Subm.php b/src/Record/Subm.php index 4de88281..30124c7e 100644 --- a/src/Record/Subm.php +++ b/src/Record/Subm.php @@ -14,7 +14,7 @@ namespace Gedcom\Record; -use \Gedcom\Record; +use Gedcom\Record; /** * Class Subm. diff --git a/src/Record/Subn.php b/src/Record/Subn.php index 1a3c058b..132a2a71 100644 --- a/src/Record/Subn.php +++ b/src/Record/Subn.php @@ -14,8 +14,6 @@ namespace Gedcom\Record; -use \Gedcom\Record; - /** * Class Subn. */ diff --git a/src/Writer.php b/src/Writer.php index 00d65c05..d86737d5 100644 --- a/src/Writer.php +++ b/src/Writer.php @@ -14,15 +14,15 @@ namespace Gedcom; -use \Gedcom\Writer\Fam; -use \Gedcom\Writer\Head; -use \Gedcom\Writer\Indi; -use \Gedcom\Writer\Note; -use \Gedcom\Writer\Obje; -use \Gedcom\Writer\Repo; -use \Gedcom\Writer\Sour; -use \Gedcom\Writer\Subm; -use \Gedcom\Writer\Subn; +use Gedcom\Writer\Fam; +use Gedcom\Writer\Head; +use Gedcom\Writer\Indi; +use Gedcom\Writer\Note; +use Gedcom\Writer\Obje; +use Gedcom\Writer\Repo; +use Gedcom\Writer\Sour; +use Gedcom\Writer\Subm; +use Gedcom\Writer\Subn; class Writer { @@ -32,7 +32,7 @@ class Writer /** * @param $gedcom The GEDCOM object - * @param string $format The format to convert the GEDCOM object to + * @param string $format The format to convert the GEDCOM object to * * @return string The contents of the document in the converted format */ diff --git a/src/Writer/Addr.php b/src/Writer/Addr.php index f14ba562..6085dd61 100644 --- a/src/Writer/Addr.php +++ b/src/Writer/Addr.php @@ -17,11 +17,12 @@ class Addr { /** - * @param string $format - * @param int $level + * @param string $format + * @param int $level + * * @return string */ - public static function convert (\Gedcom\Record\Addr &$addr, $format = self::GEDCOM55, $level = 1) + public static function convert(\Gedcom\Record\Addr &$addr, $format = self::GEDCOM55, $level = 1) { $addrs = explode("\n", $addr->getAddr()); @@ -33,7 +34,7 @@ public static function convert (\Gedcom\Record\Addr &$addr, $format = self::GEDC $output .= ($level + 1).' CONT '.$cont."\n"; } - return $output . (($level + 1).' ADR1 '.$addr->adr1."\n". + return $output.(($level + 1).' ADR1 '.$addr->adr1."\n". ($level + 1).' ADR2 '.$addr->getAdr2()."\n". ($level + 1).' CITY '.$addr->getCity()."\n". ($level + 1).' STAE '.$addr->getStae()."\n". diff --git a/src/Writer/Caln.php b/src/Writer/Caln.php index 2ac06323..272a3a54 100644 --- a/src/Writer/Caln.php +++ b/src/Writer/Caln.php @@ -18,11 +18,11 @@ class Caln { /** * @param \Gedcom\Record\Caln $note - * @param int $level + * @param int $level * * @return string */ - public static function convert (\Gedcom\Record\Caln &$caln, $level) + public static function convert(\Gedcom\Record\Caln &$caln, $level) { $output = ''; $_caln = $caln->getCaln(); diff --git a/src/Writer/Chan.php b/src/Writer/Chan.php index cee57f69..5470d704 100644 --- a/src/Writer/Chan.php +++ b/src/Writer/Chan.php @@ -18,11 +18,11 @@ class Chan { /** * @param \Gedcom\Record\Chan $note - * @param int $level + * @param int $level * * @return string */ - public static function convert (\Gedcom\Record\Chan &$chan, $level) + public static function convert(\Gedcom\Record\Chan &$chan, $level) { $output = $level." CHAN \n"; // level up diff --git a/src/Writer/Fam.php b/src/Writer/Fam.php index 046cfe39..01aaecbe 100644 --- a/src/Writer/Fam.php +++ b/src/Writer/Fam.php @@ -18,11 +18,11 @@ class Fam { /** * @param \Gedcom\Record\Fam $sour - * @param int $level + * @param int $level * * @return string */ - public static function convert (\Gedcom\Record\Fam &$fam, $level = 0) + public static function convert(\Gedcom\Record\Fam &$fam, $level = 0) { $output = ''; $id = $fam->getId(); diff --git a/src/Writer/Fam/Even.php b/src/Writer/Fam/Even.php index 2ac0a664..4165aad2 100644 --- a/src/Writer/Fam/Even.php +++ b/src/Writer/Fam/Even.php @@ -17,10 +17,11 @@ class Even { /** - * @param int $level + * @param int $level + * * @return string */ - public static function convert (\Gedcom\Record\Fam\Even &$even, $level) + public static function convert(\Gedcom\Record\Fam\Even &$even, $level) { $output = ''; diff --git a/src/Writer/Fam/Even/Husb.php b/src/Writer/Fam/Even/Husb.php index 4dec8364..4baf5686 100644 --- a/src/Writer/Fam/Even/Husb.php +++ b/src/Writer/Fam/Even/Husb.php @@ -18,11 +18,11 @@ class Husb { /** * @param \Gedcom\Record\Fam\Even\Husb $attr - * @param int $level + * @param int $level * * @return string */ - public static function convert (\Gedcom\Record\Fam\Even\Husb &$husb, $level = 0) + public static function convert(\Gedcom\Record\Fam\Even\Husb &$husb, $level = 0) { $output = ''; diff --git a/src/Writer/Fam/Even/Wife.php b/src/Writer/Fam/Even/Wife.php index 9e85ba7b..c1a29b7a 100644 --- a/src/Writer/Fam/Even/Wife.php +++ b/src/Writer/Fam/Even/Wife.php @@ -18,11 +18,11 @@ class Wife { /** * @param \Gedcom\Record\Fam\Even\Wife $attr - * @param int $level + * @param int $level * * @return string */ - public static function convert (\Gedcom\Record\Fam\Even\Wife &$wife, $level = 0) + public static function convert(\Gedcom\Record\Fam\Even\Wife &$wife, $level = 0) { $output = ''; diff --git a/src/Writer/Fam/Slgs.php b/src/Writer/Fam/Slgs.php index 08ebd387..84563148 100644 --- a/src/Writer/Fam/Slgs.php +++ b/src/Writer/Fam/Slgs.php @@ -17,10 +17,11 @@ class Slgs { /** - * @param int $level + * @param int $level + * * @return string */ - public static function convert (\Gedcom\Record\Fam\Slgs &$slgs, $level) + public static function convert(\Gedcom\Record\Fam\Slgs &$slgs, $level) { $output = ''; $output .= $level." SLGS \n"; diff --git a/src/Writer/Head.php b/src/Writer/Head.php index 3dd42c3c..88ada96e 100644 --- a/src/Writer/Head.php +++ b/src/Writer/Head.php @@ -17,10 +17,11 @@ class Head { /** - * @param string $format + * @param string $format + * * @return string */ - public static function convert (\Gedcom\Record\Head &$head, $format = self::GEDCOM55) + public static function convert(\Gedcom\Record\Head &$head, $format = self::GEDCOM55) { $level = 0; $output = $level." HEAD\n"; diff --git a/src/Writer/Head/Char.php b/src/Writer/Head/Char.php index 6d942961..a00177d5 100644 --- a/src/Writer/Head/Char.php +++ b/src/Writer/Head/Char.php @@ -17,11 +17,12 @@ class Char { /** - * @param string $format - * @param int $level + * @param string $format + * @param int $level + * * @return string */ - public static function convert (\Gedcom\Record\Head\Char &$char, $level) + public static function convert(\Gedcom\Record\Head\Char &$char, $level) { $output = ''; // char diff --git a/src/Writer/Head/Date.php b/src/Writer/Head/Date.php index 1875d3a3..2478b71e 100644 --- a/src/Writer/Head/Date.php +++ b/src/Writer/Head/Date.php @@ -17,11 +17,12 @@ class Date { /** - * @param string $format - * @param int $level + * @param string $format + * @param int $level + * * @return string */ - public static function convert (\Gedcom\Record\Head\Date &$date, $level) + public static function convert(\Gedcom\Record\Head\Date &$date, $level) { $output = ''; $_date = $date->getDate(); diff --git a/src/Writer/Head/Gedc.php b/src/Writer/Head/Gedc.php index 6e2a77dc..4b52df07 100644 --- a/src/Writer/Head/Gedc.php +++ b/src/Writer/Head/Gedc.php @@ -17,11 +17,12 @@ class Gedc { /** - * @param string $format - * @param int $level + * @param string $format + * @param int $level + * * @return string */ - public static function convert (\Gedcom\Record\Head\Gedc &$gedc, $level) + public static function convert(\Gedcom\Record\Head\Gedc &$gedc, $level) { $output = $level." GEDC \n"; diff --git a/src/Writer/Head/Plac.php b/src/Writer/Head/Plac.php index 9bc5cef5..3169329e 100644 --- a/src/Writer/Head/Plac.php +++ b/src/Writer/Head/Plac.php @@ -17,11 +17,12 @@ class Plac { /** - * @param string $format - * @param int $level + * @param string $format + * @param int $level + * * @return string */ - public static function convert (\Gedcom\Record\Head\Plac &$plac, $level) + public static function convert(\Gedcom\Record\Head\Plac &$plac, $level) { $output = $level." PLAC \n"; diff --git a/src/Writer/Head/Sour.php b/src/Writer/Head/Sour.php index 661f52e1..3447078c 100644 --- a/src/Writer/Head/Sour.php +++ b/src/Writer/Head/Sour.php @@ -17,11 +17,12 @@ class Sour { /** - * @param string $format - * @param int $level + * @param string $format + * @param int $level + * * @return string */ - public static function convert (\Gedcom\Record\Head\Sour &$sour, $level) + public static function convert(\Gedcom\Record\Head\Sour &$sour, $level) { $output = ''; $_sour = $sour->getSour(); diff --git a/src/Writer/Head/Sour/Corp.php b/src/Writer/Head/Sour/Corp.php index 05256a77..afc0f0dd 100644 --- a/src/Writer/Head/Sour/Corp.php +++ b/src/Writer/Head/Sour/Corp.php @@ -17,11 +17,12 @@ class Corp { /** - * @param string $format - * @param int $level + * @param string $format + * @param int $level + * * @return string */ - public static function convert (\Gedcom\Record\Head\Sour\Corp &$corp, $level) + public static function convert(\Gedcom\Record\Head\Sour\Corp &$corp, $level) { $output = ''; $_corp = $corp->getCorp(); diff --git a/src/Writer/Head/Sour/Data.php b/src/Writer/Head/Sour/Data.php index 316c9054..f51bed12 100644 --- a/src/Writer/Head/Sour/Data.php +++ b/src/Writer/Head/Sour/Data.php @@ -17,11 +17,12 @@ class Data { /** - * @param string $format - * @param int $level + * @param string $format + * @param int $level + * * @return string */ - public static function convert (\Gedcom\Record\Head\Sour\Data &$data, $level) + public static function convert(\Gedcom\Record\Head\Sour\Data &$data, $level) { $output = ''; $_data = $data->getData(); diff --git a/src/Writer/Indi.php b/src/Writer/Indi.php index f379cf33..b35ac4d6 100644 --- a/src/Writer/Indi.php +++ b/src/Writer/Indi.php @@ -17,10 +17,11 @@ class Indi { /** - * @param string $format + * @param string $format + * * @return string */ - public static function convert (\Gedcom\Record\Indi &$indi) + public static function convert(\Gedcom\Record\Indi &$indi) { $level = 0; diff --git a/src/Writer/Indi/Asso.php b/src/Writer/Indi/Asso.php index fe8d5e41..373a8a0b 100644 --- a/src/Writer/Indi/Asso.php +++ b/src/Writer/Indi/Asso.php @@ -18,11 +18,11 @@ class Asso { /** * @param \Gedcom\Record\Indi\Asso $attr - * @param int $level + * @param int $level * * @return string */ - public static function convert (\Gedcom\Record\Indi\Asso &$asso, $level = 0) + public static function convert(\Gedcom\Record\Indi\Asso &$asso, $level = 0) { $output = ''; // _indi diff --git a/src/Writer/Indi/Attr.php b/src/Writer/Indi/Attr.php index c704b53e..b16cd27a 100644 --- a/src/Writer/Indi/Attr.php +++ b/src/Writer/Indi/Attr.php @@ -17,10 +17,11 @@ class Attr { /** - * @param int $level + * @param int $level + * * @return string */ - public static function convert (\Gedcom\Record\Indi\Attr &$attr, $level = 0) + public static function convert(\Gedcom\Record\Indi\Attr &$attr, $level = 0) { return ''; } diff --git a/src/Writer/Indi/Even.php b/src/Writer/Indi/Even.php index 4fbe126e..a3bf06a5 100644 --- a/src/Writer/Indi/Even.php +++ b/src/Writer/Indi/Even.php @@ -17,10 +17,11 @@ class Even { /** - * @param int $level + * @param int $level + * * @return string */ - public static function convert (\Gedcom\Record\Indi\Even &$even, $level = 0) + public static function convert(\Gedcom\Record\Indi\Even &$even, $level = 0) { $output = ''; diff --git a/src/Writer/Indi/Even/Plac.php b/src/Writer/Indi/Even/Plac.php index 9fa713eb..5e88829d 100644 --- a/src/Writer/Indi/Even/Plac.php +++ b/src/Writer/Indi/Even/Plac.php @@ -17,10 +17,11 @@ class Plac { /** - * @param int $level + * @param int $level + * * @return string */ - public static function convert (\Gedcom\Record\Indi\Even\Plac &$plac, $level = 0) + public static function convert(\Gedcom\Record\Indi\Even\Plac &$plac, $level = 0) { $output = ''; diff --git a/src/Writer/Indi/Famc.php b/src/Writer/Indi/Famc.php index 9cee6f19..3015e98a 100644 --- a/src/Writer/Indi/Famc.php +++ b/src/Writer/Indi/Famc.php @@ -18,11 +18,11 @@ class Famc { /** * @param \Gedcom\Record\Indi\Famc $attr - * @param int $level + * @param int $level * * @return string */ - public static function convert (\Gedcom\Record\Indi\Famc &$famc, $level = 0) + public static function convert(\Gedcom\Record\Indi\Famc &$famc, $level = 0) { $output = ''; // NAME diff --git a/src/Writer/Indi/Fams.php b/src/Writer/Indi/Fams.php index ce04059d..06d990d8 100644 --- a/src/Writer/Indi/Fams.php +++ b/src/Writer/Indi/Fams.php @@ -18,11 +18,11 @@ class Fams { /** * @param \Gedcom\Record\Indi\Fams $attr - * @param int $level + * @param int $level * * @return string */ - public static function convert (\Gedcom\Record\Indi\Fams &$fams, $level = 0) + public static function convert(\Gedcom\Record\Indi\Fams &$fams, $level = 0) { $output = ''; // NAME diff --git a/src/Writer/Indi/Name.php b/src/Writer/Indi/Name.php index adb6f09e..f8ad0448 100644 --- a/src/Writer/Indi/Name.php +++ b/src/Writer/Indi/Name.php @@ -18,11 +18,11 @@ class Name { /** * @param \Gedcom\Record\Indi\Name $attr - * @param int $level + * @param int $level * * @return string */ - public static function convert (\Gedcom\Record\Indi\Name &$name, $level = 0) + public static function convert(\Gedcom\Record\Indi\Name &$name, $level = 0) { $output = ''; // NAME diff --git a/src/Writer/Note.php b/src/Writer/Note.php index 29b1fa1a..9f0e6960 100644 --- a/src/Writer/Note.php +++ b/src/Writer/Note.php @@ -18,11 +18,11 @@ class Note { /** * @param \Gedcom\Record\Note $sour - * @param int $level + * @param int $level * * @return string */ - public static function convert (\Gedcom\Record\Note &$note) + public static function convert(\Gedcom\Record\Note &$note) { $level = 0; $output = ''; diff --git a/src/Writer/NoteRef.php b/src/Writer/NoteRef.php index 97b15c4a..ced20593 100644 --- a/src/Writer/NoteRef.php +++ b/src/Writer/NoteRef.php @@ -17,10 +17,11 @@ class NoteRef { /** - * @param int $level + * @param int $level + * * @return string */ - public static function convert (\Gedcom\Record\NoteRef &$note, $level) + public static function convert(\Gedcom\Record\NoteRef &$note, $level) { $output = ''; diff --git a/src/Writer/Obje.php b/src/Writer/Obje.php index 1ea82fe1..52c18c8d 100644 --- a/src/Writer/Obje.php +++ b/src/Writer/Obje.php @@ -18,11 +18,11 @@ class Obje { /** * @param \Gedcom\Record\Obje $sour - * @param int $level + * @param int $level * * @return string */ - public static function convert (\Gedcom\Record\Obje &$obje) + public static function convert(\Gedcom\Record\Obje &$obje) { $level = 0; $output = ''; diff --git a/src/Writer/ObjeRef.php b/src/Writer/ObjeRef.php index 4a21a934..425cb783 100644 --- a/src/Writer/ObjeRef.php +++ b/src/Writer/ObjeRef.php @@ -18,11 +18,11 @@ class ObjeRef { /** * @param \Gedcom\Record\ObjeRef $note - * @param int $level + * @param int $level * * @return string */ - public static function convert (\Gedcom\Record\ObjeRef &$obje, $level) + public static function convert(\Gedcom\Record\ObjeRef &$obje, $level) { $output = ''; diff --git a/src/Writer/Refn.php b/src/Writer/Refn.php index acb233d0..b1ed17c2 100644 --- a/src/Writer/Refn.php +++ b/src/Writer/Refn.php @@ -18,11 +18,11 @@ class Refn { /** * @param \Gedcom\Record\Refn $note - * @param int $level + * @param int $level * * @return string */ - public static function convert (\Gedcom\Record\Refn &$refn, $level) + public static function convert(\Gedcom\Record\Refn &$refn, $level) { $output = ''; $_refn = $refn->getRefn(); diff --git a/src/Writer/Repo.php b/src/Writer/Repo.php index 30e4bbfa..478dc96b 100644 --- a/src/Writer/Repo.php +++ b/src/Writer/Repo.php @@ -18,11 +18,11 @@ class Repo { /** * @param \Gedcom\Record\Repo $sour - * @param int $level + * @param int $level * * @return string */ - public static function convert (\Gedcom\Record\Repo &$repo) + public static function convert(\Gedcom\Record\Repo &$repo) { $level = 0; $output = ''; diff --git a/src/Writer/RepoRef.php b/src/Writer/RepoRef.php index 54060fe3..b9df6565 100644 --- a/src/Writer/RepoRef.php +++ b/src/Writer/RepoRef.php @@ -17,10 +17,11 @@ class RepoRef { /** - * @param int $level + * @param int $level + * * @return string */ - public static function convert (\Gedcom\Record\RepoRef &$reporef, $level) + public static function convert(\Gedcom\Record\RepoRef &$reporef, $level) { $output = ''; $_repo = $reporef->getRepo(); diff --git a/src/Writer/Sour.php b/src/Writer/Sour.php index 82b17d02..b7ce624f 100644 --- a/src/Writer/Sour.php +++ b/src/Writer/Sour.php @@ -17,10 +17,11 @@ class Sour { /** - * @param int $level + * @param int $level + * * @return string */ - public static function convert (\Gedcom\Record\Sour &$sour, $level) + public static function convert(\Gedcom\Record\Sour &$sour, $level) { $output = ''; $_sour = $sour->getSour(); diff --git a/src/Writer/Sour/Data.php b/src/Writer/Sour/Data.php index 0539ee51..6209ed82 100644 --- a/src/Writer/Sour/Data.php +++ b/src/Writer/Sour/Data.php @@ -17,10 +17,11 @@ class Data { /** - * @param int $level + * @param int $level + * * @return string */ - public static function convert (\Gedcom\Record\Sour\Data &$data, $level = 0) + public static function convert(\Gedcom\Record\Sour\Data &$data, $level = 0) { $output = $level." DATA\n"; $level++; diff --git a/src/Writer/Sour/Data/Even.php b/src/Writer/Sour/Data/Even.php index 470e51bd..1efa1de0 100644 --- a/src/Writer/Sour/Data/Even.php +++ b/src/Writer/Sour/Data/Even.php @@ -17,10 +17,11 @@ class Even { /** - * @param int $level + * @param int $level + * * @return string */ - public static function convert (\Gedcom\Record\Sour\Data\Even &$even, $level) + public static function convert(\Gedcom\Record\Sour\Data\Even &$even, $level) { $output = $level." EVEN\n"; $level++; diff --git a/src/Writer/SourRef.php b/src/Writer/SourRef.php index 1dfa7996..055bc82d 100644 --- a/src/Writer/SourRef.php +++ b/src/Writer/SourRef.php @@ -17,10 +17,11 @@ class SourRef { /** - * @param int $level + * @param int $level + * * @return string */ - public static function convert (\Gedcom\Record\SourRef &$sour, $level) + public static function convert(\Gedcom\Record\SourRef &$sour, $level) { $output = ''; $_sour = $sour->getSour(); diff --git a/src/Writer/SourRef/Even.php b/src/Writer/SourRef/Even.php index 5605e244..c409a895 100644 --- a/src/Writer/SourRef/Even.php +++ b/src/Writer/SourRef/Even.php @@ -17,10 +17,11 @@ class Even { /** - * @param int $level + * @param int $level + * * @return string */ - public static function convert (\Gedcom\Record\SourRef\Even &$even, $level = 0) + public static function convert(\Gedcom\Record\SourRef\Even &$even, $level = 0) { $output = ''; diff --git a/src/Writer/Subm.php b/src/Writer/Subm.php index e9e5cb29..d580f147 100644 --- a/src/Writer/Subm.php +++ b/src/Writer/Subm.php @@ -18,11 +18,11 @@ class Subm { /** * @param \Gedcom\Record\Subm $note - * @param int $level + * @param int $level * * @return string */ - public static function convert (\Gedcom\Record\Subm &$subm) + public static function convert(\Gedcom\Record\Subm &$subm) { $level = 0; $output = ''; diff --git a/src/Writer/Subn.php b/src/Writer/Subn.php index 95727885..1fa42495 100644 --- a/src/Writer/Subn.php +++ b/src/Writer/Subn.php @@ -18,11 +18,11 @@ class Subn { /** * @param \Gedcom\Record\Subn $note - * @param int $level + * @param int $level * * @return string */ - public static function convert (\Gedcom\Record\Subn &$subn) + public static function convert(\Gedcom\Record\Subn &$subn) { $level = 0; $output = ''; From e212341c33838c2d9b31f5c9353990b26a8d86f3 Mon Sep 17 00:00:00 2001 From: Heru Firmansyah Date: Wed, 25 Aug 2021 21:00:20 +0800 Subject: [PATCH 84/99] Fix fillable birthday, deathday, and burialday --- src/Parser/Date.php | 2 +- src/Parser/Indi.php | 5 +++++ src/Record/Indi.php | 28 ++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/Parser/Date.php b/src/Parser/Date.php index 1154905d..fb9f530c 100644 --- a/src/Parser/Date.php +++ b/src/Parser/Date.php @@ -39,6 +39,6 @@ public static function parse(\Gedcom\Parser $parser) return $dat->getYear() .'-'. substr("0{$dat->getMonth()}", -2) .'-'. substr("0{$dat->getDay()}", -2); } - return null; + return $dat->getYear(); } } diff --git a/src/Parser/Indi.php b/src/Parser/Indi.php index ba44a748..3f520a06 100644 --- a/src/Parser/Indi.php +++ b/src/Parser/Indi.php @@ -69,12 +69,17 @@ public static function parse(\Gedcom\Parser $parser) case 'BASM': case 'BLES': case 'BURI': + $burialday = \Gedcom\Parser\Date::parse($parser); + $indi->setBurialday($burialday); + break; case 'CENS': case 'CHR': case 'CHRA': case 'CONF': case 'CREM': case 'DEAT': + $deathday = \Gedcom\Parser\Date::parse($parser); + $indi->setDeathday($deathday); break; case 'EMIG': case 'FCOM': diff --git a/src/Record/Indi.php b/src/Record/Indi.php index 6e9d8c7b..5e801b19 100644 --- a/src/Record/Indi.php +++ b/src/Record/Indi.php @@ -141,6 +141,10 @@ class Indi extends \Gedcom\Record implements Noteable, Objectable, Sourceable protected $birthday; + protected $deathday; + + protected $burialday; + public function setBirthday($birthday = '') { $this->birthday = $birthday; @@ -153,6 +157,30 @@ public function getBirthday() return $this->birthday; } + public function setDeathday($deathday = '') + { + $this->deathday = $deathday; + + return $this; + } + + public function getDeathday() + { + return $this->deathday; + } + + public function setBurialday($burialday = '') + { + $this->burialday = $burialday; + + return $this; + } + + public function getBurialday() + { + return $this->burialday; + } + /** * @param string $id * From adc6a02a8eddb165a2dc545749aad8e772bacbc7 Mon Sep 17 00:00:00 2001 From: Heru Firmansyah Date: Thu, 26 Aug 2021 00:20:36 +0800 Subject: [PATCH 85/99] Fix fillable nick, type, and chan --- src/Parser/Chan.php | 3 ++ src/Record/Chan.php | 97 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) diff --git a/src/Parser/Chan.php b/src/Parser/Chan.php index 741543ed..41fad341 100644 --- a/src/Parser/Chan.php +++ b/src/Parser/Chan.php @@ -55,6 +55,9 @@ public static function parse(\Gedcom\Parser $parser) $parser->forward(); } + $date = $chan->getYear() .'-'. $chan->getMonth() .'-'. $chan->getDay() ; + $chan->setDatetime($date); + return $chan; } } diff --git a/src/Record/Chan.php b/src/Record/Chan.php index 89ac85de..5984b6dd 100644 --- a/src/Record/Chan.php +++ b/src/Record/Chan.php @@ -21,6 +21,14 @@ */ class Chan extends \Gedcom\Record { + /** + * @var array + */ + private $months = [ + 'JAN' => '01', 'FEB' => '02', 'MAR' => '03', 'APR' => '04', 'MAY' => '05', 'JUN' => '06', + 'JUL' => '07', 'AUG' => '08', 'SEP' => '09', 'OCT' => '10', 'NOV' => '11', 'DEC' => '12', + ]; + /** * @var string */ @@ -31,6 +39,11 @@ class Chan extends \Gedcom\Record */ protected $time; + /** + * @var string + */ + protected $datetime; + /** * @var array */ @@ -95,4 +108,88 @@ public function getTime() { return $this->time; } + + public function setDatetime($date) + { + $this->datetime = $date .' '. $this->time; + + return $this; + } + + public function getDatetime() + { + return $this->datetime; + } + + public function getMonth() + { + $record = explode(' ', $this->date); + if (count($record) > 0) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + foreach ($record as $part) { + if (isset($this->months[trim($part)])) { + return $this->months[trim($part)]; + } + } + } + + return null; + } + + /** + * Return year part of date. + * + * @return int|null + */ + public function getYear() + { + $record = explode(' ', $this->date); + if (count($record) > 0) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + if (count($record) > 0) { + return (int) end($record); + } + } + + return null; + } + + /** + * Return day part of date. + * + * @return int|null + */ + public function getDay() + { + $record = explode(' ', $this->date); + if (!empty($record[0])) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + if (count($record) > 0) { + $day = (int) reset($record); + if ($day >= 1 && $day <= 31) { + return substr("0{$day}", -2); + } + } + } + + return null; + } + + /** + * Check if the first part is a prefix (eg 'BEF', 'ABT',). + * + * @param string $datePart Date part to be checked + * + * @return bool + */ + private function isPrefix($datePart) + { + return in_array($datePart, ['FROM', 'TO', 'BEF', 'AFT', 'BET', 'AND', 'ABT', 'EST', 'CAL', 'INT']); + } } From a4f894ee736d3105e98efb2206af265a197a63d2 Mon Sep 17 00:00:00 2001 From: Heru Firmansyah Date: Fri, 27 Aug 2021 02:27:55 +0800 Subject: [PATCH 86/99] Fix error export and fill name, birthday, deathday, burial day, gid, givn, surn, type, nick, nsfx, sex, chan, uid --- src/Record/Indi.php | 25 +++++++++++++++++++++++ src/Writer/Indi.php | 48 ++++++++++++++++++++++++++++++++++----------- 2 files changed, 62 insertions(+), 11 deletions(-) diff --git a/src/Record/Indi.php b/src/Record/Indi.php index 5e801b19..2d9324c5 100644 --- a/src/Record/Indi.php +++ b/src/Record/Indi.php @@ -27,6 +27,11 @@ class Indi extends \Gedcom\Record implements Noteable, Objectable, Sourceable */ protected $id; + /** + * @var string + */ + protected $gid; + /** * @var string */ @@ -201,6 +206,26 @@ public function getId() return $this->id; } + /** + * @param string $id + * + * @return Indi + */ + public function setGid($gid = '') + { + $this->gid = $gid; + + return $this; + } + + /** + * @return string + */ + public function getGid() + { + return $this->gid; + } + /** * @param string $uid * diff --git a/src/Writer/Indi.php b/src/Writer/Indi.php index b35ac4d6..06bc8c9e 100644 --- a/src/Writer/Indi.php +++ b/src/Writer/Indi.php @@ -27,21 +27,18 @@ public static function convert(\Gedcom\Record\Indi &$indi) // id $id = $indi->getId(); - $output = $level.' @'.$id."@ INDI\n"; + + // gid + $gid = $indi->getGid(); + $output = $level.' @'.$gid."@ INDI\n"; // increase level after start indi $level++; - // name - // $name = $indi->getName(); - // if(!empty($name)){ - // $output.=$level." NAME ".$name."\n"; - // } - - // chan - $chan = $indi->getChan(); - if (!empty($chan)) { - $output .= $level.' CHAN '.$chan."\n"; + // uid + $uid = $indi->getUid(); + if (!empty($uid)) { + $output .= $level.' _UID '.$uid."\n"; } // $attr @@ -118,6 +115,27 @@ public static function convert(\Gedcom\Record\Indi &$indi) $output .= $level.' SEX '.$sex."\n"; } + // $birthday + $birthday = $indi->getBirthday(); + if (!empty($birthday)) { + $output .= $level.' BIRT '."\n"; + $output .= ($level+1).' DATE '.$birthday."\n"; + } + + // $deathday + $deathday = $indi->getDeathday(); + if (!empty($deathday)) { + $output .= $level.' DEAT '."\n"; + $output .= ($level+1).' DATE '.$deathday."\n"; + } + + // $burialday + $burialday = $indi->getBurialday(); + if (!empty($burialday)) { + $output .= $level.' BURI '."\n"; + $output .= ($level+1).' DATE '.$burialday."\n"; + } + // $rin $rin = $indi->getRin(); if (!empty($rin)) { @@ -207,6 +225,14 @@ public static function convert(\Gedcom\Record\Indi &$indi) } } + // chan + $chan = $indi->getChan(); + if (!empty($chan)) { + $output .= $level.' CHAN '."\n"; + $output .= ($level+1).' DATE '.$chan[0]."\n"; + $output .= ($level+1).' TIME '.$chan[1]."\n"; + } + // Bapl // Currently Bapl is empty // $bapl = $indi->getBapl(); From b6ced1a00bf8cd2cf87ca117263d924aef64bd52 Mon Sep 17 00:00:00 2001 From: Heru Firmansyah Date: Fri, 27 Aug 2021 17:55:39 +0800 Subject: [PATCH 87/99] Fix not filled for birt dati, birt plac, deat dati, deat plac, deat caus, buri dati, and buri plac when import gedcom file --- src/Parser/Birt.php | 57 ++++++++++++++++++ src/Parser/Buri.php | 57 ++++++++++++++++++ src/Parser/Chan.php | 2 +- src/Parser/Deat.php | 60 +++++++++++++++++++ src/Parser/Indi.php | 16 +++-- src/Record/Birt.php | 128 ++++++++++++++++++++++++++++++++++++++++ src/Record/Buri.php | 129 +++++++++++++++++++++++++++++++++++++++++ src/Record/Chan.php | 4 +- src/Record/Deat.php | 138 ++++++++++++++++++++++++++++++++++++++++++++ src/Record/Indi.php | 44 ++++++-------- 10 files changed, 599 insertions(+), 36 deletions(-) create mode 100644 src/Parser/Birt.php create mode 100644 src/Parser/Buri.php create mode 100644 src/Parser/Deat.php create mode 100644 src/Record/Birt.php create mode 100644 src/Record/Buri.php create mode 100644 src/Record/Deat.php diff --git a/src/Parser/Birt.php b/src/Parser/Birt.php new file mode 100644 index 00000000..4cc08d5a --- /dev/null +++ b/src/Parser/Birt.php @@ -0,0 +1,57 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Gedcom\Parser; + +class Birt extends \Gedcom\Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + + $parser->forward(); + + $birt = new \Gedcom\Record\Birt(); + + while (!$parser->eof()) { + $record = $parser->getCurrentLineRecord(); + $recordType = trim($record[1]); + $currentDepth = (int) $record[0]; + + if ($currentDepth <= $depth) { + $parser->back(); + break; + } + + switch ($recordType) { + case 'DATE': + $birt->setDate(trim($record[2])); + break; + case '_DATI': + $birt->setDati(trim($record[2])); + break; + case 'PLAC': + $birt->setPlac(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); + } + + $parser->forward(); + } + + return $birt; + } +} diff --git a/src/Parser/Buri.php b/src/Parser/Buri.php new file mode 100644 index 00000000..2bf72b8c --- /dev/null +++ b/src/Parser/Buri.php @@ -0,0 +1,57 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Gedcom\Parser; + +class Buri extends \Gedcom\Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + + $parser->forward(); + + $buri = new \Gedcom\Record\Buri(); + + while (!$parser->eof()) { + $record = $parser->getCurrentLineRecord(); + $recordType = trim($record[1]); + $currentDepth = (int) $record[0]; + + if ($currentDepth <= $depth) { + $parser->back(); + break; + } + + switch ($recordType) { + case 'DATE': + $buri->setDate(trim($record[2])); + break; + case '_DATI': + $buri->setDati(trim($record[2])); + break; + case 'PLAC': + $buri->setPlac(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); + } + + $parser->forward(); + } + + return $buri; + } +} diff --git a/src/Parser/Chan.php b/src/Parser/Chan.php index ffefe485..57e11f3a 100644 --- a/src/Parser/Chan.php +++ b/src/Parser/Chan.php @@ -55,7 +55,7 @@ public static function parse(\Gedcom\Parser $parser) $parser->forward(); } - $date = $chan->getYear() .'-'. $chan->getMonth() .'-'. $chan->getDay() ; + $date = $chan->getYear() .'-'. $chan->getMonth() .'-'. $chan->getDay(); $chan->setDatetime($date); return $chan; diff --git a/src/Parser/Deat.php b/src/Parser/Deat.php new file mode 100644 index 00000000..0f989ded --- /dev/null +++ b/src/Parser/Deat.php @@ -0,0 +1,60 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Gedcom\Parser; + +class Deat extends \Gedcom\Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + + $parser->forward(); + + $deat = new \Gedcom\Record\Deat(); + + while (!$parser->eof()) { + $record = $parser->getCurrentLineRecord(); + $recordType = trim($record[1]); + $currentDepth = (int) $record[0]; + + if ($currentDepth <= $depth) { + $parser->back(); + break; + } + + switch ($recordType) { + case 'DATE': + $deat->setDate(trim($record[2])); + break; + case '_DATI': + $deat->setDati(trim($record[2])); + break; + case 'PLAC': + $deat->setPlac(trim($record[2])); + break; + case 'CAUS': + $deat->setCaus(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); + } + + $parser->forward(); + } + + return $deat; + } +} diff --git a/src/Parser/Indi.php b/src/Parser/Indi.php index e9ed8784..a7968a1c 100644 --- a/src/Parser/Indi.php +++ b/src/Parser/Indi.php @@ -45,6 +45,10 @@ public static function parse(\Gedcom\Parser $parser) break; } + if ($recordType == 'BURI') { + $a=''; + } + switch ($recordType) { case '_UID': $indi->setUid(trim($record[2])); @@ -61,16 +65,16 @@ public static function parse(\Gedcom\Parser $parser) break; case 'ADOP': case 'BIRT': - $birthday = \Gedcom\Parser\Date::parse($parser); - $indi->setBirthday($birthday); + $birt = \Gedcom\Parser\Birt::parse($parser); + $indi->setBirt($birt); break; case 'BAPM': case 'BARM': case 'BASM': case 'BLES': case 'BURI': - $burialday = \Gedcom\Parser\Date::parse($parser); - $indi->setBurialday($burialday); + $buri = \Gedcom\Parser\Buri::parse($parser); + $indi->setBuri($buri); break; case 'CENS': case 'CHR': @@ -78,8 +82,8 @@ public static function parse(\Gedcom\Parser $parser) case 'CONF': case 'CREM': case 'DEAT': - $deathday = \Gedcom\Parser\Date::parse($parser); - $indi->setDeathday($deathday); + $deat = \Gedcom\Parser\Deat::parse($parser); + $indi->setDeat($deat); break; case 'EMIG': case 'FCOM': diff --git a/src/Record/Birt.php b/src/Record/Birt.php new file mode 100644 index 00000000..d9899814 --- /dev/null +++ b/src/Record/Birt.php @@ -0,0 +1,128 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Gedcom\Record; + +use Gedcom\Record; + +/** + * Class Chan. + */ +class Birt extends \Gedcom\Record +{ + private $months = [ + 'JAN' => '01', 'FEB' => '02', 'MAR' => '03', 'APR' => '04', 'MAY' => '05', 'JUN' => '06', + 'JUL' => '07', 'AUG' => '08', 'SEP' => '09', 'OCT' => '10', 'NOV' => '11', 'DEC' => '12', + ]; + + public $date; + + public $year; + + public $dateFormatted; + + public $dati; + + public $plac; + + public function setDate($date) { + $this->date = $date; + if ($this->getDay()) { + $this->dateFormatted = $this->getYear() .'-'. $this->getMonth() .'-'. substr("0{$this->getDay()}", -2); + } + else { + $this->year = $date; + $this->date = null; + } + } + + public function getDateFormatted() { + return $this->dateFormatted; + } + + public function getDate() { + return $this->date; + } + + public function setDati($dati) { + $this->dati = $dati; + } + + public function getDati() { + return $this->dati; + } + + public function setPlac($plac) { + $this->plac = $plac; + } + + public function getPlac() { + return $this->plac; + } + + public function getDay() + { + $record = explode(' ', $this->date); + if (!empty($record[0])) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + if (count($record) > 0) { + $day = (int) reset($record); + if ($day >= 1 && $day <= 31) { + return $day; + } + } + } + + return null; + } + + public function getMonth() + { + $record = explode(' ', $this->date); + if (count($record) > 0) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + foreach ($record as $part) { + if (isset($this->months[trim($part)])) { + return $this->months[trim($part)]; + } + } + } + + return null; + } + + public function getYear() + { + $record = explode(' ', $this->date); + if (count($record) > 0) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + if (count($record) > 0) { + return (int) end($record); + } + } + + return null; + } + + private function isPrefix($datePart) + { + return in_array($datePart, ['FROM', 'TO', 'BEF', 'AFT', 'BET', 'AND', 'ABT', 'EST', 'CAL', 'INT']); + } +} diff --git a/src/Record/Buri.php b/src/Record/Buri.php new file mode 100644 index 00000000..468600f7 --- /dev/null +++ b/src/Record/Buri.php @@ -0,0 +1,129 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Gedcom\Record; + +use Gedcom\Record; + +/** + * Class Chan. + */ +class Buri extends \Gedcom\Record +{ + private $months = [ + 'JAN' => '01', 'FEB' => '02', 'MAR' => '03', 'APR' => '04', 'MAY' => '05', 'JUN' => '06', + 'JUL' => '07', 'AUG' => '08', 'SEP' => '09', 'OCT' => '10', 'NOV' => '11', 'DEC' => '12', + ]; + + public $date; + + public $year; + + public $dateFormatted = null; + + public $dati; + + public $plac; + + public function setDate($date) { + $this->date = $date; + if ($this->getDay()) { + $this->dateFormatted = $this->getYear() .'-'. $this->getMonth() .'-'. substr("0{$this->getDay()}", -2); + } + else { + $this->dateFormatted = null; + $this->year = $date; + $this->date = null; + } + } + + public function getDateFormatted() { + return $this->dateFormatted; + } + + public function getDate() { + return $this->date; + } + + public function setDati($dati) { + $this->dati = $dati; + } + + public function getDati() { + return $this->dati; + } + + public function setPlac($plac) { + $this->plac = $plac; + } + + public function getPlac() { + return $this->plac; + } + + public function getDay() + { + $record = explode(' ', $this->date); + if (!empty($record[0])) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + if (count($record) > 0) { + $day = (int) reset($record); + if ($day >= 1 && $day <= 31) { + return $day; + } + } + } + + return null; + } + + public function getMonth() + { + $record = explode(' ', $this->date); + if (count($record) > 0) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + foreach ($record as $part) { + if (isset($this->months[trim($part)])) { + return $this->months[trim($part)]; + } + } + } + + return null; + } + + public function getYear() + { + $record = explode(' ', $this->date); + if (count($record) > 0) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + if (count($record) > 0) { + return (int) end($record); + } + } + + return null; + } + + private function isPrefix($datePart) + { + return in_array($datePart, ['FROM', 'TO', 'BEF', 'AFT', 'BET', 'AND', 'ABT', 'EST', 'CAL', 'INT']); + } +} diff --git a/src/Record/Chan.php b/src/Record/Chan.php index cad77e39..d92a9ee3 100644 --- a/src/Record/Chan.php +++ b/src/Record/Chan.php @@ -42,7 +42,7 @@ class Chan extends \Gedcom\Record /** * @var string */ - protected $datetime; + protected $datetime = ''; /** * @var array @@ -109,7 +109,7 @@ public function getTime() return $this->time; } - public function setDatetime($date) + public function setDatetime($date = '') { $this->datetime = $date .' '. $this->time; diff --git a/src/Record/Deat.php b/src/Record/Deat.php new file mode 100644 index 00000000..bd7facf7 --- /dev/null +++ b/src/Record/Deat.php @@ -0,0 +1,138 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Gedcom\Record; + +use Gedcom\Record; + +/** + * Class Chan. + */ +class Deat extends \Gedcom\Record +{ + private $months = [ + 'JAN' => '01', 'FEB' => '02', 'MAR' => '03', 'APR' => '04', 'MAY' => '05', 'JUN' => '06', + 'JUL' => '07', 'AUG' => '08', 'SEP' => '09', 'OCT' => '10', 'NOV' => '11', 'DEC' => '12', + ]; + + public $date; + + public $year; + + public $dateFormatted = null; + + public $dati; + + public $plac; + + public $caus; + + public function setDate($date) { + $this->date = $date; + if ($this->getDay()) { + $this->dateFormatted = $this->getYear() .'-'. $this->getMonth() .'-'. substr("0{$this->getDay()}", -2); + } + else { + $this->year = $date; + $this->date = null; + } + } + + public function getDateFormatted() { + return $this->dateFormatted; + } + + public function getDate() { + return $this->date; + } + + public function setDati($dati) { + $this->dati = $dati; + } + + public function getDati() { + return $this->dati; + } + + public function setPlac($plac) { + $this->plac = $plac; + } + + public function getPlac() { + return $this->plac; + } + + public function setCaus($caus) { + $this->caus = $caus; + } + + public function getCaus() { + return $this->caus; + } + + public function getDay() + { + $record = explode(' ', $this->date); + if (!empty($record[0])) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + if (count($record) > 0) { + $day = (int) reset($record); + if ($day >= 1 && $day <= 31) { + return $day; + } + } + } + + return null; + } + + public function getMonth() + { + $record = explode(' ', $this->date); + if (count($record) > 0) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + foreach ($record as $part) { + if (isset($this->months[trim($part)])) { + return $this->months[trim($part)]; + } + } + } + + return null; + } + + public function getYear() + { + $record = explode(' ', $this->date); + if (count($record) > 0) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + if (count($record) > 0) { + return (int) end($record); + } + } + + return null; + } + + private function isPrefix($datePart) + { + return in_array($datePart, ['FROM', 'TO', 'BEF', 'AFT', 'BET', 'AND', 'ABT', 'EST', 'CAL', 'INT']); + } +} diff --git a/src/Record/Indi.php b/src/Record/Indi.php index 2d9324c5..8ccdc8fb 100644 --- a/src/Record/Indi.php +++ b/src/Record/Indi.php @@ -144,46 +144,36 @@ class Indi extends \Gedcom\Record implements Noteable, Objectable, Sourceable */ protected $asso = []; - protected $birthday; + protected $deathday = []; - protected $deathday; + protected $birt; - protected $burialday; + protected $buri; + + protected $deat; - public function setBirthday($birthday = '') - { - $this->birthday = $birthday; - - return $this; + public function setBirt($birt) { + $this->birt = $birt; } - public function getBirthday() - { - return $this->birthday; + public function getBirt() { + return $this->birt; } - public function setDeathday($deathday = '') - { - $this->deathday = $deathday; - - return $this; + public function setBuri($buri) { + $this->buri = $buri; } - public function getDeathday() - { - return $this->deathday; + public function getBuri() { + return $this->buri; } - public function setBurialday($burialday = '') - { - $this->burialday = $burialday; - - return $this; + public function setDeat($deat) { + $this->deat = $deat; } - public function getBurialday() - { - return $this->burialday; + public function getDeat() { + return $this->deat; } /** From 71734f6920ebf23c76552c19efe91c331e139da2 Mon Sep 17 00:00:00 2001 From: Heru Firmansyah Date: Sat, 28 Aug 2021 01:29:04 +0800 Subject: [PATCH 88/99] Fix Titl error and fix not filled for titl, fams, famc, and chr when import gedcom file --- src/Parser/Chr.php | 54 +++++++++++++++++++ src/Parser/Indi.php | 3 ++ src/Parser/Indi/Attr.php | 2 +- src/Record/Birt.php | 6 ++- src/Record/Buri.php | 7 +-- src/Record/Chr.php | 110 +++++++++++++++++++++++++++++++++++++++ src/Record/Deat.php | 6 ++- src/Record/Indi.php | 10 ++++ 8 files changed, 190 insertions(+), 8 deletions(-) create mode 100644 src/Parser/Chr.php create mode 100644 src/Record/Chr.php diff --git a/src/Parser/Chr.php b/src/Parser/Chr.php new file mode 100644 index 00000000..dba2bb13 --- /dev/null +++ b/src/Parser/Chr.php @@ -0,0 +1,54 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Gedcom\Parser; + +class Chr extends \Gedcom\Parser\Component +{ + public static function parse(\Gedcom\Parser $parser) + { + $record = $parser->getCurrentLineRecord(); + $depth = (int) $record[0]; + + $parser->forward(); + + $chr = new \Gedcom\Record\Chr(); + + while (!$parser->eof()) { + $record = $parser->getCurrentLineRecord(); + $recordType = trim($record[1]); + $currentDepth = (int) $record[0]; + + if ($currentDepth <= $depth) { + $parser->back(); + break; + } + + switch ($recordType) { + case 'DATE': + $chr->setDate(trim($record[2])); + break; + case 'PLAC': + $chr->setPlac(trim($record[2])); + break; + default: + $parser->logUnhandledRecord(self::class.' @ '.__LINE__); + } + + $parser->forward(); + } + + return $chr; + } +} diff --git a/src/Parser/Indi.php b/src/Parser/Indi.php index a7968a1c..6105b095 100644 --- a/src/Parser/Indi.php +++ b/src/Parser/Indi.php @@ -78,6 +78,9 @@ public static function parse(\Gedcom\Parser $parser) break; case 'CENS': case 'CHR': + $chr = \Gedcom\Parser\Chr::parse($parser); + $indi->setChr($chr); + break; case 'CHRA': case 'CONF': case 'CREM': diff --git a/src/Parser/Indi/Attr.php b/src/Parser/Indi/Attr.php index 84431ae2..070d75a9 100644 --- a/src/Parser/Indi/Attr.php +++ b/src/Parser/Indi/Attr.php @@ -21,7 +21,7 @@ public static function parse(\Gedcom\Parser $parser) $record = $parser->getCurrentLineRecord(); $depth = (int) $record[0]; if (isset($record[1])) { - $className = 'GedcomRecordIndi'.ucfirst(strtolower(trim($record[1]))); + $className = '\\Gedcom\\Record\\Indi\\'.ucfirst(strtolower(trim($record[1]))); $attr = new $className(); $attr->setType(trim($record[1])); diff --git a/src/Record/Birt.php b/src/Record/Birt.php index d9899814..d88809aa 100644 --- a/src/Record/Birt.php +++ b/src/Record/Birt.php @@ -27,6 +27,8 @@ class Birt extends \Gedcom\Record ]; public $date; + + public $month; public $year; @@ -42,8 +44,8 @@ public function setDate($date) { $this->dateFormatted = $this->getYear() .'-'. $this->getMonth() .'-'. substr("0{$this->getDay()}", -2); } else { - $this->year = $date; - $this->date = null; + $this->month = $this->getMonth(); + $this->year = $this->getYear(); } } diff --git a/src/Record/Buri.php b/src/Record/Buri.php index 468600f7..742c2840 100644 --- a/src/Record/Buri.php +++ b/src/Record/Buri.php @@ -28,6 +28,8 @@ class Buri extends \Gedcom\Record public $date; + public $month; + public $year; public $dateFormatted = null; @@ -42,9 +44,8 @@ public function setDate($date) { $this->dateFormatted = $this->getYear() .'-'. $this->getMonth() .'-'. substr("0{$this->getDay()}", -2); } else { - $this->dateFormatted = null; - $this->year = $date; - $this->date = null; + $this->month = $this->getMonth(); + $this->year = $this->getYear(); } } diff --git a/src/Record/Chr.php b/src/Record/Chr.php new file mode 100644 index 00000000..0019d9f0 --- /dev/null +++ b/src/Record/Chr.php @@ -0,0 +1,110 @@ + + * @copyright Copyright (c) 2010-2013, Kristopher Wilson + * @license MIT + * + * @link http://github.com/mrkrstphr/php-gedcom + */ + +namespace Gedcom\Record; + +use Gedcom\Record; + +/** + * Class Chan. + */ +class Chr extends \Gedcom\Record +{ + private $months = [ + 'JAN' => '01', 'FEB' => '02', 'MAR' => '03', 'APR' => '04', 'MAY' => '05', 'JUN' => '06', + 'JUL' => '07', 'AUG' => '08', 'SEP' => '09', 'OCT' => '10', 'NOV' => '11', 'DEC' => '12', + ]; + + public $date; + + public $dateFormatted = null; + + public $plac; + + public function setDate($date) { + $this->date = $date; + $this->dateFormatted = $this->getYear() .'-'. $this->getMonth() .'-'. substr("0{$this->getDay()}", -2); + } + + public function getDateFormatted() { + return $this->dateFormatted; + } + + public function getDate() { + return $this->date; + } + + public function setPlac($plac) { + $this->plac = $plac; + } + + public function getPlac() { + return $this->plac; + } + + public function getDay() + { + $record = explode(' ', $this->date); + if (!empty($record[0])) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + if (count($record) > 0) { + $day = (int) reset($record); + if ($day >= 1 && $day <= 31) { + return $day; + } + } + } + + return null; + } + + public function getMonth() + { + $record = explode(' ', $this->date); + if (count($record) > 0) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + foreach ($record as $part) { + if (isset($this->months[trim($part)])) { + return $this->months[trim($part)]; + } + } + } + + return null; + } + + public function getYear() + { + $record = explode(' ', $this->date); + if (count($record) > 0) { + if ($this->isPrefix($record[0])) { + unset($record[0]); + } + if (count($record) > 0) { + return (int) end($record); + } + } + + return null; + } + + private function isPrefix($datePart) + { + return in_array($datePart, ['FROM', 'TO', 'BEF', 'AFT', 'BET', 'AND', 'ABT', 'EST', 'CAL', 'INT']); + } +} diff --git a/src/Record/Deat.php b/src/Record/Deat.php index bd7facf7..5c323100 100644 --- a/src/Record/Deat.php +++ b/src/Record/Deat.php @@ -28,6 +28,8 @@ class Deat extends \Gedcom\Record public $date; + public $month; + public $year; public $dateFormatted = null; @@ -44,8 +46,8 @@ public function setDate($date) { $this->dateFormatted = $this->getYear() .'-'. $this->getMonth() .'-'. substr("0{$this->getDay()}", -2); } else { - $this->year = $date; - $this->date = null; + $this->month = $this->getMonth(); + $this->year = $this->getYear(); } } diff --git a/src/Record/Indi.php b/src/Record/Indi.php index 8ccdc8fb..f2228f08 100644 --- a/src/Record/Indi.php +++ b/src/Record/Indi.php @@ -151,6 +151,8 @@ class Indi extends \Gedcom\Record implements Noteable, Objectable, Sourceable protected $buri; protected $deat; + + protected $chr; public function setBirt($birt) { $this->birt = $birt; @@ -176,6 +178,14 @@ public function getDeat() { return $this->deat; } + public function setChr($chr) { + $this->chr = $chr; + } + + public function getChr() { + return $this->chr; + } + /** * @param string $id * From 0099602841f785c3eb637db2a6e6b4800e594c21 Mon Sep 17 00:00:00 2001 From: Heru Firmansyah Date: Mon, 30 Aug 2021 06:27:21 +0800 Subject: [PATCH 89/99] Fix add family when export gedcom --- src/Record.php | 2 +- src/Record/SourRef.php | 7 +++++++ src/Writer.php | 2 +- src/Writer/Indi.php | 6 +++--- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/Record.php b/src/Record.php index 4bb92bce..6739eb7c 100644 --- a/src/Record.php +++ b/src/Record.php @@ -77,7 +77,7 @@ public function __call($method, $args) } if (!property_exists($this, '_'.$arr)) { - throw new \Gedcom\Exception('Unknown '.$this::class.'::'.$arr); + throw new \Exception('Unknown '.$this::class.'::'.$arr); } return $this->{'_'.$arr}; diff --git a/src/Record/SourRef.php b/src/Record/SourRef.php index 35da924a..b0ec004c 100644 --- a/src/Record/SourRef.php +++ b/src/Record/SourRef.php @@ -27,4 +27,11 @@ class SourRef extends \Gedcom\Record protected $_obje = []; protected $_note = []; + + public function setSour($sour = '') + { + $this->_sour = $sour; + + return $this; + } } diff --git a/src/Writer.php b/src/Writer.php index d86737d5..72c4f684 100644 --- a/src/Writer.php +++ b/src/Writer.php @@ -73,7 +73,7 @@ public static function convert(Gedcom $gedcom, $format = self::GEDCOM55) if (!empty($sours) && count($sours) > 0) { foreach ($sours as $item) { if ($item) { - $output .= Sour::convert($item); + $output .= Sour::convert($item, 0); } } } diff --git a/src/Writer/Indi.php b/src/Writer/Indi.php index 06bc8c9e..b5884cd4 100644 --- a/src/Writer/Indi.php +++ b/src/Writer/Indi.php @@ -116,21 +116,21 @@ public static function convert(\Gedcom\Record\Indi &$indi) } // $birthday - $birthday = $indi->getBirthday(); + $birthday = $indi->getBirt(); if (!empty($birthday)) { $output .= $level.' BIRT '."\n"; $output .= ($level+1).' DATE '.$birthday."\n"; } // $deathday - $deathday = $indi->getDeathday(); + $deathday = $indi->getDeat(); if (!empty($deathday)) { $output .= $level.' DEAT '."\n"; $output .= ($level+1).' DATE '.$deathday."\n"; } // $burialday - $burialday = $indi->getBurialday(); + $burialday = $indi->getBuri(); if (!empty($burialday)) { $output .= $level.' BURI '."\n"; $output .= ($level+1).' DATE '.$burialday."\n"; From 227130ceefa4c019eea712c8d5918a64d7f54e79 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sun, 19 Sep 2021 16:35:45 +0000 Subject: [PATCH 90/99] Apply fixes from StyleCI --- src/Parser/Chan.php | 2 +- src/Parser/Indi.php | 2 +- src/Record/Birt.php | 48 ++++++++++++++++++++------------------ src/Record/Buri.php | 48 ++++++++++++++++++++------------------ src/Record/Chan.php | 10 ++++---- src/Record/Chr.php | 19 ++++++++------- src/Record/Deat.php | 56 +++++++++++++++++++++++++-------------------- src/Record/Indi.php | 37 +++++++++++++++++------------- src/Writer/Indi.php | 10 ++++---- 9 files changed, 127 insertions(+), 105 deletions(-) diff --git a/src/Parser/Chan.php b/src/Parser/Chan.php index 57e11f3a..f7886fc5 100644 --- a/src/Parser/Chan.php +++ b/src/Parser/Chan.php @@ -55,7 +55,7 @@ public static function parse(\Gedcom\Parser $parser) $parser->forward(); } - $date = $chan->getYear() .'-'. $chan->getMonth() .'-'. $chan->getDay(); + $date = $chan->getYear().'-'.$chan->getMonth().'-'.$chan->getDay(); $chan->setDatetime($date); return $chan; diff --git a/src/Parser/Indi.php b/src/Parser/Indi.php index 6105b095..88b57514 100644 --- a/src/Parser/Indi.php +++ b/src/Parser/Indi.php @@ -46,7 +46,7 @@ public static function parse(\Gedcom\Parser $parser) } if ($recordType == 'BURI') { - $a=''; + $a = ''; } switch ($recordType) { diff --git a/src/Record/Birt.php b/src/Record/Birt.php index d88809aa..7ff93c1a 100644 --- a/src/Record/Birt.php +++ b/src/Record/Birt.php @@ -14,8 +14,6 @@ namespace Gedcom\Record; -use Gedcom\Record; - /** * Class Chan. */ @@ -25,51 +23,57 @@ class Birt extends \Gedcom\Record 'JAN' => '01', 'FEB' => '02', 'MAR' => '03', 'APR' => '04', 'MAY' => '05', 'JUN' => '06', 'JUL' => '07', 'AUG' => '08', 'SEP' => '09', 'OCT' => '10', 'NOV' => '11', 'DEC' => '12', ]; - + public $date; - + public $month; public $year; public $dateFormatted; - + public $dati; - + public $plac; - public function setDate($date) { + public function setDate($date) + { $this->date = $date; if ($this->getDay()) { - $this->dateFormatted = $this->getYear() .'-'. $this->getMonth() .'-'. substr("0{$this->getDay()}", -2); - } - else { + $this->dateFormatted = $this->getYear().'-'.$this->getMonth().'-'.substr("0{$this->getDay()}", -2); + } else { $this->month = $this->getMonth(); $this->year = $this->getYear(); } } - - public function getDateFormatted() { + + public function getDateFormatted() + { return $this->dateFormatted; } - - public function getDate() { + + public function getDate() + { return $this->date; } - - public function setDati($dati) { + + public function setDati($dati) + { $this->dati = $dati; } - - public function getDati() { + + public function getDati() + { return $this->dati; } - - public function setPlac($plac) { + + public function setPlac($plac) + { $this->plac = $plac; } - - public function getPlac() { + + public function getPlac() + { return $this->plac; } diff --git a/src/Record/Buri.php b/src/Record/Buri.php index 742c2840..6f2b6c51 100644 --- a/src/Record/Buri.php +++ b/src/Record/Buri.php @@ -14,8 +14,6 @@ namespace Gedcom\Record; -use Gedcom\Record; - /** * Class Chan. */ @@ -25,7 +23,7 @@ class Buri extends \Gedcom\Record 'JAN' => '01', 'FEB' => '02', 'MAR' => '03', 'APR' => '04', 'MAY' => '05', 'JUN' => '06', 'JUL' => '07', 'AUG' => '08', 'SEP' => '09', 'OCT' => '10', 'NOV' => '11', 'DEC' => '12', ]; - + public $date; public $month; @@ -33,43 +31,49 @@ class Buri extends \Gedcom\Record public $year; public $dateFormatted = null; - + public $dati; - + public $plac; - - public function setDate($date) { + + public function setDate($date) + { $this->date = $date; if ($this->getDay()) { - $this->dateFormatted = $this->getYear() .'-'. $this->getMonth() .'-'. substr("0{$this->getDay()}", -2); - } - else { + $this->dateFormatted = $this->getYear().'-'.$this->getMonth().'-'.substr("0{$this->getDay()}", -2); + } else { $this->month = $this->getMonth(); $this->year = $this->getYear(); } } - - public function getDateFormatted() { + + public function getDateFormatted() + { return $this->dateFormatted; } - - public function getDate() { + + public function getDate() + { return $this->date; } - - public function setDati($dati) { + + public function setDati($dati) + { $this->dati = $dati; } - - public function getDati() { + + public function getDati() + { return $this->dati; } - - public function setPlac($plac) { + + public function setPlac($plac) + { $this->plac = $plac; } - - public function getPlac() { + + public function getPlac() + { return $this->plac; } diff --git a/src/Record/Chan.php b/src/Record/Chan.php index d92a9ee3..2b72b00f 100644 --- a/src/Record/Chan.php +++ b/src/Record/Chan.php @@ -28,7 +28,7 @@ class Chan extends \Gedcom\Record 'JAN' => '01', 'FEB' => '02', 'MAR' => '03', 'APR' => '04', 'MAY' => '05', 'JUN' => '06', 'JUL' => '07', 'AUG' => '08', 'SEP' => '09', 'OCT' => '10', 'NOV' => '11', 'DEC' => '12', ]; - + /** * @var string */ @@ -108,14 +108,14 @@ public function getTime() { return $this->time; } - + public function setDatetime($date = '') { - $this->datetime = $date .' '. $this->time; - + $this->datetime = $date.' '.$this->time; + return $this; } - + public function getDatetime() { return $this->datetime; diff --git a/src/Record/Chr.php b/src/Record/Chr.php index 0019d9f0..0ab31edd 100644 --- a/src/Record/Chr.php +++ b/src/Record/Chr.php @@ -14,8 +14,6 @@ namespace Gedcom\Record; -use Gedcom\Record; - /** * Class Chan. */ @@ -32,24 +30,29 @@ class Chr extends \Gedcom\Record public $plac; - public function setDate($date) { + public function setDate($date) + { $this->date = $date; - $this->dateFormatted = $this->getYear() .'-'. $this->getMonth() .'-'. substr("0{$this->getDay()}", -2); + $this->dateFormatted = $this->getYear().'-'.$this->getMonth().'-'.substr("0{$this->getDay()}", -2); } - public function getDateFormatted() { + public function getDateFormatted() + { return $this->dateFormatted; } - public function getDate() { + public function getDate() + { return $this->date; } - public function setPlac($plac) { + public function setPlac($plac) + { $this->plac = $plac; } - public function getPlac() { + public function getPlac() + { return $this->plac; } diff --git a/src/Record/Deat.php b/src/Record/Deat.php index 5c323100..9b342313 100644 --- a/src/Record/Deat.php +++ b/src/Record/Deat.php @@ -14,8 +14,6 @@ namespace Gedcom\Record; -use Gedcom\Record; - /** * Class Chan. */ @@ -25,7 +23,7 @@ class Deat extends \Gedcom\Record 'JAN' => '01', 'FEB' => '02', 'MAR' => '03', 'APR' => '04', 'MAY' => '05', 'JUN' => '06', 'JUL' => '07', 'AUG' => '08', 'SEP' => '09', 'OCT' => '10', 'NOV' => '11', 'DEC' => '12', ]; - + public $date; public $month; @@ -33,53 +31,61 @@ class Deat extends \Gedcom\Record public $year; public $dateFormatted = null; - + public $dati; - + public $plac; - + public $caus; - - public function setDate($date) { + + public function setDate($date) + { $this->date = $date; if ($this->getDay()) { - $this->dateFormatted = $this->getYear() .'-'. $this->getMonth() .'-'. substr("0{$this->getDay()}", -2); - } - else { + $this->dateFormatted = $this->getYear().'-'.$this->getMonth().'-'.substr("0{$this->getDay()}", -2); + } else { $this->month = $this->getMonth(); $this->year = $this->getYear(); } } - - public function getDateFormatted() { + + public function getDateFormatted() + { return $this->dateFormatted; } - - public function getDate() { + + public function getDate() + { return $this->date; } - - public function setDati($dati) { + + public function setDati($dati) + { $this->dati = $dati; } - - public function getDati() { + + public function getDati() + { return $this->dati; } - - public function setPlac($plac) { + + public function setPlac($plac) + { $this->plac = $plac; } - - public function getPlac() { + + public function getPlac() + { return $this->plac; } - public function setCaus($caus) { + public function setCaus($caus) + { $this->caus = $caus; } - public function getCaus() { + public function getCaus() + { return $this->caus; } diff --git a/src/Record/Indi.php b/src/Record/Indi.php index f2228f08..610b54e5 100644 --- a/src/Record/Indi.php +++ b/src/Record/Indi.php @@ -14,9 +14,6 @@ namespace Gedcom\Record; -use \Gedcom\Record; - - /** * Class Indi. */ @@ -143,46 +140,54 @@ class Indi extends \Gedcom\Record implements Noteable, Objectable, Sourceable * @var Indi\Asso[] */ protected $asso = []; - + protected $deathday = []; - + protected $birt; - + protected $buri; protected $deat; protected $chr; - - public function setBirt($birt) { + + public function setBirt($birt) + { $this->birt = $birt; } - - public function getBirt() { + + public function getBirt() + { return $this->birt; } - public function setBuri($buri) { + public function setBuri($buri) + { $this->buri = $buri; } - public function getBuri() { + public function getBuri() + { return $this->buri; } - public function setDeat($deat) { + public function setDeat($deat) + { $this->deat = $deat; } - public function getDeat() { + public function getDeat() + { return $this->deat; } - public function setChr($chr) { + public function setChr($chr) + { $this->chr = $chr; } - public function getChr() { + public function getChr() + { return $this->chr; } diff --git a/src/Writer/Indi.php b/src/Writer/Indi.php index b5884cd4..3a2f848d 100644 --- a/src/Writer/Indi.php +++ b/src/Writer/Indi.php @@ -119,21 +119,21 @@ public static function convert(\Gedcom\Record\Indi &$indi) $birthday = $indi->getBirt(); if (!empty($birthday)) { $output .= $level.' BIRT '."\n"; - $output .= ($level+1).' DATE '.$birthday."\n"; + $output .= ($level + 1).' DATE '.$birthday."\n"; } // $deathday $deathday = $indi->getDeat(); if (!empty($deathday)) { $output .= $level.' DEAT '."\n"; - $output .= ($level+1).' DATE '.$deathday."\n"; + $output .= ($level + 1).' DATE '.$deathday."\n"; } // $burialday $burialday = $indi->getBuri(); if (!empty($burialday)) { $output .= $level.' BURI '."\n"; - $output .= ($level+1).' DATE '.$burialday."\n"; + $output .= ($level + 1).' DATE '.$burialday."\n"; } // $rin @@ -229,8 +229,8 @@ public static function convert(\Gedcom\Record\Indi &$indi) $chan = $indi->getChan(); if (!empty($chan)) { $output .= $level.' CHAN '."\n"; - $output .= ($level+1).' DATE '.$chan[0]."\n"; - $output .= ($level+1).' TIME '.$chan[1]."\n"; + $output .= ($level + 1).' DATE '.$chan[0]."\n"; + $output .= ($level + 1).' TIME '.$chan[1]."\n"; } // Bapl From c73c527c87e2f435729d91595e28e5514a76bd62 Mon Sep 17 00:00:00 2001 From: webstar1027 Date: Mon, 27 Sep 2021 15:10:01 +0200 Subject: [PATCH 91/99] prefix issue fix --- src/Parser/Sour/Data.php | 2 +- src/Parser/Sour/Repo.php | 4 ++-- src/Parser/SourRef.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Parser/Sour/Data.php b/src/Parser/Sour/Data.php index 0818d8c2..b2ad6085 100644 --- a/src/Parser/Sour/Data.php +++ b/src/Parser/Sour/Data.php @@ -37,7 +37,7 @@ public static function parse(\Gedcom\Parser $parser) switch ($recordType) { case 'EVEN': - $data->addEven(\Parser\Sour\Data\Even::parse($parser)); + $data->addEven(\Gedcom\Parser\Sour\Data\Even::parse($parser)); break; case 'DATE': // not in 5.5.1 $data->setDate(trim($record[2])); diff --git a/src/Parser/Sour/Repo.php b/src/Parser/Sour/Repo.php index c2e9c2fd..f725b70e 100644 --- a/src/Parser/Sour/Repo.php +++ b/src/Parser/Sour/Repo.php @@ -40,10 +40,10 @@ public static function parse(\Gedcom\Parser $parser) switch ($recordType) { case 'NOTE': - $repo->addNote(\Parser\NoteRef::parse($parser)); + $repo->addNote(\Gedcom\Parser\NoteRef::parse($parser)); break; case 'CALN': - $repo->addCaln(\Parser\Sour\Repo\Caln::parse($parser)); + $repo->addCaln(\Gedcom\Parser\Sour\Repo\Caln::parse($parser)); break; default: $parser->logUnhandledRecord(self::class.' @ '.__LINE__); diff --git a/src/Parser/SourRef.php b/src/Parser/SourRef.php index 89f4e915..3498b607 100644 --- a/src/Parser/SourRef.php +++ b/src/Parser/SourRef.php @@ -50,7 +50,7 @@ public static function parse(\Gedcom\Parser $parser) $sour->setEven($even); break; case 'DATA': - $sour->setData(\Parser\SourRef\Data::parse($parser)); + $sour->setData(\Gedcom\Parser\SourRef\Data::parse($parser)); break; case 'TEXT': $sour->setText($parser->parseMultiLineRecord()); From f0490bf2d4c144950b4467ee702844d52dca7919 Mon Sep 17 00:00:00 2001 From: webstar1027 Date: Tue, 28 Sep 2021 21:38:57 +0200 Subject: [PATCH 92/99] some issues fix --- src/Parser/Indi/Even.php | 2 +- src/Record.php | 14 +++++++------- src/Record/Plac/Map.php | 25 +++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/src/Parser/Indi/Even.php b/src/Parser/Indi/Even.php index bc8db5bf..eb357257 100644 --- a/src/Parser/Indi/Even.php +++ b/src/Parser/Indi/Even.php @@ -27,7 +27,7 @@ public static function parse(\Gedcom\Parser $parser) } if (strtoupper(trim($record[1])) != 'EVEN') { - $className = 'GedcomRecordIndi'.ucfirst(strtolower(trim($record[1]))); + $className = '\Gedcom\Record\Indi\\'.ucfirst(strtolower(trim($record[1]))); $even = new $className(); } else { $even = new \Gedcom\Record\Indi\Even(); diff --git a/src/Record.php b/src/Record.php index 6739eb7c..eb6a6924 100644 --- a/src/Record.php +++ b/src/Record.php @@ -22,11 +22,11 @@ public function __call($method, $args) $arr = strtolower(substr($method, 3)); if (!property_exists($this, '_'.$arr) || !is_array($this->{'_'.$arr})) { - throw new \Gedcom\Exception('Unknown '.$this::class.'::'.$arr); + throw new \Exception('Unknown '.$this::class.'::'.$arr); } if (!is_array($args)) { - throw new \Gedcom\Exception('Incorrect arguments to '.$method); + throw new \Exception('Incorrect arguments to '.$method); } if (!isset($args[0])) { @@ -45,11 +45,11 @@ public function __call($method, $args) $arr = strtolower(substr($method, 3)); if (!property_exists($this, '_'.$arr)) { - throw new \Gedcom\Exception('Unknown '.$this::class.'::'.$arr); + throw new \Exception('Unknown '.$this::class.'::'.$arr); } if (!is_array($args)) { - throw new \Gedcom\Exception('Incorrect arguments to '.$method); + throw new \Exception('Incorrect arguments to '.$method); } if (!isset($args[0])) { @@ -70,7 +70,7 @@ public function __call($method, $args) // hotfix getData if ('data' == $arr) { if (!property_exists($this, '_text')) { - throw new \Gedcom\Exception('Unknown '.$this::class.'::'.$arr); + throw new \Exception('Unknown '.$this::class.'::'.$arr); } return $this->{'_text'}; @@ -82,14 +82,14 @@ public function __call($method, $args) return $this->{'_'.$arr}; } else { - throw new \Gedcom\Exception('Unknown method called: '.$method); + throw new \Exception('Unknown method called: '.$method); } } public function __set($var, $val) { // this class does not have any public vars - throw new \Gedcom\Exception('Undefined property '.self::class.'::'.$var); + throw new \Exception('Undefined property '.self::class.'::'.$var); } /** diff --git a/src/Record/Plac/Map.php b/src/Record/Plac/Map.php index 1df6caae..7cc1d231 100644 --- a/src/Record/Plac/Map.php +++ b/src/Record/Plac/Map.php @@ -28,4 +28,29 @@ class Map extends \Gedcom\Record * @var string place_longitude */ protected $long; + + /** + * @param string $lati + * + * @return Map + */ + public function setLati($lati = '') + { + $this->lati = $lati; + + return $this; + } + + /** + * @param string $long + * + * @return Map + */ + public function setLong($long = '') + { + $this->long = $long; + + return $this; + } + } From e79eecabecb49b6174203c3b8a2032ce3ba675ac Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sat, 16 Oct 2021 02:47:08 +0100 Subject: [PATCH 93/99] Fix namespace. --- src/Parser/ObjeRef.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Parser/ObjeRef.php b/src/Parser/ObjeRef.php index 538c6ddc..609b474a 100644 --- a/src/Parser/ObjeRef.php +++ b/src/Parser/ObjeRef.php @@ -47,7 +47,7 @@ public static function parse(\Gedcom\Parser $parser) $obje->setTitl(trim($record[2])); break; case 'FILE': - $obje->setFile(\Parser\ObjeRef\File::parse($parser)); + $obje->setFile(\Gedcom\Parser\ObjeRef\File::parse($parser)); break; default: $parser->logUnhandledRecord(self::class.' @ '.__LINE__); From c022d4ebcb13359c8b013fc55069f0fa2da4a4eb Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Mon, 25 Oct 2021 22:56:26 +0100 Subject: [PATCH 94/99] Update Even.php --- src/Record/Fam/Even.php | 81 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/src/Record/Fam/Even.php b/src/Record/Fam/Even.php index c0cdb614..81027a08 100644 --- a/src/Record/Fam/Even.php +++ b/src/Record/Fam/Even.php @@ -67,4 +67,85 @@ public function addNote($note = []) { $this->_note[] = $note; } + + /** + * @return string + */ + public function getDate() + { + return $this->_date; + } + + /** + * @return \PhpGedcom\Record\Indi\Even\Plac + */ + public function getPlac() + { + return $this->_plac; + } + + /** + * @return array + */ + public function getSour() + { + return $this->_sour; + } + + /** + * @return array + */ + public function getNote() + { + return $this->_note; + } + + /** + * @return array + */ + public function getObje() + { + return $this->obje; + } + + /** + * @return \PhpGedcom\Record\Addr + */ + public function getAddr() + { + return $this->_addr; + } + + /** + * @return string + */ + public function getAge() + { + return $this->_age; + } + + /** + * @return string + */ + public function getAgnc() + { + return $this->_agnc; + } + + /** + * @return string + */ + public function getCaus() + { + return $this->_caus; + } + + /** + * @return string + */ + public function getType() + { + return $this->_type; + } +} } From 2a43365d1aa2597b86c8be367790dd7e28d3bc4b Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Tue, 26 Oct 2021 01:25:29 +0100 Subject: [PATCH 95/99] Update Even.php --- src/Record/Fam/Even.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Record/Fam/Even.php b/src/Record/Fam/Even.php index 81027a08..e7eacf74 100644 --- a/src/Record/Fam/Even.php +++ b/src/Record/Fam/Even.php @@ -148,4 +148,3 @@ public function getType() return $this->_type; } } -} From b4dcf82339434117ceb308cbf68ef6dd40768be1 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Tue, 26 Oct 2021 00:26:02 +0000 Subject: [PATCH 96/99] Apply fixes from StyleCI --- src/Record/Fam/Even.php | 2 +- src/Record/Plac/Map.php | 3 +-- src/Writer.php | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Record/Fam/Even.php b/src/Record/Fam/Even.php index e7eacf74..a69a755b 100644 --- a/src/Record/Fam/Even.php +++ b/src/Record/Fam/Even.php @@ -67,7 +67,7 @@ public function addNote($note = []) { $this->_note[] = $note; } - + /** * @return string */ diff --git a/src/Record/Plac/Map.php b/src/Record/Plac/Map.php index 7cc1d231..7f0c28e4 100644 --- a/src/Record/Plac/Map.php +++ b/src/Record/Plac/Map.php @@ -41,7 +41,7 @@ public function setLati($lati = '') return $this; } - /** + /** * @param string $long * * @return Map @@ -52,5 +52,4 @@ public function setLong($long = '') return $this; } - } diff --git a/src/Writer.php b/src/Writer.php index 72c4f684..f416b995 100644 --- a/src/Writer.php +++ b/src/Writer.php @@ -31,7 +31,7 @@ class Writer protected $_output; /** - * @param $gedcom The GEDCOM object + * @param $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 From 9ba4b7e8ebe4d17e73229e87e12b4e47dff84f52 Mon Sep 17 00:00:00 2001 From: Suleman Hamza Date: Sun, 28 Nov 2021 16:53:45 +0500 Subject: [PATCH 97/99] Undefined bug fix --- src/Record/Fam/Even.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Record/Fam/Even.php b/src/Record/Fam/Even.php index a69a755b..36e88482 100644 --- a/src/Record/Fam/Even.php +++ b/src/Record/Fam/Even.php @@ -105,7 +105,7 @@ public function getNote() */ public function getObje() { - return $this->obje; + return $this->_obje; } /** From 830965eb20bc7350577d7b81e094932d06d08bbc Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Tue, 23 Aug 2022 22:31:54 +0100 Subject: [PATCH 98/99] Update FUNDING.yml --- .github/FUNDING.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 276c3f0c..5d6484ab 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,3 @@ -github: genealogiawebsite +# These are supported funding model platforms + +github: familytree365 From d45a8de7b9debe697a67962c2e0ac92a3de782e5 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Thu, 8 Dec 2022 11:39:34 +0000 Subject: [PATCH 99/99] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index e69c68c9..9f519757 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "familytree365/php-gedcom", + "name": "cgdprojects/php-gedcom", "description": "A GEDCOM file parser (read + write) for PHP 8.0+", "type": "library", "keywords": ["gedcom","parser"],