diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2014-02-18 20:55:43 +0100 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2014-02-18 20:55:43 +0100 |
| commit | e946d300f1c3c0d5c5805cd73c035fde0a4d0de2 (patch) | |
| tree | 09e83b73e9f9a97952badf371a6d50edcc39b55d /src/bdrem/Config.php | |
| parent | 00bd8739a246c157bfc97221156799590e8811af (diff) | |
| download | bdrem-e946d300f1c3c0d5c5805cd73c035fde0a4d0de2.tar.gz bdrem-e946d300f1c3c0d5c5805cd73c035fde0a4d0de2.zip | |
add stopOnEmpty and date parameters
Diffstat (limited to 'src/bdrem/Config.php')
| -rw-r--r-- | src/bdrem/Config.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/bdrem/Config.php b/src/bdrem/Config.php index 04cf888..37c4c64 100644 --- a/src/bdrem/Config.php +++ b/src/bdrem/Config.php @@ -8,6 +8,7 @@ class Config public $daysPrev; public $daysNext; public $locale; + public $stopOnEmpty; public function load() { @@ -40,6 +41,16 @@ class Config return new $class($settings[0]); } + public function setDate($date) + { + if ($date === null) { + $this->date = date('Y-m-d'); + } else { + $dt = new \DateTime($date); + $this->date = $dt->format('Y-m-d'); + } + } + public function get($varname, $default = '') { if (!isset($this->$varname) || $this->$varname == '') { |
