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

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

stas-zozulja/pushpin-bundle
===========================

Pushpin proxy integration for Symfony applications

v0.1.3(8y ago)030MITPHP

Since Mar 3Pushed 8y ago1 watchersCompare

[ Source](https://github.com/stas-zozulja/pushpin-bundle)[ Packagist](https://packagist.org/packages/stas-zozulja/pushpin-bundle)[ RSS](/packages/stas-zozulja-pushpin-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (7)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/bdfdbfeb0170aa6402c8604f5be76edd4c85c3aeb1af08e4e1058d5a68f5b4f3/68747470733a2f2f7472617669732d63692e6f72672f737461732d7a6f7a756c6a612f7075736870696e2d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/stas-zozulja/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
--------

[](#features)

- WebSocket-over-HTTP
    - Works with [WebSocket-over-HTTP Requests](http://pushpin.org/docs/protocols/grip/#websocket) 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.
- HTTP streaming
    - adds a specific response headers for Pushipn to hold a connections [HTTP GRIP transport](http://pushpin.org/docs/protocols/grip/#http)

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

[](#installation)

Install a bundle

```
composer require "stas-zozulja/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 (WebSocket-over-HTTP)
---------------------------

[](#usage-websocket-over-http)

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

```
