xref: /webtrees/app/SurnameTradition/SurnameTraditionInterface.php (revision 1062a1429914c995339f502856821457aa975a5a)
1323788f4SGreg Roach<?php
2323788f4SGreg Roach/**
3323788f4SGreg Roach * webtrees: online genealogy
4*1062a142SGreg Roach * Copyright (C) 2018 webtrees development team
5323788f4SGreg Roach * This program is free software: you can redistribute it and/or modify
6323788f4SGreg Roach * it under the terms of the GNU General Public License as published by
7323788f4SGreg Roach * the Free Software Foundation, either version 3 of the License, or
8323788f4SGreg Roach * (at your option) any later version.
9323788f4SGreg Roach * This program is distributed in the hope that it will be useful,
10323788f4SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
11323788f4SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12323788f4SGreg Roach * GNU General Public License for more details.
13323788f4SGreg Roach * You should have received a copy of the GNU General Public License
14323788f4SGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>.
15323788f4SGreg Roach */
16323788f4SGreg Roachnamespace Fisharebest\Webtrees\SurnameTradition;
17323788f4SGreg Roach
18323788f4SGreg Roach/**
19323788f4SGreg Roach * Various cultures have different traditions for the use of surnames within families.
20323788f4SGreg Roach * By providing defaults for new individuals, we can speed up data entry and reduce errors.
21323788f4SGreg Roach */
22323788f4SGreg Roachinterface SurnameTraditionInterface {
23323788f4SGreg Roach	/**
24323788f4SGreg Roach	 * Does this surname tradition change surname at marriage?
25323788f4SGreg Roach	 *
26323788f4SGreg Roach	 * @return bool
27323788f4SGreg Roach	 */
28323788f4SGreg Roach	public function hasMarriedNames();
29323788f4SGreg Roach
30323788f4SGreg Roach	/**
31c1ec7145SGreg Roach	 * Does this surname tradition use surnames?
32c1ec7145SGreg Roach	 *
33c1ec7145SGreg Roach	 * @return bool
34c1ec7145SGreg Roach	 */
35c1ec7145SGreg Roach	public function hasSurnames();
36c1ec7145SGreg Roach
37c1ec7145SGreg Roach	/**
38323788f4SGreg Roach	 * What names are given to a new child
39323788f4SGreg Roach	 *
40323788f4SGreg Roach	 * @param string $father_name A GEDCOM NAME
41323788f4SGreg Roach	 * @param string $mother_name A GEDCOM NAME
42323788f4SGreg Roach	 * @param string $child_sex   M, F or U
43323788f4SGreg Roach	 *
44323788f4SGreg Roach	 * @return string[] Associative array of GEDCOM name parts (SURN, _MARNM, etc.)
45323788f4SGreg Roach	 */
46323788f4SGreg Roach	public function newChildNames($father_name, $mother_name, $child_sex);
47323788f4SGreg Roach
48323788f4SGreg Roach	/**
49323788f4SGreg Roach	 * What names are given to a new parent
50323788f4SGreg Roach	 *
51323788f4SGreg Roach	 * @param string $child_name A GEDCOM NAME
52323788f4SGreg Roach	 * @param string $parent_sex M, F or U
53323788f4SGreg Roach	 *
54323788f4SGreg Roach	 * @return string[] Associative array of GEDCOM name parts (SURN, _MARNM, etc.)
55323788f4SGreg Roach	 */
56323788f4SGreg Roach	public function newParentNames($child_name, $parent_sex);
57323788f4SGreg Roach
58323788f4SGreg Roach	/**
59323788f4SGreg Roach	 * What names are given to a new spouse
60323788f4SGreg Roach	 *
61323788f4SGreg Roach	 * @param string $spouse_name A GEDCOM NAME
62323788f4SGreg Roach	 * @param string $spouse_sex  M, F or U
63323788f4SGreg Roach	 *
64323788f4SGreg Roach	 * @return string[] Associative array of GEDCOM name parts (SURN, _MARNM, etc.)
65323788f4SGreg Roach	 */
66323788f4SGreg Roach	public function newSpouseNames($spouse_name, $spouse_sex);
67323788f4SGreg Roach}
68