PHPackages                             tanuck/pusher - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tanuck/pusher

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

tanuck/pusher
=============

A CakePHP integration for the Pusher library.

2.0.0(10y ago)0561MITPHPPHP &gt;=5.3

Since Aug 16Pushed 10y ago1 watchersCompare

[ Source](https://github.com/tanuck/cakephp-pusher)[ Packagist](https://packagist.org/packages/tanuck/pusher)[ RSS](/packages/tanuck-pusher/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (3)Used By (0)

CakePHP Pusher
==============

[](#cakephp-pusher)

[![Build Status](https://camo.githubusercontent.com/4f06f48b6baaabe554ca0a679bfa3cef8bb1b8bf1259ab6b165b385e0500f69c/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f74616e75636b2f63616b657068702d7075736865722e7376673f6272616e63683d6d6173746572)](http://travis-ci.org/tanuck/cakephp-pusher)[![License](https://camo.githubusercontent.com/ea0540206082822d14e6c3ad0af9dde1a5631d4571d528ea28596945d4f59fa1/68747470733a2f2f706f7365722e707567782e6f72672f74616e75636b2f7075736865722f6c6963656e73652e737667)](https://packagist.org/packages/tanuck/pusher)[![Total Downloads](https://camo.githubusercontent.com/dc96f16f18995d7a8077c395e5395e883b8f0544d7f0bd7a24d30707a97ade38/68747470733a2f2f706f7365722e707567782e6f72672f74616e75636b2f7075736865722f646f776e6c6f6164732e737667)](https://packagist.org/packages/tanuck/pusher)

A CakePHP plugin for interaction with the Pusher API.

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

[](#installation)

Include the following in your composer.json file:

```
{
	"require": {
		"tanuck/pusher": "dev-master"
	}
}

```

Note: This plugin should install in your `Plugin` directory rather than the composer vendors directory.

Configuration
-------------

[](#configuration)

Firstly, you must load the plugin:

```
CakePlugin::load('CakePusher');
```

Include the component in your controller:

```
class MyController extends AppController {

	public $components = array(
		'CakePusher.Pusher' => array(
			'auth_key' => 'PUSHER_APP_AUTH_KEY',
			'secret' => 'PUSHER_APP_SECRET',
			'app_id' => 'PUSHER_APP_ID',
		),
	);
}
```

This is the most basic form taken by the Component constructor, for further configuration options see the Usage section below.

Then access the Component like so:

```
$this->Pusher->trigger('my-channel', 'my-event', 'My Message');
```

Usage
-----

[](#usage)

If you wish to use just the one Pusher app in your CakePHP application, then the `$components` definition above will be enough. The options available mirror those passed to the Pusher API constructor (see [here](https://github.com/pusher/pusher-http-php) form more information).

The plugin allows you to configure and use multiple Pusher apps with the Component. This can be done by nesting the configuration arrays in the component settings, the array index of each will become the internal alias to each Pusher app. For example:

```
class MyController extends AppController {

	public $components = array(
		'CakePusher.Pusher' => array(
			'main' => array(
				'auth_key' => 'PUSHER_APP_AUTH_KEY',
				'secret' => 'PUSHER_APP_SECRET',
				'app_id' => 'PUSHER_APP_ID',
			),
			'otherApp' => array(
				'auth_key' => 'PUSHER_APP_AUTH_KEY',
				'secret' => 'PUSHER_APP_SECRET',
				'app_id' => 'PUSHER_APP_ID',
			),
		),
	);
}
```

**NOTE: When using more than one Pusher instance you must specifiy a `main` app.**

You can interact with the default `main` app using the methods directly on the component or you can specify an app to use with the `with` method:

```
$this->Pusher->trigger('my-channel', 'my-event', 'My Message');
$this->Pusher->socketAuth('my-channel', '1234.1234');
$this->Pusher->presenceAuth('my-channel', '1234.1234', 'user-12', true);
$this->Pusher->get('/channels');

$this->Pusher->with('otherApp')->trigger('my-channel', 'my-event', 'My Message');
```

You can get and set the name of the default Pusher app like so:

```
$this->Pusher->getDefault();

$this->Pusher->setDefault('otherApp');
```

And you can add additional app configurations on the fly:

```
$this->Pusher->addAppConfig('myAppName', array(
	'auth_key' => 'PUSHER_APP_AUTH_KEY',
	'secret' => 'PUSHER_APP_SECRET',
	'app_id' => 'PUSHER_APP_ID',
));
```

License
-------

[](#license)

cakephp-pusher is offered under an [MIT license](http://www.opensource.org/licenses/mit-license.php).

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

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 ~0 days

Total

2

Last Release

3928d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c5fed91f27a3514f75b7eac9fffc5aa32895f040b193364cc8d9f7432b4ed3ef?d=identicon)[tanuck](/maintainers/tanuck)

---

Top Contributors

[![tanuck](https://avatars.githubusercontent.com/u/289004?v=4)](https://github.com/tanuck "tanuck (11 commits)")

---

Tags

plugincakephppusher

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tanuck-pusher/health.svg)

```
[![Health](https://phpackages.com/badges/tanuck-pusher/health.svg)](https://phpackages.com/packages/tanuck-pusher)
```

###  Alternatives

[cakedc/tiny-mce

TinyMCE Plugin for CakePHP

10790.2k](/packages/cakedc-tiny-mce)[dereuromark/cakephp-geo

A CakePHP plugin around geocoding tools and helpers.

51174.9k4](/packages/dereuromark-cakephp-geo)[rochamarcelo/cake-pimple-di

A cakephp plugin for dependency injection based on Pimple library

12176.8k](/packages/rochamarcelo-cake-pimple-di)

PHPackages © 2026

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