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 7af4ed0..076533f 100644 (file)
@@ -15,14 +15,19 @@ $source = array(
                 //column name => event title
                 'c_birthday' => 'Birthday'
             ),
                 //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';
 $locale = 'de_DE.UTF-8';
+
+//email settings
+$mail_from = 'birthday@example.org';
+$mail_to = array('a@example.org', 'b@example.org');
 ?>
 ?>
index 7a0fd68..04cf888 100644 (file)
@@ -5,8 +5,8 @@ class Config
 {
     public $source;
     public $date;
 {
     public $source;
     public $date;
-    public $daysBefore;
-    public $daysAfter;
+    public $daysPrev;
+    public $daysNext;
     public $locale;
 
     public function load()
     public $locale;
 
     public function load()
index e4f7168..5fb028b 100644 (file)
@@ -38,7 +38,7 @@ abstract class UserInterface
                 'description' => 'Show NUM days after date',
                 'help_name'   => 'NUM',
                 'action'      => 'StoreInt',
                 'description' => 'Show NUM days after date',
                 'help_name'   => 'NUM',
                 'action'      => 'StoreInt',
-                'default'     => $this->config->daysAfter,
+                'default'     => $this->config->daysNext,
             )
         );
         $parser->addOption(
             )
         );
         $parser->addOption(
@@ -49,7 +49,7 @@ abstract class UserInterface
                 'description' => 'Show NUM days before date',
                 'help_name'   => 'NUM',
                 'action'      => 'StoreInt',
                 'description' => 'Show NUM days before date',
                 'help_name'   => 'NUM',
                 'action'      => 'StoreInt',
-                'default'     => $this->config->daysBefore,
+                'default'     => $this->config->daysPrev,
             )
         );
         $parser->addOption(
             )
         );
         $parser->addOption(