mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
Add 404 page
This commit is contained in:
parent
4548c360f0
commit
e7beafaa8b
6 changed files with 60 additions and 2 deletions
29
controllers/internals/HttpError.php
Normal file
29
controllers/internals/HttpError.php
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?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
|
||||
*/
|
||||
public function _404 ()
|
||||
{
|
||||
http_response_code(404);
|
||||
$this->render('error/404');
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue