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); } }
public function render() { if (Helpers::$async) { echo Helpers::addComponent($this); // output placeholder } else { echo Flow::run([$this])[0]; // eager eval } }