+ /**
+ * This function adds the content and a content-teype HTTP header to the output.
+ * After finishing the process is getting killed.
+ *
+ * @param string $content
+ * @param [type] $responce
+ * @param string|null $content_type
+ * @return void
+ */
+ public static function httpExit(string $content, string $responce = Response::TYPE_HTML, ?string $content_type = null) {
+ DI::apiResponse()->setType($responce, $content_type);
+ DI::apiResponse()->addContent($content);
+ DI::page()->exit(DI::apiResponse()->generate());
+
+ self::exit();