1<?php 2 3/** 4 * webtrees: online genealogy 5 * Copyright (C) 2019 webtrees development team 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 */ 17declare(strict_types=1); 18 19namespace Fisharebest\Webtrees\SurnameTradition; 20 21/** 22 * Various cultures have different traditions for the use of surnames within families. 23 * By providing defaults for new individuals, we can speed up data entry and reduce errors. 24 */ 25interface SurnameTraditionInterface 26{ 27 /** 28 * Does this surname tradition change surname at marriage? 29 * 30 * @return bool 31 */ 32 public function hasMarriedNames(): bool; 33 34 /** 35 * Does this surname tradition use surnames? 36 * 37 * @return bool 38 */ 39 public function hasSurnames(): bool; 40 41 /** 42 * What names are given to a new child 43 * 44 * @param string $father_name A GEDCOM NAME 45 * @param string $mother_name A GEDCOM NAME 46 * @param string $child_sex M, F or U 47 * 48 * @return string[] Associative array of GEDCOM name parts (SURN, _MARNM, etc.) 49 */ 50 public function newChildNames(string $father_name, string $mother_name, string $child_sex): array; 51 52 /** 53 * What names are given to a new parent 54 * 55 * @param string $child_name A GEDCOM NAME 56 * @param string $parent_sex M, F or U 57 * 58 * @return string[] Associative array of GEDCOM name parts (SURN, _MARNM, etc.) 59 */ 60 public function newParentNames(string $child_name, string $parent_sex): array; 61 62 /** 63 * What names are given to a new spouse 64 * 65 * @param string $spouse_name A GEDCOM NAME 66 * @param string $spouse_sex M, F or U 67 * 68 * @return string[] Associative array of GEDCOM name parts (SURN, _MARNM, etc.) 69 */ 70 public function newSpouseNames(string $spouse_name, string $spouse_sex): array; 71} 72