1323788f4SGreg Roach<?php 23976b470SGreg Roach 3323788f4SGreg Roach/** 4323788f4SGreg Roach * webtrees: online genealogy 5d11be702SGreg Roach * Copyright (C) 2023 webtrees development team 6323788f4SGreg Roach * This program is free software: you can redistribute it and/or modify 7323788f4SGreg Roach * it under the terms of the GNU General Public License as published by 8323788f4SGreg Roach * the Free Software Foundation, either version 3 of the License, or 9323788f4SGreg Roach * (at your option) any later version. 10323788f4SGreg Roach * This program is distributed in the hope that it will be useful, 11323788f4SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 12323788f4SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13323788f4SGreg Roach * GNU General Public License for more details. 14323788f4SGreg Roach * You should have received a copy of the GNU General Public License 1589f7189bSGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>. 16323788f4SGreg Roach */ 17fcfa147eSGreg Roach 18e7f56f2aSGreg Roachdeclare(strict_types=1); 19e7f56f2aSGreg Roach 20323788f4SGreg Roachnamespace Fisharebest\Webtrees\SurnameTradition; 21323788f4SGreg Roach 22cb7a42eaSGreg Roachuse Fisharebest\Webtrees\Individual; 23cb7a42eaSGreg Roach 24323788f4SGreg Roach/** 25323788f4SGreg Roach * Various cultures have different traditions for the use of surnames within families. 26323788f4SGreg Roach * By providing defaults for new individuals, we can speed up data entry and reduce errors. 27323788f4SGreg Roach */ 28c1010edaSGreg Roachinterface SurnameTraditionInterface 29c1010edaSGreg Roach{ 30323788f4SGreg Roach /** 317e128bbfSGreg Roach * The name of this surname tradition 327e128bbfSGreg Roach * 337e128bbfSGreg Roach * @return string 347e128bbfSGreg Roach */ 357e128bbfSGreg Roach public function name(): string; 367e128bbfSGreg Roach 377e128bbfSGreg Roach /** 387e128bbfSGreg Roach * A short description of this surname tradition 397e128bbfSGreg Roach * 407e128bbfSGreg Roach * @return string 417e128bbfSGreg Roach */ 427e128bbfSGreg Roach public function description(): string; 437e128bbfSGreg Roach 447e128bbfSGreg Roach /** 45a171b6a5SGreg Roach * A default/empty name 46323788f4SGreg Roach * 47a171b6a5SGreg Roach * @return string 48323788f4SGreg Roach */ 49a171b6a5SGreg Roach public function defaultName(): string; 50c1ec7145SGreg Roach 51c1ec7145SGreg Roach /** 52cb7a42eaSGreg Roach * What name is given to a new child 53323788f4SGreg Roach * 54cb7a42eaSGreg Roach * @param Individual|null $father 55cb7a42eaSGreg Roach * @param Individual|null $mother 56cb7a42eaSGreg Roach * @param string $sex 57323788f4SGreg Roach * 5801ffdfd0SGreg Roach * @return array<int,string> 59323788f4SGreg Roach */ 60*1ff45046SGreg Roach public function newChildNames(Individual|null $father, Individual|null $mother, string $sex): array; 61323788f4SGreg Roach 62323788f4SGreg Roach /** 63cb7a42eaSGreg Roach * What name is given to a new parent 64323788f4SGreg Roach * 65cb7a42eaSGreg Roach * @param Individual $child 66cb7a42eaSGreg Roach * @param string $sex 67323788f4SGreg Roach * 6801ffdfd0SGreg Roach * @return array<int,string> 69323788f4SGreg Roach */ 70cb7a42eaSGreg Roach public function newParentNames(Individual $child, string $sex): array; 71323788f4SGreg Roach 72323788f4SGreg Roach /** 73323788f4SGreg Roach * What names are given to a new spouse 74323788f4SGreg Roach * 75cb7a42eaSGreg Roach * @param Individual $spouse 76cb7a42eaSGreg Roach * @param string $sex 77323788f4SGreg Roach * 7801ffdfd0SGreg Roach * @return array<int,string> 79323788f4SGreg Roach */ 80cb7a42eaSGreg Roach public function newSpouseNames(Individual $spouse, string $sex): array; 81323788f4SGreg Roach} 82