public function prepareAndSendValidResponse($arr) { $response = array('status' => array('code' => self::VALID_RESPONSE_CODE, 'message' => self::VALID_RESPONSE_STATUS), 'response' => $arr); // Log Valid Response $data = array('api_response' => serialize($response), 'upd_process_id' => 'BasePresenter::prepareAndSendValidResponse()'); $this->loggerService->updateLogVisit($this->lastLogItem->id, $data); // Send response $this->sendResponse(new \Nette\Application\Responses\JsonResponse($response)); }
public function shutdown($response) { parent::shutdown($response); if ($this->getHttpRequest()->getUrl()->path != '/healthy-check') { $elapsed = \Nette\Diagnostics\Debugger::timer('global'); // Log Valid Response $data = array('elapsed' => $elapsed, 'upd_process_id' => 'BasePresenter::shutdown()'); if ($this->lastLogItem) { $this->logger->updateLogVisit($this->lastLogItem->id, $data); } } }