use console_commandline for parameter parsing
[bdrem.git] / src / bdrem / Renderer / Console.php
index fc2174f72b73964c6a3c5761880a330dac30a92d..b4ef8a80380efef95493bddb028d5f5b7c0245c1 100644 (file)
@@ -1,8 +1,10 @@
 <?php
 namespace bdrem;
 
 <?php
 namespace bdrem;
 
-class Renderer_Console
+class Renderer_Console extends Renderer
 {
 {
+    protected $httpContentType = 'text/plain; charset=utf-8';
+
     /**
      * Use ANSI color codes for output coloring
      *
     /**
      * Use ANSI color codes for output coloring
      *
@@ -17,6 +19,7 @@ class Renderer_Console
 
     public function render($arEvents)
     {
 
     public function render($arEvents)
     {
+        $this->loadConfig();
         if ($this->ansi) {
             $this->cc = new \Console_Color2();
         }
         if ($this->ansi) {
             $this->cc = new \Console_Color2();
         }
@@ -80,5 +83,12 @@ class Renderer_Console
         }
         return $data;
     }
         }
         return $data;
     }
+
+    protected function loadConfig()
+    {
+        if (isset($this->config->ansi)) {
+            $this->ansi = $this->config->ansi;
+        }
+    }
 }
 ?>
 }
 ?>