git.cweiske.de
/
bdrem.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add stopOnEmpty and date parameters
[bdrem.git]
/
src
/
bdrem
/
Config.php
diff --git
a/src/bdrem/Config.php
b/src/bdrem/Config.php
index 04cf8882a3d3e23a6e313d59413d5c6c037cbcbf..37c4c641a3d512aea937dba10e8ecd44ae62fc8f 100644
(file)
--- a/
src/bdrem/Config.php
+++ b/
src/bdrem/Config.php
@@
-8,6
+8,7
@@
class Config
public $daysPrev;
public $daysNext;
public $locale;
public $daysPrev;
public $daysNext;
public $locale;
+ public $stopOnEmpty;
public function load()
{
public function load()
{
@@
-40,6
+41,16
@@
class Config
return new $class($settings[0]);
}
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 == '') {
public function get($varname, $default = '')
{
if (!isset($this->$varname) || $this->$varname == '') {