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
|
|
|
*/ |
16
|
|
|
namespace Fisharebest\Webtrees\Census; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* Definitions for a census |
20
|
|
|
*/ |
21
|
|
View Code Duplication |
class CensusOfDeutschland1919 extends CensusOfDeutschland implements CensusInterface { |
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* When did this census occur. |
24
|
|
|
* |
25
|
|
|
* @return string |
26
|
|
|
*/ |
27
|
|
|
public function censusDate() { |
28
|
|
|
return '08 OCT 1919'; |
29
|
|
|
} |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* Where did this census occur, in GEDCOM format. |
33
|
|
|
* |
34
|
|
|
* @return string |
35
|
|
|
*/ |
36
|
|
|
public function censusPlace() { |
37
|
|
|
return 'Mecklenburg-Schwerin, Deutschland'; |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* The columns of the census. |
42
|
|
|
* |
43
|
|
|
* @return CensusColumnInterface[] |
|
|
|
|
44
|
|
|
*/ |
45
|
|
|
public function columns() { |
46
|
|
|
return array( |
47
|
|
|
new CensusColumnNull($this, 'Nummer', 'Laufende Nummer'), |
48
|
|
|
new CensusColumnGivenNames($this, 'Vorname', 'Vorname'), |
49
|
|
|
new CensusColumnSurname($this, 'Familienname', 'Familienname'), |
50
|
|
|
new CensusColumnRelationToHeadGerman($this, 'Stellung im Haushalt', 'Stellung im Haushalt'), |
51
|
|
|
new CensusColumnNull($this, 'männlich', 'Geschlecht männlich'), |
52
|
|
|
new CensusColumnNull($this, 'weiblich', 'Geschlecht weiblich'), |
53
|
|
|
new CensusColumnNull($this, 'Familienstand', 'Familienstand'), |
54
|
|
|
new CensusColumnBirthDay($this, 'Geburts-Tag', 'Geburts-Tag'), |
55
|
|
|
new CensusColumnBirthMonth($this, 'Geburts-Monat', 'Geburts-Monat'), |
56
|
|
|
new CensusColumnBirthYear($this, 'Geburts-Jahr', 'Geburts-Jahr'), |
57
|
|
|
new CensusColumnBirthPlace($this, 'Geburtsort', 'Name des Geburtsorts'), |
58
|
|
|
new CensusColumnNull($this, 'Amt, Kreis, Bezirk', 'Amt, Kreis oder sonstiger obrigkeitlicher Bezirk'), |
59
|
|
|
new CensusColumnNull($this, 'StA', 'Staatsangehörigkeit'), |
60
|
|
|
new CensusColumnNull($this, 'Gemeinde Brotversorgung', 'Gemeinde der Brotversorgung'), |
61
|
|
|
new CensusColumnNull($this, 'Wohn-/ Aufenthaltsort', 'Wohnort bei nur vorübergehend Anwesenden. Aufenthaltsort bei vorübergehend Abwesenden'), |
62
|
|
|
new CensusColumnNull($this, 'Dienstgrad', 'Für Militärpersonen: Angabe des Dienstgrades'), |
63
|
|
|
new CensusColumnNull($this, 'Kriegsgefangener', 'Angabe ob Kriegsgefangener'), |
64
|
|
|
); |
65
|
|
|
} |
66
|
|
|
} |
67
|
|
|
|
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.