class
Illuminate
/
Broadcasting
/
Broadcasters
/
AblyBroadcaster
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
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
- $request Request
public
validAuthenticationResponse ( $request , $result ) : mixed
Return the valid authentication response.
Parameters
- $request Request
- $result mixed
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 ( ) : string
Get the private token value from the Ably key.
public
getAbly ( ) : Ably\AblyRest
Get the underlying Ably SDK instance.