2017 © Pedro Peláez
 

symfony-bundle real-time-bundle

Real-time events from server to browsers and mobile devices

image

sperrichon/real-time-bundle

Real-time events from server to browsers and mobile devices

  • Tuesday, July 17, 2018
  • by sperrichon
  • Repository
  • 2 Watchers
  • 1 Stars
  • 571 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 9 Versions
  • 139 % Grown

The README.md

p-sam/real-time-bundle

![license-badge] ![release-version-badge] !php-version-badge, (*1)

Real-time events from server to browsers and mobile devices via "channels", (*2)

Please note that this bundle makes uses of ably.io and Redis via Predis., (*3)

Installation

Install with composer:, (*4)

$ composer require p-sam/real-time-bundle

Then register the bundle in the AppKernel.php file:, (*5)

public function registerBundles()
{
    $bundles = array(
        // ...
        new SP\RealTimeBundle\SPRealTimeBundle(),
        // ...
    );

    return $bundles;
}

Then add the following to your routing.yml:, (*6)

sp_realtime:
    resource: "@SPRealTimeBundle/Controller/"
    type: annotation

Note: Registering the bundle and the routes are done automatically if you're using Symfony Flex, (*7)

Configuration

Configure the predis client and ably key in your config.yml:, (*8)

sp_realtime:
    ably:
        api_key: '- ably key here -'
        ttl: 3600 # in seconds
    redis:
        key_prefix: 'app:'
    presence_check: true

Usage

From PHP

Services are provided from the bundle:, (*9)

  • sp_real_time.sender: Allows sending of messages to channels
  • sp_real_time.presence: Allow subscribing by providing tokens, and checking for presence in channels

The following events are dispatched: * sp_real_time.event.subscribe: A SubscribeEvent is emitted when a token is generated for a channel * sp_real_time.event.message: A MessageEvent is emitted when a message is sent upstream to ably.io, (*10)

The Versions

17/07 2018

dev-master

9999999-dev

Real-time events from server to browsers and mobile devices

  Sources   Download

MIT

The Requires

 

by Samuel Perrichon

bundle time realtime message ably presence real

17/07 2018

0.4.0

0.4.0.0

Real-time events from server to browsers and mobile devices

  Sources   Download

MIT

The Requires

 

by Samuel Perrichon

bundle time realtime message ably presence real

17/07 2018

dev-develop

dev-develop

Real-time events from server to browsers and mobile devices

  Sources   Download

MIT

The Requires

 

by Samuel Perrichon

bundle time realtime message ably presence real

19/03 2018

0.3.1

0.3.1.0

Real-time events from server to browsers and mobile devices

  Sources   Download

MIT

The Requires

 

by Samuel Perrichon

bundle time realtime message ably presence real

14/03 2018

0.3.0

0.3.0.0

Real-time events from server to browsers and mobile devices

  Sources   Download

MIT

The Requires

 

by Samuel Perrichon

bundle time realtime message ably presence real

13/02 2018

0.2.1

0.2.1.0

Real-time events from server to browsers and mobile devices

  Sources   Download

MIT

The Requires

 

by Samuel Perrichon

bundle time realtime message ably presence real

12/02 2018

0.2.0

0.2.0.0

Real-time events from server to browsers and mobile devices

  Sources   Download

MIT

The Requires

 

by Samuel Perrichon

bundle time realtime message ably presence real

12/02 2018

0.1.1

0.1.1.0

Real-time events from server to browsers and mobile devices

  Sources   Download

MIT

The Requires

 

by Samuel Perrichon

bundle time realtime message ably presence real

09/02 2018

0.1.0

0.1.0.0

Real-time events from server to browsers and mobile devices

  Sources   Download

MIT

The Requires

 

by Samuel Perrichon

bundle time realtime message ably presence real