Exemple #1
0
 public function sendResponse(Nette\Application\IResponse $response)
 {
     if ($response instanceof Nette\Application\Responses\TextResponse && $response->source instanceof Nette\Templating\ITemplate) {
         echo Helpers::renderTemplate($response->source);
     } else {
         parent::sendResponse($response);
     }
 }
Exemple #2
0
 public function render()
 {
     if (Helpers::$async) {
         echo Helpers::addComponent($this);
         // output placeholder
     } else {
         echo Flow::run([$this])[0];
         // eager eval
     }
 }