. */ namespace Fisharebest\Webtrees\Census; use Fisharebest\Webtrees\Date; /** * Definitions for a census column */ class AbstractCensusColumn { /** @var CensusInterface - the place where the census took place */ protected $census; /** * Create a column for a census * * @param CensusInterface $census */ public function __construct(CensusInterface $census) { $this->census = $census; } /** * When did this census occur * * @return Date */ public function date() { return new Date($this->census->censusDate()); } /** * Where did this census occur * * @return Date */ public function place() { return $this->census->censusPlace(); } }