xref: /webtrees/app/Census/CensusOfCanada.php (revision 53a83c54b8b942be5ba4e73683d0401e77cc44e4)
1*53a83c54Sglarwill<?php
2*53a83c54Sglarwill
3*53a83c54Sglarwill/**
4*53a83c54Sglarwill * webtrees: online genealogy
5*53a83c54Sglarwill * Copyright (C) 2021 webtrees development team
6*53a83c54Sglarwill * This program is free software: you can redistribute it and/or modify
7*53a83c54Sglarwill * it under the terms of the GNU General Public License as published by
8*53a83c54Sglarwill * the Free Software Foundation, either version 3 of the License, or
9*53a83c54Sglarwill * (at your option) any later version.
10*53a83c54Sglarwill * This program is distributed in the hope that it will be useful,
11*53a83c54Sglarwill * but WITHOUT ANY WARRANTY; without even the implied warranty of
12*53a83c54Sglarwill * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13*53a83c54Sglarwill * GNU General Public License for more details.
14*53a83c54Sglarwill * You should have received a copy of the GNU General Public License
15*53a83c54Sglarwill * along with this program. If not, see <https://www.gnu.org/licenses/>.
16*53a83c54Sglarwill */
17*53a83c54Sglarwill
18*53a83c54Sglarwilldeclare(strict_types=1);
19*53a83c54Sglarwill
20*53a83c54Sglarwillnamespace Fisharebest\Webtrees\Census;
21*53a83c54Sglarwill
22*53a83c54Sglarwill/**
23*53a83c54Sglarwill * Definitions for a census
24*53a83c54Sglarwill */
25*53a83c54Sglarwillclass CensusOfCanada extends Census implements CensusPlaceInterface
26*53a83c54Sglarwill{
27*53a83c54Sglarwill    /**
28*53a83c54Sglarwill     * All available censuses for this census place.
29*53a83c54Sglarwill     *
30*53a83c54Sglarwill     * @return CensusInterface[]
31*53a83c54Sglarwill     */
32*53a83c54Sglarwill    public function allCensusDates(): array
33*53a83c54Sglarwill    {
34*53a83c54Sglarwill        return [
35*53a83c54Sglarwill            new CensusOfCanada1881(),
36*53a83c54Sglarwill            new CensusOfCanada1891(),
37*53a83c54Sglarwill            new CensusOfCanada1901(),
38*53a83c54Sglarwill        ];
39*53a83c54Sglarwill    }
40*53a83c54Sglarwill
41*53a83c54Sglarwill    /**
42*53a83c54Sglarwill     * Where did this census occur, in GEDCOM format.
43*53a83c54Sglarwill     *
44*53a83c54Sglarwill     * @return string
45*53a83c54Sglarwill     */
46*53a83c54Sglarwill    public function censusPlace(): string
47*53a83c54Sglarwill    {
48*53a83c54Sglarwill        return 'Canada';
49*53a83c54Sglarwill    }
50*53a83c54Sglarwill
51*53a83c54Sglarwill    /**
52*53a83c54Sglarwill     * In which language was this census written.
53*53a83c54Sglarwill     *
54*53a83c54Sglarwill     * @return string
55*53a83c54Sglarwill     */
56*53a83c54Sglarwill    public function censusLanguage(): string
57*53a83c54Sglarwill    {
58*53a83c54Sglarwill        return 'en-US';
59*53a83c54Sglarwill    }
60*53a83c54Sglarwill}
61