class Illuminate / Broadcasting / Broadcasters / AblyBroadcaster
You are viewing an older version of the documentation. For the latest, please visit master documentation.

AblyBroadcaster

Extends

Properties

protected

$ably Ably\AblyRest

The AblyRest SDK instance.

Default: null

Methods

public

__construct ( Ably\AblyRest $ably ) : void

Create a new broadcaster instance.

Parameters

  • $ably Ably\AblyRest
public

auth ( $request ) : mixed

Authenticate the incoming request for a given channel.

Parameters

public

validAuthenticationResponse ( $request , $result ) : mixed

Return the valid authentication response.

Parameters

public

generateAblySignature ( $channelName , $socketId , $userData ) : string

Generate the signature needed for Ably authentication headers.

Parameters

  • $channelName string
  • $socketId string
  • $userData array|null
public

broadcast ( array $channels , $event , array $payload ) : void

Broadcast the given event.

Parameters

  • $channels array
  • $event string
  • $payload array
protected

buildAblyMessage ( $event , array $payload ) : Ably\...\Message

Build an Ably message object for broadcasting.

Parameters

  • $event string
  • $payload array
public

isGuardedChannel ( $channel ) : bool

Return true if the channel is protected by authentication.

Parameters

  • $channel string
public

normalizeChannelName ( $channel ) : string

Remove prefix from channel name.

Parameters

  • $channel string
protected

formatChannels ( array $channels ) : array

Format the channel array into an array of strings.

Parameters

  • $channels array
protected

getPublicToken ( ) : mixed

Get the public token value from the Ably key.

protected

getPrivateToken ( ) : mixed

Get the private token value from the Ably key.

public

getAbly ( ) : Ably\AblyRest

Get the underlying Ably SDK instance.