class Illuminate / Broadcasting / Broadcasters / RedisBroadcaster

RedisBroadcaster

Extends

Uses

Properties

protected

$redis Factory

The Redis instance.

Default: null
protected

$connection string|null

The Redis connection to use for broadcasting.

Default: null
protected

$prefix string

The Redis key prefix.

Default: ''

Methods

public

__construct ( Factory $redis , $connection , $prefix ) : void

Create a new broadcaster instance.

Parameters

  • $redis Factory
  • $connection string|null
  • $prefix string
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

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

Broadcast the given event.

Parameters

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

broadcastMultipleChannelsScript ( ) : string

Get the Lua script for broadcasting to multiple channels.

protected

formatChannels ( array $channels ) : array

Format the channel array into an array of strings.

Parameters

  • $channels array