update configuration example file, fix variable names
authorChristian Weiske <cweiske@cweiske.de>
Thu, 13 Feb 2014 17:00:39 +0000 (18:00 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 13 Feb 2014 17:00:39 +0000 (18:00 +0100)
data/bdrem.config.php.dist
src/bdrem/Config.php
src/bdrem/UserInterface.php

index 7af4ed0dc4f3e5907a311f29e3427a4df2f3b0dd..076533f2292e52a11881fee1fd513b4efe3a6d5b 100644 (file)
@@ -15,14 +15,19 @@ $source = array(
                 //column name => event title
                 'c_birthday' => 'Birthday'
             ),
-            //column with name
-            'name' => 'c_name'
+            //column with name, or array with column names
+            'name' => array('c_name'),
+            //sprintf-compatible name formatting instruction
+            'nameFormat' => '%s',
         )
     )
 );
 
-
-$daysBefore = 3;
-$daysAfter = 14;
+$daysPrev = 3;
+$daysNext = 14;
 $locale = 'de_DE.UTF-8';
+
+//email settings
+$mail_from = 'birthday@example.org';
+$mail_to = array('a@example.org', 'b@example.org');
 ?>
index 7a0fd6864808b5cbb64aa5df21a6cd317c667192..04cf8882a3d3e23a6e313d59413d5c6c037cbcbf 100644 (file)
@@ -5,8 +5,8 @@ class Config
 {
     public $source;
     public $date;
-    public $daysBefore;
-    public $daysAfter;
+    public $daysPrev;
+    public $daysNext;
     public $locale;
 
     public function load()
index e4f7168f3b1f2c5b721a2b7126971b15ccb108d1..5fb028b4a964221f884fbd7bd972b6408849f7b3 100644 (file)
@@ -38,7 +38,7 @@ abstract class UserInterface
                 'description' => 'Show NUM days after date',
                 'help_name'   => 'NUM',
                 'action'      => 'StoreInt',
-                'default'     => $this->config->daysAfter,
+                'default'     => $this->config->daysNext,
             )
         );
         $parser->addOption(
@@ -49,7 +49,7 @@ abstract class UserInterface
                 'description' => 'Show NUM days before date',
                 'help_name'   => 'NUM',
                 'action'      => 'StoreInt',
-                'default'     => $this->config->daysBefore,
+                'default'     => $this->config->daysPrev,
             )
         );
         $parser->addOption(