EventHandler
class EventHandler
Methods
Subscribe to the given channel.
Carry out any actions that should be performed after a subscription.
Send the cached payload for the given channel.
Send a response to the given connection.
Send an internal response to the given connection.
Format the payload for the given event.
Format the internal payload for the given event.
Details
at line 21
__construct(ChannelManager $channels)
Create a new Pusher event instance.
at line 28
void
handle(Connection $connection, string $event, array $payload = [])
Handle an incoming Pusher event.
at line 50
void
acknowledge(Connection $connection)
Acknowledge the connection.
at line 61
void
subscribe(Connection $connection, string $channel, string|null $auth = null, string|null $data = null)
Subscribe to the given channel.
at line 79
protected void
afterSubscribe(Channel $channel, Connection $connection)
Carry out any actions that should be performed after a subscription.
at line 92
void
unsubscribe(Connection $connection, string $channel)
Unsubscribe from the given channel.
at line 103
protected void
sendCachedPayload(CacheChannel $channel, Connection $connection)
Send the cached payload for the given channel.
at line 127
void
pong(Connection $connection)
Respond to a ping on the given connection.
at line 135
void
ping(Connection $connection)
Send a ping to the given connection.
at line 147
void
send(Connection $connection, string $event, array $data = [], string|null $channel = null)
Send a response to the given connection.
at line 157
void
sendInternally(Connection $connection, string $event, array $data = [], string|null $channel = null)
Send an internal response to the given connection.
at line 167
string
formatPayload(string $event, array $data = [], string|null $channel = null, string $prefix = 'pusher:')
Format the payload for the given event.
at line 182
string
formatInternalPayload(string $event, array $data = [], string|null $channel = null)
Format the internal payload for the given event.