Beispiel #1
0
 function render($render_stream = true)
 {
     if (!isset($this->content)) {
         $method = "dump__{$this->format}";
         $this->variables['body'] = $this->app->{$method}($this->data);
         return parent::render($render_stream);
     }
     return $this->content;
 }
Beispiel #2
0
 function __construct(Request $request, array $variables = array(), $view = null)
 {
     parent::__construct($request);
     $this->variables = $variables;
     $this->view = $view ? $view : "{$request->action}.{$this->format}.twig";
 }