Wikimedia SlimApp
Common classes to help with creating an application using the Slim micro framework and Twig template engine.
|
Middleware to add headers to the response. More...
Public Member Functions | |
__construct (array $headers=[]) | |
call () | |
Add configured headers to response. | |
Protected Attributes | |
$headers | |
Middleware to add headers to the response.
Allows arbitrary headers to be added to each response.
Wikimedia\Slimapp\HeaderMiddleware::__construct | ( | array | $headers = [] | ) |
array | $headers | Collection of headers to set. Array keys are header names and values are either header values or callables that will return header values. Callables will be passed the current Slim application as the sole argument and must return either a string value to use as the header content or null to cancel setting this header. |