Files
Jump/jumpapp/classes/Pages/ErrorPage.php

30 lines
1021 B
PHP
Raw Permalink Normal View History

2022-03-15 21:38:39 +00:00
<?php
2022-07-19 16:38:55 +01:00
/**
* ██ ██ ██ ███ ███ ██████
* ██ ██ ██ ████ ████ ██ ██
* ██ ██ ██ ██ ████ ██ ██████
* ██ ██ ██ ██ ██ ██ ██ ██
* █████ ██████ ██ ██ ██
*
* @author Dale Davies <dale@daledavies.co.uk>
* @copyright Copyright (c) 2022, Dale Davies
* @license MIT
*/
2022-03-15 21:38:39 +00:00
namespace Jump\Pages;
class ErrorPage {
public static function display(\Jump\Config $config, int $httpcode, string $message) {
$mustache = new \Mustache_Engine([
'loader' => new \Mustache_Loader_FilesystemLoader($config->get('templatedir'))
2022-03-15 21:38:39 +00:00
]);
$template = $mustache->loadTemplate('errorpage');
$content = $template->render([
'code' => $httpcode,
'message' => $message,
'wwwurl' => $config->get_wwwurl(),
]);
die($content);
2022-03-15 21:38:39 +00:00
}
2022-03-17 10:34:25 +00:00
}