PHPackages                             gamma/pushpin-bundle - 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. gamma/pushpin-bundle

ActiveSymfony-bundle[HTTP &amp; Networking](/categories/http)

gamma/pushpin-bundle
====================

Pushpin proxy integration for Symfony applications

v0.1.2(8y ago)7625[1 issues](https://github.com/smart-gamma/pushpin-bundle/issues)MITPHP

Since Jan 17Pushed 8y ago3 watchersCompare

[ Source](https://github.com/smart-gamma/pushpin-bundle)[ Packagist](https://packagist.org/packages/gamma/pushpin-bundle)[ RSS](/packages/gamma-pushpin-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (5)Versions (8)Used By (0)

GammaPushpinBundle
==================

[](#gammapushpinbundle)

[![SensioLabsInsight](https://camo.githubusercontent.com/ecb4feae560fe3080190ccdcfd69bbef4404fac07a32bdade88c5d10dd0142b5/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f63386639623734392d386639372d346164622d623361662d3831343837666139333636612f6d696e692e706e67)](https://insight.sensiolabs.com/projects/c8f9b749-8f97-4adb-b3af-81487fa9366a)[![Build Status](https://camo.githubusercontent.com/8e965df2d5a8628a0262a3524c6ea01a3c8a299f1a8a19cc60731e3887adddd6/68747470733a2f2f7472617669732d63692e6f72672f736d6172742d67616d6d612f7075736870696e2d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/smart-gamma/pushpin-bundle)

Symfony Bundle that helps you to add a realtime features to your applications using [Pushpin](http://pushpin.org/) reverse proxy. Integrates [php-gripcontrol](https://github.com/fanout/php-gripcontrol) library.

\##Features

- Works with [WebSocket-over-HTTP Requests](https://github.com/fanout/pushpin/blob/master/docs/websocket-over-http.md) from Pushpin
- De serializes (using [jms/serializer](http://jmsyst.com/libs/serializer)) a TEXT events from Pushpin into DTOs (events) specified by your configuration
- Handling WebSocketEvent with your specific handler
- Pushpin helpers to publishing to a channel, subscribing, detaching etc.

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

[](#installation)

Install a bundle

```
composer require "gamma/pushpin-bundle"

```

Register the bundle in `app/AppKernel.php`:

```
public function registerBundles()
{
    return array(
        // ...
        new Gamma\Pushpin\PushpinBundle\GammaPushpinBundle()
    );
}
```

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

[](#configuration)

```
// config.yml
gamma_pushpin:
    proxy:
        control_uri: "http://localhost:5561/" # control URI to Pushpin
    web_socket:
        json_events:
            base_namespace: ~
```

For testing you need to [install a Pushpin](http://pushpin.org/docs/#install) on dev machine. And enable WebSocket-over-HTTP in `routes` config file:

` * localhost:80,over_http`

Usage
-----

[](#usage)

Create an event class. Extend `AbstractJsonEvent`. This class will hold a data from websocket clients:

```
