middlewares/emitter

Middleware to send a PSR-7 response using header() and echo

Package info

github.com/middlewares/emitter

pkg:composer/middlewares/emitter

Statistics

Installs: 20 044

Dependents: 4

Suggesters: 0

Stars: 3

Open Issues: 0

v1.1.0 2025-03-22 10:33 UTC

Requires

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 78180e1c56ae107c2c310bcc1293ba51e6830a4a

httpservermiddlewareemitterpsr-7psr-15

This package is auto-updated.

Last update: 2026-06-26 17:43:27 UTC


README

👁 Latest Version on Packagist
👁 Software License
👁 Testing
👁 Total Downloads

Middleware to send (or emit) a PSR-7 response object using header() and echo and return the sent response. This middleware is intended to go at the top of the middleware stack in order to get the response generated by the inner middlewares and send to the browser.

Requirements

Installation

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

composer require middlewares/emitter

Usage

Dispatcher::run([
 new Middlewares\Emitter(),
 // Here the rest of your middlewares
]);

maxBufferLength

Maximum output buffering size for each iteration. By default is 8192 bytes.

$emitter = (new Middlewares\Emitter())->maxBufferLength(512);

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

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