21 lines
893 B
PHP
21 lines
893 B
PHP
<?php
|
|
namespace Framework\Middleware;
|
|
|
|
use GuzzleHttp\Psr7\Response;
|
|
use Psr\Http\Message\ServerRequestInterface;
|
|
|
|
class NotFoundMiddleware {
|
|
|
|
public function __invoke(ServerRequestInterface $request, callable $next)
|
|
{
|
|
return new Response(404, [], '<html><head><link rel="stylesheet"
|
|
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css"></head>
|
|
<div style="padding: 5rem; height:100%; width:100%;
|
|
background:url(\'/images/bildreich_1275.jpg\') no-repeat;background-size: cover;">
|
|
<div class="container" style="padding: 2rem;margin: 5rem 2rem;width:15rem;height:14rem;background-color: #c9c9c9;">
|
|
<h4>Erreur 404</h4><br />Cette url n\'existe pas.<br /><br />
|
|
<a class="btn btn-primary btn-md" href="/" role="button">
|
|
Retour à l\'accueil</a></div></div></html>');
|
|
}
|
|
}
|