aboutsummaryrefslogtreecommitdiff
path: root/src/bdrem/Config.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/bdrem/Config.php')
-rw-r--r--src/bdrem/Config.php11
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 == '') {