xref: /webtrees/app/Census/CensusOfCanada.php (revision f71a4582d9293d3d97b8d184ace53b195360ebec)
153a83c54Sglarwill<?php
253a83c54Sglarwill
353a83c54Sglarwill/**
453a83c54Sglarwill * webtrees: online genealogy
5d11be702SGreg Roach * Copyright (C) 2023 webtrees development team
653a83c54Sglarwill * This program is free software: you can redistribute it and/or modify
753a83c54Sglarwill * it under the terms of the GNU General Public License as published by
853a83c54Sglarwill * the Free Software Foundation, either version 3 of the License, or
953a83c54Sglarwill * (at your option) any later version.
1053a83c54Sglarwill * This program is distributed in the hope that it will be useful,
1153a83c54Sglarwill * but WITHOUT ANY WARRANTY; without even the implied warranty of
1253a83c54Sglarwill * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1353a83c54Sglarwill * GNU General Public License for more details.
1453a83c54Sglarwill * You should have received a copy of the GNU General Public License
1553a83c54Sglarwill * along with this program. If not, see <https://www.gnu.org/licenses/>.
1653a83c54Sglarwill */
1753a83c54Sglarwill
1853a83c54Sglarwilldeclare(strict_types=1);
1953a83c54Sglarwill
2053a83c54Sglarwillnamespace Fisharebest\Webtrees\Census;
2153a83c54Sglarwill
2253a83c54Sglarwill/**
2353a83c54Sglarwill * Definitions for a census
2453a83c54Sglarwill */
2553a83c54Sglarwillclass CensusOfCanada extends Census implements CensusPlaceInterface
2653a83c54Sglarwill{
2753a83c54Sglarwill    /**
2853a83c54Sglarwill     * All available censuses for this census place.
2953a83c54Sglarwill     *
3009482a55SGreg Roach     * @return array<CensusInterface>
3153a83c54Sglarwill     */
3253a83c54Sglarwill    public function allCensusDates(): array
3353a83c54Sglarwill    {
3453a83c54Sglarwill        return [
35da3cb887Sglarwill            new CensusOfCanada1851(),
36da3cb887Sglarwill            new CensusOfCanada1861(),
37da3cb887Sglarwill            new CensusOfCanada1871(),
3853a83c54Sglarwill            new CensusOfCanada1881(),
3953a83c54Sglarwill            new CensusOfCanada1891(),
4053a83c54Sglarwill            new CensusOfCanada1901(),
41acded470Sglarwill            new CensusOfCanada1911(),
42da3cb887Sglarwill            new CensusOfCanadaPraries1916(),
43acded470Sglarwill            new CensusOfCanada1921(),
44da3cb887Sglarwill            new CensusOfCanadaPraries1926(),
45*f71a4582Smanf0001            new CensusOfCanada1931(),
4653a83c54Sglarwill        ];
4753a83c54Sglarwill    }
4853a83c54Sglarwill
4953a83c54Sglarwill    /**
5053a83c54Sglarwill     * Where did this census occur, in GEDCOM format.
5153a83c54Sglarwill     *
5253a83c54Sglarwill     * @return string
5353a83c54Sglarwill     */
5453a83c54Sglarwill    public function censusPlace(): string
5553a83c54Sglarwill    {
5653a83c54Sglarwill        return 'Canada';
5753a83c54Sglarwill    }
5853a83c54Sglarwill
5953a83c54Sglarwill    /**
6053a83c54Sglarwill     * In which language was this census written.
6153a83c54Sglarwill     *
6253a83c54Sglarwill     * @return string
6353a83c54Sglarwill     */
6453a83c54Sglarwill    public function censusLanguage(): string
6553a83c54Sglarwill    {
6653a83c54Sglarwill        return 'en-US';
6753a83c54Sglarwill    }
6853a83c54Sglarwill}
69