1<?php 2 3/** 4 * webtrees: online genealogy 5 * Copyright (C) 2019 webtrees development team 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18declare(strict_types=1); 19 20namespace Fisharebest\Webtrees\Census; 21 22/** 23 * Definitions for a census 24 */ 25class Census 26{ 27 /** 28 * @param string $locale 29 * 30 * @return CensusPlaceInterface[] 31 */ 32 public static function censusPlaces(string $locale): array 33 { 34 switch ($locale) { 35 case 'cs': 36 return [ 37 new CensusOfCzechRepublic(), 38 new CensusOfSlovakia(), 39 new CensusOfDenmark(), 40 new CensusOfDeutschland(), 41 new CensusOfEngland(), 42 new CensusOfFrance(), 43 new CensusOfScotland(), 44 new CensusOfUnitedStates(), 45 new CensusOfWales(), 46 ]; 47 48 case 'en-AU': 49 case 'en-GB': 50 return [ 51 new CensusOfEngland(), 52 new CensusOfScotland(), 53 new CensusOfWales(), 54 new CensusOfUnitedStates(), 55 new CensusOfCzechRepublic(), 56 new CensusOfDenmark(), 57 new CensusOfDeutschland(), 58 new CensusOfFrance(), 59 new CensusOfSlovakia(), 60 ]; 61 62 case 'en-US': 63 return [ 64 new CensusOfUnitedStates(), 65 new CensusOfCzechRepublic(), 66 new CensusOfDenmark(), 67 new CensusOfDeutschland(), 68 new CensusOfEngland(), 69 new CensusOfFrance(), 70 new CensusOfScotland(), 71 new CensusOfSlovakia(), 72 new CensusOfWales(), 73 ]; 74 75 case 'fr': 76 case 'fr-CA': 77 return [ 78 new CensusOfFrance(), 79 new CensusOfCzechRepublic(), 80 new CensusOfDenmark(), 81 new CensusOfDeutschland(), 82 new CensusOfEngland(), 83 new CensusOfScotland(), 84 new CensusOfSlovakia(), 85 new CensusOfUnitedStates(), 86 new CensusOfWales(), 87 ]; 88 89 case 'da': 90 return [ 91 new CensusOfDenmark(), 92 new CensusOfDeutschland(), 93 new CensusOfCzechRepublic(), 94 new CensusOfEngland(), 95 new CensusOfFrance(), 96 new CensusOfScotland(), 97 new CensusOfSlovakia(), 98 new CensusOfUnitedStates(), 99 new CensusOfWales(), 100 ]; 101 102 case 'de': 103 return [ 104 new CensusOfDeutschland(), 105 new CensusOfCzechRepublic(), 106 new CensusOfDenmark(), 107 new CensusOfEngland(), 108 new CensusOfFrance(), 109 new CensusOfScotland(), 110 new CensusOfSlovakia(), 111 new CensusOfUnitedStates(), 112 new CensusOfWales(), 113 ]; 114 115 default: 116 return [ 117 new CensusOfUnitedStates(), 118 new CensusOfEngland(), 119 new CensusOfScotland(), 120 new CensusOfWales(), 121 new CensusOfDeutschland(), 122 new CensusOfFrance(), 123 new CensusOfCzechRepublic(), 124 new CensusOfSlovakia(), 125 new CensusOfDenmark(), 126 ]; 127 } 128 } 129} 130