public function send(Nette\Http\IRequest $httpRequest, Nette\Http\IResponse $httpResponse) { ob_start(); $this->response->send($httpRequest, $httpResponse); $html = ob_get_contents(); ob_end_clean(); echo $this->tidy->process($html); }
/** * Create TextApiResponse * This class only wrap JsonResponse from Nette and add possibility * to setup response code and automaticaly set content type * * @param integer $code * @param mixed $data */ public function __construct($code, $data) { parent::__construct($data); $this->code = $code; }