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