10f471f91SGreg Roach<?php 20f471f91SGreg Roach/** 30f471f91SGreg Roach * webtrees: online genealogy 48fcd0d32SGreg Roach * Copyright (C) 2019 webtrees development team 50f471f91SGreg Roach * This program is free software: you can redistribute it and/or modify 60f471f91SGreg Roach * it under the terms of the GNU General Public License as published by 70f471f91SGreg Roach * the Free Software Foundation, either version 3 of the License, or 80f471f91SGreg Roach * (at your option) any later version. 90f471f91SGreg Roach * This program is distributed in the hope that it will be useful, 100f471f91SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 110f471f91SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 120f471f91SGreg Roach * GNU General Public License for more details. 130f471f91SGreg Roach * You should have received a copy of the GNU General Public License 140f471f91SGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>. 150f471f91SGreg Roach */ 16e7f56f2aSGreg Roachdeclare(strict_types=1); 17e7f56f2aSGreg Roach 180f471f91SGreg Roachnamespace Fisharebest\Webtrees; 190f471f91SGreg Roach 200f471f91SGreg Roach/** 210f471f91SGreg Roach * GEDCOM 5.5.1 specification 220f471f91SGreg Roach */ 23c1010edaSGreg Roachclass Gedcom 24c1010edaSGreg Roach{ 250f471f91SGreg Roach // Use MSDOS style line endings, for maximum compatibility. 26*16d6367aSGreg Roach public const EOL = "\r\n"; 270f471f91SGreg Roach 280f471f91SGreg Roach // 255 less the EOL character. 29*16d6367aSGreg Roach public const LINE_LENGTH = 253; 308d0ebef0SGreg Roach 318d0ebef0SGreg Roach // Gedcom tags which indicate the start of life. 32*16d6367aSGreg Roach public const BIRTH_EVENTS = ['BIRT', 'CHR', 'BAPM', 'ADOP']; 338d0ebef0SGreg Roach 348d0ebef0SGreg Roach // Gedcom tags which indicate the end of life. 35*16d6367aSGreg Roach public const DEATH_EVENTS = ['DEAT', 'BURI', 'CREM']; 368d0ebef0SGreg Roach 378d0ebef0SGreg Roach // Gedcom tags which indicate the start of a relationship. 38*16d6367aSGreg Roach public const MARRIAGE_EVENTS = ['MARR', '_NMR']; 398d0ebef0SGreg Roach 408d0ebef0SGreg Roach // Gedcom tags which indicate the end of a relationship. 41*16d6367aSGreg Roach public const DIVORCE_EVENTS = ['DIV', 'ANUL', '_SEPR']; 428d0ebef0SGreg Roach 438d0ebef0SGreg Roach // Regular expression to match a GEDCOM tag. 44*16d6367aSGreg Roach public const REGEX_TAG = '[_A-Z][_A-Z0-9]*'; 458d0ebef0SGreg Roach 468d0ebef0SGreg Roach // Regular expression to match a GEDCOM XREF. 47*16d6367aSGreg Roach public const REGEX_XREF = '[A-Za-z0-9:_-]+'; 488d0ebef0SGreg Roach 498d0ebef0SGreg Roach // UTF-8 encoded files may begin with an optional byte-order-mark (U+FEFF). 50*16d6367aSGreg Roach public const UTF8_BOM = "\xEF\xBB\xBF"; 510f471f91SGreg Roach} 52