17e128bbfSGreg Roach<?php 27e128bbfSGreg Roach 37e128bbfSGreg Roach/** 47e128bbfSGreg Roach * webtrees: online genealogy 5*d11be702SGreg Roach * Copyright (C) 2023 webtrees development team 67e128bbfSGreg Roach * This program is free software: you can redistribute it and/or modify 77e128bbfSGreg Roach * it under the terms of the GNU General Public License as published by 87e128bbfSGreg Roach * the Free Software Foundation, either version 3 of the License, or 97e128bbfSGreg Roach * (at your option) any later version. 107e128bbfSGreg Roach * This program is distributed in the hope that it will be useful, 117e128bbfSGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 127e128bbfSGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 137e128bbfSGreg Roach * GNU General Public License for more details. 147e128bbfSGreg Roach * You should have received a copy of the GNU General Public License 157e128bbfSGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>. 167e128bbfSGreg Roach */ 177e128bbfSGreg Roach 187e128bbfSGreg Roachdeclare(strict_types=1); 197e128bbfSGreg Roach 207e128bbfSGreg Roachnamespace Fisharebest\Webtrees\Contracts; 217e128bbfSGreg Roach 227e128bbfSGreg Roachuse Fisharebest\Webtrees\SurnameTradition\SurnameTraditionInterface; 237e128bbfSGreg Roach 247e128bbfSGreg Roach/** 257e128bbfSGreg Roach * Create a surname tradition. 267e128bbfSGreg Roach */ 277e128bbfSGreg Roachinterface SurnameTraditionFactoryInterface 287e128bbfSGreg Roach{ 297e128bbfSGreg Roach public const PATERNAL = 'paternal'; 307e128bbfSGreg Roach public const PATRILINEAL = 'patrilineal'; 317e128bbfSGreg Roach public const MATRILINEAL = 'matrilineal'; 327e128bbfSGreg Roach public const PORTUGUESE = 'portuguese'; 337e128bbfSGreg Roach public const SPANISH = 'spanish'; 347e128bbfSGreg Roach public const POLISH = 'polish'; 357e128bbfSGreg Roach public const LITHUANIAN = 'lithuanian'; 367e128bbfSGreg Roach public const ICELANDIC = 'icelandic'; 377e128bbfSGreg Roach public const DEFAULT = ''; 387e128bbfSGreg Roach 397e128bbfSGreg Roach /** 407e128bbfSGreg Roach * A list of supported surname traditions and their names. 417e128bbfSGreg Roach * 427e128bbfSGreg Roach * @return array<string,string> 437e128bbfSGreg Roach */ 447e128bbfSGreg Roach public function list(): array; 457e128bbfSGreg Roach 467e128bbfSGreg Roach /** 477e128bbfSGreg Roach * Create a named surname tradition. 487e128bbfSGreg Roach * 497e128bbfSGreg Roach * @param string $name 507e128bbfSGreg Roach * 517e128bbfSGreg Roach * @return SurnameTraditionInterface 527e128bbfSGreg Roach */ 537e128bbfSGreg Roach public function make(string $name): SurnameTraditionInterface; 547e128bbfSGreg Roach 557e128bbfSGreg Roach /** 567e128bbfSGreg Roach * @param string $name 577e128bbfSGreg Roach * @param SurnameTraditionInterface $surname_tradition 587e128bbfSGreg Roach * 597e128bbfSGreg Roach * @return void 607e128bbfSGreg Roach */ 617e128bbfSGreg Roach public function register(string $name, SurnameTraditionInterface $surname_tradition): void; 627e128bbfSGreg Roach} 63