output = []; } /** * Legacy response function. * * The content type is not set to JSON. * Some code may require this error. * * @param int $httpCode * @param string $infoMessage * @param bool $log * * @deprecated */ protected function response($httpCode, $infoMessage = '', $log = true) { http_response_code($httpCode); if ($log) { Przelewy24Logger::addTruncatedLog($infoMessage); } echo filter_var(json_encode($this->output), FILTER_SANITIZE_STRING); exit; } /** * Logs message. * * @param int $infoMessage */ protected function log($infoMessage) { PrestaShopLogger::addLog('Przelewy24Controller - ' . $infoMessage, 1); } }