summaryrefslogtreecommitdiff
path: root/app/Census/AbstractCensusColumn.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2015-09-25 18:39:16 +0100
committerGreg Roach <fisharebest@gmail.com>2015-09-26 16:20:37 +0100
commitef21b467575956631eb5374fe4f2bfb94e69aaa9 (patch)
treed6d535cdc6ea24cc091300612aa50c8a62d32c9d /app/Census/AbstractCensusColumn.php
parentdb7d25eeb5ba43cdc3662cbee9ceabb8d61c7ab5 (diff)
downloadwebtrees-ef21b467575956631eb5374fe4f2bfb94e69aaa9.tar.gz
webtrees-ef21b467575956631eb5374fe4f2bfb94e69aaa9.tar.bz2
webtrees-ef21b467575956631eb5374fe4f2bfb94e69aaa9.zip
Census definitions
Diffstat (limited to 'app/Census/AbstractCensusColumn.php')
-rw-r--r--app/Census/AbstractCensusColumn.php38
1 files changed, 33 insertions, 5 deletions
diff --git a/app/Census/AbstractCensusColumn.php b/app/Census/AbstractCensusColumn.php
index 6d6710380f..7186ca6ecb 100644
--- a/app/Census/AbstractCensusColumn.php
+++ b/app/Census/AbstractCensusColumn.php
@@ -21,16 +21,35 @@ use Fisharebest\Webtrees\Date;
* Definitions for a census column
*/
class AbstractCensusColumn {
- /** @var CensusInterface - the place where the census took place */
- protected $census;
+ /** @var CensusInterface */
+ private $census;
+
+ /** @var string */
+ private $abbr;
+
+ /** @var string */
+ private $title;
/**
* Create a column for a census
*
- * @param CensusInterface $census
+ * @param CensusInterface $census - The census to which this column forms part.
+ * @param string $abbr - The abbrievated on-screen name "BiC"
+ * @param string $title - The full column heading "Born in the county"
*/
- public function __construct(CensusInterface $census) {
+ public function __construct(CensusInterface $census, $abbr, $title) {
$this->census = $census;
+ $this->abbr = $abbr;
+ $this->title = $title;
+ }
+
+ /**
+ * A short version of the column's name.
+ *
+ * @return string
+ */
+ public function abbreviation() {
+ return $this->abbr;
}
/**
@@ -45,9 +64,18 @@ class AbstractCensusColumn {
/**
* Where did this census occur
*
- * @return Date
+ * @return string
*/
public function place() {
return $this->census->censusPlace();
}
+
+ /**
+ * The full version of the column's name.
+ *
+ * @return string
+ */
+ public function title() {
+ return $this->title;
+ }
}