proxitok/app/Helpers/ErrorHandler.php
2023-09-27 13:24:27 +02:00

18 lines
494 B
PHP

<?php
namespace App\Helpers;
use App\Models\ErrorTemplate;
use TikScraper\Models\Meta;
class ErrorHandler {
public static function showMeta(Meta $meta) {
http_response_code($meta->httpCode);
Wrappers::latte('error', new ErrorTemplate($meta->httpCode, $meta->proxitokMsg, $meta->proxitokCode));
}
public static function showText(int $code, string $msg) {
http_response_code($code);
Wrappers::latte('error', new ErrorTemplate($code, $msg));
}
}