xref: /webtrees/app/Census/CensusOfDenmark1801.php (revision 4ccf2a72a960de8375eee0787bc02e7d6dc065eb)
1*4ccf2a72SGreg Roach<?php
2*4ccf2a72SGreg Roach/**
3*4ccf2a72SGreg Roach * webtrees: online genealogy
4*4ccf2a72SGreg Roach * Copyright (C) 2015 webtrees development team
5*4ccf2a72SGreg Roach * This program is free software: you can redistribute it and/or modify
6*4ccf2a72SGreg Roach * it under the terms of the GNU General Public License as published by
7*4ccf2a72SGreg Roach * the Free Software Foundation, either version 3 of the License, or
8*4ccf2a72SGreg Roach * (at your option) any later version.
9*4ccf2a72SGreg Roach * This program is distributed in the hope that it will be useful,
10*4ccf2a72SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
11*4ccf2a72SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12*4ccf2a72SGreg Roach * GNU General Public License for more details.
13*4ccf2a72SGreg Roach * You should have received a copy of the GNU General Public License
14*4ccf2a72SGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>.
15*4ccf2a72SGreg Roach */
16*4ccf2a72SGreg Roachnamespace Fisharebest\Webtrees\Census;
17*4ccf2a72SGreg Roach
18*4ccf2a72SGreg Roachuse Fisharebest\Webtrees\Date;
19*4ccf2a72SGreg Roachuse Fisharebest\Webtrees\Individual;
20*4ccf2a72SGreg Roachuse Fisharebest\Webtrees\Place;
21*4ccf2a72SGreg Roach
22*4ccf2a72SGreg Roach/**
23*4ccf2a72SGreg Roach * Definitions for a census
24*4ccf2a72SGreg Roach */
25*4ccf2a72SGreg Roachclass CensusOfDenmark1801 extends CensusOfDenmark implements CensusInterface {
26*4ccf2a72SGreg Roach	/**
27*4ccf2a72SGreg Roach	 * When did this census occur.
28*4ccf2a72SGreg Roach	 *
29*4ccf2a72SGreg Roach	 * @return string
30*4ccf2a72SGreg Roach	 */
31*4ccf2a72SGreg Roach	public function censusDate() {
32*4ccf2a72SGreg Roach		return '01 FEB 1801';
33*4ccf2a72SGreg Roach	}
34*4ccf2a72SGreg Roach
35*4ccf2a72SGreg Roach	/**
36*4ccf2a72SGreg Roach	 * The columns of the census.
37*4ccf2a72SGreg Roach	 *
38*4ccf2a72SGreg Roach	 * @param Individual $individual
39*4ccf2a72SGreg Roach	 *
40*4ccf2a72SGreg Roach	 * @return CensusColumnInterface[]
41*4ccf2a72SGreg Roach	 */
42*4ccf2a72SGreg Roach	public function columns(Individual $individual) {
43*4ccf2a72SGreg Roach		$place = new Place($this->censusPlace(), $individual->getTree());
44*4ccf2a72SGreg Roach		$date  = new Date($this->censusDate());
45*4ccf2a72SGreg Roach
46*4ccf2a72SGreg Roach		return array(
47*4ccf2a72SGreg Roach			new CensusColumnFullName($individual, $place, $date),
48*4ccf2a72SGreg Roach			new CensusColumnSexMF($individual, $place, $date),
49*4ccf2a72SGreg Roach			new CensusColumnOccupation($individual, $place, $date),
50*4ccf2a72SGreg Roach		);
51*4ccf2a72SGreg Roach	}
52*4ccf2a72SGreg Roach}
53