PHPackages                             neo-rainboy/socket.io-php-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. neo-rainboy/socket.io-php-emitter

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

neo-rainboy/socket.io-php-emitter
=================================

PHP socket.io event emitter

0.2.0(3y ago)03MITPHPPHP &gt;=5.6.4

Since Dec 9Pushed 3y agoCompare

[ Source](https://github.com/neo-rainboy/socket.io-php-emitter)[ Packagist](https://packagist.org/packages/neo-rainboy/socket.io-php-emitter)[ RSS](/packages/neo-rainboy-socketio-php-emitter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

shakahl/socket.io-php-emitter
=============================

[](#shakahlsocketio-php-emitter)

A PHP implementation of node.js socket.io-emitter (0.1.0).

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

[](#installation)

composer require shakahl/socket.io-php-emitter

Usage
-----

[](#usage)

### Emit payload message

[](#emit-payload-message)

```
use Predis;
use Shakahl\SocketIO;
...

$client = new Predis\Client();

(new Emitter($client))
    ->of('namespace')->emit('event', 'payload message');
```

### Flags

[](#flags)

Possible flags

- json
- volatile
- broadcast

#### To use flags, just call it like in examples bellow

[](#to-use-flags-just-call-it-like-in-examples-bellow)

```
use Predis;
use Shakahl\SocketIO;
...

$client = new Predis\Client();

(new Emitter($client))
    ->broadcast->emit('broadcast-event', 'payload message');

(new Emitter($client))
    ->flag('broadcast')->emit('broadcast-event', 'payload message');
```

### Emit an object

[](#emit-an-object)

```
use Predis;
use Shakahl\SocketIO;
...

$client = new Predis\Client();

(new Emitter($client))
    ->emit('broadcast-event', ['param1' => 'value1', 'param2' => 'value2', ]);
```

### Emit an object in a rooms

[](#emit-an-object-in-a-rooms)

```
use Predis;
use Shakahl\SocketIO;
...

$client = new Predis\Client();

(new Emitter($client))
    ->in(['room1', 'room2'])
    ->emit('broadcast-event', ['param1' => 'value1', 'param2' => 'value2', ]);
```

Credits
-------

[](#credits)

This library is forked from [exls/socket.io-emitter](https://github.com/exls/socket.io-emitter) created by Anton Pavlov.

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 Bus Factor1

Top contributor holds 62.5% 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

Unknown

Total

1

Last Release

1246d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/204a5d1f0a092a88fe2500f37b90294e2b15e31f61def440b965a8f3f9feaa04?d=identicon)[neo-rainboy](/maintainers/neo-rainboy)

---

Top Contributors

[![shakahl](https://avatars.githubusercontent.com/u/5264395?v=4)](https://github.com/shakahl "shakahl (5 commits)")[![neo-rainboy](https://avatars.githubusercontent.com/u/23292627?v=4)](https://github.com/neo-rainboy "neo-rainboy (2 commits)")[![exls](https://avatars.githubusercontent.com/u/6387671?v=4)](https://github.com/exls "exls (1 commits)")

### Embed Badge

![Health badge](/badges/neo-rainboy-socketio-php-emitter/health.svg)

```
[![Health](https://phpackages.com/badges/neo-rainboy-socketio-php-emitter/health.svg)](https://phpackages.com/packages/neo-rainboy-socketio-php-emitter)
```

###  Alternatives

[yiicod/yii2-socketio

The simple and powerful socketio for the Yii2 framework

4619.7k](/packages/yiicod-yii2-socketio)[gointegro/hateoas

GOintegro HATEOAS Lib

408.0k1](/packages/gointegro-hateoas)[sfcod/socketio

SocketIo adapter for Symfony

252.7k](/packages/sfcod-socketio)

PHPackages © 2026

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