PHPackages                             tomrf/http-emitter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. tomrf/http-emitter

ActiveLibrary[HTTP &amp; Networking](/categories/http)

tomrf/http-emitter
==================

PSR-7 response emitter

0.0.2(3y ago)0382MITPHPPHP &gt;=8.0

Since May 29Pushed 3y ago1 watchersCompare

[ Source](https://github.com/tomrf/http-emitter)[ Packagist](https://packagist.org/packages/tomrf/http-emitter)[ Docs](http://github.com/tomrf/http-emitter)[ RSS](/packages/tomrf-http-emitter/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (10)Versions (3)Used By (2)

http-emitter - PSR-7 response emitter
=====================================

[](#http-emitter---psr-7-response-emitter)

[![PHP Version Require](https://camo.githubusercontent.com/5066dd05677eaff058ac930393c5121d8886d1913ccc4b5f7b17fd113ee084bc/687474703a2f2f706f7365722e707567782e6f72672f746f6d72662f687474702d656d69747465722f726571756972652f7068703f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tomrf/http-emitter) [![Latest Stable Version](https://camo.githubusercontent.com/bcc80f40243b33f1db68ad194d4f23858729ecbc7ba46beae6fcf995b0609feb/687474703a2f2f706f7365722e707567782e6f72672f746f6d72662f687474702d656d69747465722f763f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tomrf/http-emitter) [![License](https://camo.githubusercontent.com/406f1953515c187382ced64ffd731391048431b7e7e7fcbcabeef47b3951161e/687474703a2f2f706f7365722e707567782e6f72672f746f6d72662f687474702d656d69747465722f6c6963656e73653f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tomrf/http-emitter)

Simple PSR-7 response emitter with sensible CLI SAPI output

📔 [Go to documentation](#documentation)

Installation
------------

[](#installation)

Installation via composer:

```
composer require tomrf/http-emitter
```

Usage
-----

[](#usage)

```
$httpEmitter = new HttpEmitter();
$httpEmitter->emit($response); // PSR-7 response object
```

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

This project is released under the MIT License (MIT). See [LICENSE](LICENSE) for more information.

Documentation
-------------

[](#documentation)

- [Tomrf\\HttpEmitter\\HttpEmitter](#-tomrfhttpemitterhttpemitterclass)
    - [emit](#emit)
- [Tomrf\\HttpEmitter\\Sapi\\SapiCliEmitter](#-tomrfhttpemittersapisapicliemitterclass)
    - [emit](#emit)
- [Tomrf\\HttpEmitter\\Sapi\\SapiEmitter](#-tomrfhttpemittersapisapiemitterclass)
    - [emit](#emit)

---

### 📂 Tomrf\\HttpEmitter\\HttpEmitter::class

[](#-tomrfhttpemitterhttpemitterclass)

PSR-7 message response emitter.

#### emit()

[](#emit)

Emits the response using SapiEmitter or SapiCliEmitter based on current PHP SAPI.

```
public function emit(
    Psr\Http\Message\ResponseInterface $response
): void
```

---

### 📂 Tomrf\\HttpEmitter\\Sapi\\SapiCliEmitter::class

[](#-tomrfhttpemittersapisapicliemitterclass)

PSR-7 message response emitter for SAPI cli.

#### emit()

[](#emit-1)

Emits the response to terminal.

```
public function emit(
    Psr\Http\Message\ResponseInterface $response
): void
```

---

### 📂 Tomrf\\HttpEmitter\\Sapi\\SapiEmitter::class

[](#-tomrfhttpemittersapisapiemitterclass)

Generic PSR-7 message response emitter for SAPI.

#### emit()

[](#emit-2)

Emits the response to standard output.

```
public function emit(
    Psr\Http\Message\ResponseInterface $response
): void
```

---

*Generated 2022-06-15T23:05:29+02:00 using 📚[tomrf/readme-gen](https://packagist.org/packages/tomrf/readme-gen)*

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~17 days

Total

2

Last Release

1424d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c2113e52873316a5ad6f705f08f4218b2ee8c4348b0c693bb87bd9359908d23f?d=identicon)[tom@upnode.no](/maintainers/tom@upnode.no)

---

Top Contributors

[![tomrf](https://avatars.githubusercontent.com/u/1669009?v=4)](https://github.com/tomrf "tomrf (6 commits)")

---

Tags

http-emitterhttp-messagephppsr-7psr7-compliantpsr7-responsehttppsr-7http-messagesapiresponse-emittercli-sapi

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tomrf-http-emitter/health.svg)

```
[![Health](https://phpackages.com/badges/tomrf-http-emitter/health.svg)](https://phpackages.com/packages/tomrf-http-emitter)
```

###  Alternatives

[symfony/psr-http-message-bridge

PSR HTTP message bridge

1.3k296.6M804](/packages/symfony-psr-http-message-bridge)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

86874.0k94](/packages/httpsoft-http-message)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[art4/requests-psr18-adapter

Use WordPress/Requests as a PSR-18 HTTP client

153.3k](/packages/art4-requests-psr18-adapter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
