nc / elephantio-bundle
Elephant IO integration in Symfony2
Installs: 77 010
Dependents: 0
Suggesters: 0
Security: 0
Stars: 18
Watchers: 4
Forks: 6
Open Issues: 1
Requires
- wisembly/elephant.io: ~3.0
Requires (Dev)
- atoum/atoum: dev-master
- m6web/coke: ~1.2
- m6web/symfony2-coding-standard: ~1.1
This package is not auto-updated.
Last update: 2024-11-23 15:34:43 UTC
README
Elephant.io library integration in symfony2.
This bundle allows you to communicate with a socket.io server (0.x or 1.x) from a Symfony2 application.
Installation
composer require nc/elephantio-bundle
In your AppKernel
public function registerbundles() { return [ ... ... new Nc\Bundle\ElephantIOBundle\NcElephantIOBundle(), ]; }
Configuration sample
nc_elephant_io:
clients:
default:
connection: http://192.168.0.14:3006
# specify version 0.x for 0.* version and 1.x for 1.0 version
version: 0.x
your_key:
connection: http://192.168.0.14:3000
version: 1.x
Usage
$client = $this->get('elephantio_client.your_key');
$client->send('event_name', ['foo' => 'test']);
More complex usage
$client = $this->get('elephantio_client.your_key');
$elephantIOClient = $client->getElephantIO();
// Refer to Elephant.io doc
Contribute ?
If you want to improve this bundle, you can use github pull-request and issue