introduce UserInterface class, add simple parameter support for web and cli
[bdrem.git] / src / bdrem / Web.php
1 <?php
2 namespace bdrem;
3
4 class Web extends UserInterface
5 {
6     protected function render($arEvents)
7     {
8         $r = new Renderer_Html();
9         echo $r->render($arEvents);
10     }
11
12     protected function loadParameters($cfg)
13     {
14         if (isset($_GET['daysBefore'])) {
15             $cfg->daysBefore = (int) $_GET['daysBefore'];
16         }
17         if (isset($_GET['daysAfter'])) {
18             $cfg->daysAfter = (int) $_GET['daysAfter'];
19         }
20     }
21 }
22 ?>