bootdesk/chat-sdk

LaravelBroadcastAdapter
in package
implements BroadcastAdapter

Table of Contents

Interfaces

BroadcastAdapter

Properties

$broadcaster  : Broadcaster|null
$broadcasterType  : string
$broadcastManager  : BroadcastManager
$channelPrefix  : string
$connected  : bool
$threadChannelType  : string
$userChannelType  : string

Methods

__construct()  : mixed
broadcast()  : void
broadcastToUser()  : void
connect()  : void
disconnect()  : void
isBroadcastingAvailable()  : bool
buildChannel()  : Channel
buildChannelName()  : string
buildEventName()  : string
buildPresenceChannel()  : PresenceChannel
buildPresenceChannelForThread()  : PresenceChannel
buildPrivateChannel()  : PrivateChannel
buildPrivateChannelForThread()  : PrivateChannel
buildPrivateChannelName()  : string
ensureConnected()  : void

Properties

Methods

__construct()

public __construct(BroadcastManager $broadcastManager[, string $broadcasterType = 'pusher' ][, string $channelPrefix = 'chat' ][, string $threadChannelType = 'public' ][, string $userChannelType = 'private' ]) : mixed
Parameters
$broadcastManager : BroadcastManager
$broadcasterType : string = 'pusher'
$channelPrefix : string = 'chat'
$threadChannelType : string = 'public'
$userChannelType : string = 'private'

broadcastToUser()

public broadcastToUser(string $threadId, string|array<string|int, mixed> $userIds, BroadcastEvent $event[, array<string|int, mixed> $options = [] ]) : void
Parameters
$threadId : string
$userIds : string|array<string|int, mixed>
$event : BroadcastEvent
$options : array<string|int, mixed> = []

isBroadcastingAvailable()

public isBroadcastingAvailable(string $threadId) : bool
Parameters
$threadId : string
Return values
bool

buildChannel()

protected buildChannel(string $threadId) : Channel
Parameters
$threadId : string
Return values
Channel

buildChannelName()

protected buildChannelName(string $threadId) : string
Parameters
$threadId : string
Return values
string

buildEventName()

protected buildEventName(string $eventType) : string
Parameters
$eventType : string
Return values
string

buildPresenceChannel()

protected buildPresenceChannel(string $threadId, string $userId) : PresenceChannel
Parameters
$threadId : string
$userId : string
Return values
PresenceChannel

buildPresenceChannelForThread()

protected buildPresenceChannelForThread(string $threadId) : PresenceChannel
Parameters
$threadId : string
Return values
PresenceChannel

buildPrivateChannel()

protected buildPrivateChannel(string $threadId, string $userId) : PrivateChannel
Parameters
$threadId : string
$userId : string
Return values
PrivateChannel

buildPrivateChannelForThread()

protected buildPrivateChannelForThread(string $threadId) : PrivateChannel
Parameters
$threadId : string
Return values
PrivateChannel

buildPrivateChannelName()

protected buildPrivateChannelName(string $threadId, string $userId) : string
Parameters
$threadId : string
$userId : string
Return values
string
On this page

Search results