org_heigl/clacks-middleware

Implements the Clacks-Header as per http://www.gnuterrypratchett.com

1.2.0 2018-08-15 15:54 UTC

This package is auto-updated.

Last update: 2020-08-05 07:00:48 UTC


README

Build Status

As described in http://www.gnuterrypratchett.com

Installation

composer require org_heigl/clacks-middleware

Usage

use Org_Heigl\Middleware\Clacks\Clacks;

$clacks = new Clacks();
// add $clacks to your middleware-stack

When someone sends a request that already contains an X-Clacks-Overhead header, that header is returned.

And when you want to send a different name, you can set that on the constructor like this:

use Org_Heigl\Middleware\Clacks\Clacks;

$clacks = new Clacks('Jane Doe');
// add $clacks to your middleware-stack