html renderer, console renderer uses pear's Console_Table
[bdrem.git] / src / bdrem / Web.php
1 <?php
2 namespace bdrem;
3
4 class Web
5 {
6     public function run()
7     {
8         $cfg = new Config();
9         $cfg->load();
10         setlocale(LC_TIME, $cfg->locale);
11         $source = $cfg->loadSource();
12
13         $arEvents = $source->getEvents(
14             date('Y-m-d'), $cfg->daysBefore, $cfg->daysAfter
15         );
16         usort($arEvents, '\\bdrem\\Event::compare');
17
18         $r = new Renderer_Html();
19         echo $r->render($arEvents);
20     }
21 }
22 ?>