Middleware to display a 503 maintenance page

v1.1.0 2018-08-04 10:41 UTC


Latest Version on Packagist Software License Build Status Quality Score Total Downloads SensioLabs Insight

Middleware to display a 503 maintenance page.



This package is installable and autoloadable via Composer as middlewares/shutdown.

composer require middlewares/shutdown


$dispatcher = new Dispatcher([
	(new Middlewares\Shutdown())->retryAfter(60 * 5)

$response = $dispatcher->dispatch(new ServerRequest());


__construct(Interop\Http\Server\RequestHandlerInterface $handler = null)

The request handler used to generate the response. If it's not provided, the default will be used.

retryAfter(int|DateTimeInterface $duration)

If known, the length of the downtime in seconds or the estimated date and time when the downtime will be complete. More info about why this

Please see CHANGELOG for more information about recent changes and CONTRIBUTING for contributing details.

The MIT License (MIT). Please see LICENSE for more information.