raspisms/controllers/internals/HttpError.php

38 lines
839 B
PHP
Raw Normal View History

2020-02-20 03:53:15 +01:00
<?php
/*
* This file is part of RaspiSMS.
*
* (c) Pierre-Lin Bonnemaison <plebwebsas@gmail.com>
*
* This source file is subject to the GPL-3.0 license that is bundled
* with this source code in the file LICENSE.
*/
namespace controllers\internals;
/**
* Handler for HTTP errors page
* Not a standard controller as it's not linked to a model in any way.
*/
class HttpError extends \descartes\InternalController
{
/**
* Return 404 error page.
2020-02-20 03:53:15 +01:00
*/
public function _404()
2020-02-20 03:53:15 +01:00
{
http_response_code(404);
$this->render('error/404');
}
2020-06-14 01:39:09 +02:00
/**
* Return unknown error page
*/
public function unknown ()
{
http_response_code(500);
$this->render('error/unknown');
}
2020-02-20 03:53:15 +01:00
}