Exemplo n.º 1
0
 /**
  * HTML renderer decorator
  *
  * @param SGL2_Response $data
  * @param string $templateEngine
  */
 public function __construct($response, $templateEngine = null)
 {
     $registry = SGL2_Registry::getInstance();
     //  prepare renderer class
     if (is_null($templateEngine)) {
         $templateEngine = $registry->getConfig()->site->templateEngine;
     }
     $templateEngine = ucfirst($templateEngine);
     $rendererClass = 'SGL2_View_Renderer_Html_' . $templateEngine;
     parent::__construct($response, new $rendererClass());
 }
Exemplo n.º 2
0
 public function __construct(SGL2_Response $response, $templateEngine = null)
 {
     $rendererClass = 'SGL2_Renderer_Text';
     parent::__construct($response, new $rendererClass());
 }