class PusherBroadcaster extends Broadcaster

Properties

protected array $channels

The registered channel authenticators.

from  Broadcaster
protected BindingRegistrar $bindingRegistrar

The binding registrar instance.

from  Broadcaster
protected Pusher $pusher

The Pusher SDK instance.

Methods

$this
channel(string $channel, callable $callback)

Register a channel authenticator.

mixed
verifyUserCanAccessChannel(Request $request, string $channel)

Authenticate the incoming request for a given channel.

array
extractAuthParameters(string $pattern, string $channel, callable $callback)

Extract the parameters from the given pattern and channel.

array
extractChannelKeys(string $pattern, string $channel)

Extract the channel keys from the incoming channel name.

mixed
resolveBinding(string $key, string $value, array $callbackParameters)

Resolve the given parameter binding.

mixed
resolveExplicitBindingIfPossible(string $key, mixed $value)

Resolve an explicit parameter binding if applicable.

mixed
resolveImplicitBindingIfPossible(string $key, mixed $value, array $callbackParameters)

Resolve an implicit parameter binding if applicable.

bool
isImplicitlyBindable(string $key, ReflectionParameter $parameter)

Determine if a given key and parameter is implicitly bindable.

array
formatChannels(array $channels)

Format the channel array into an array of strings.

binder()

Get the model binding registrar instance.

void
__construct(Pusher $pusher)

Create a new broadcaster instance.

mixed
auth(Request $request)

Authenticate the incoming request for a given channel.

mixed
validAuthenticationResponse(Request $request, mixed $result)

Return the valid authentication response.

array
decodePusherResponse(mixed $response)

Decode the given Pusher response.

void
broadcast(array $channels, string $event, array $payload = [])

Broadcast the given event.

Pusher
getPusher()

Get the Pusher SDK instance.

Details

in Broadcaster at line 37
$this channel(string $channel, callable $callback)

Register a channel authenticator.

Parameters

string $channel
callable $callback

Return Value

$this

in Broadcaster at line 51
protected mixed verifyUserCanAccessChannel(Request $request, string $channel)

Authenticate the incoming request for a given channel.

Parameters

Request $request
string $channel

Return Value

mixed

in Broadcaster at line 76
protected array extractAuthParameters(string $pattern, string $channel, callable $callback)

Extract the parameters from the given pattern and channel.

Parameters

string $pattern
string $channel
callable $callback

Return Value

array

in Broadcaster at line 94
protected array extractChannelKeys(string $pattern, string $channel)

Extract the channel keys from the incoming channel name.

Parameters

string $pattern
string $channel

Return Value

array

in Broadcaster at line 109
protected mixed resolveBinding(string $key, string $value, array $callbackParameters)

Resolve the given parameter binding.

Parameters

string $key
string $value
array $callbackParameters

Return Value

mixed

in Broadcaster at line 125
protected mixed resolveExplicitBindingIfPossible(string $key, mixed $value)

Resolve an explicit parameter binding if applicable.

Parameters

string $key
mixed $value

Return Value

mixed

in Broadcaster at line 144
protected mixed resolveImplicitBindingIfPossible(string $key, mixed $value, array $callbackParameters)

Resolve an implicit parameter binding if applicable.

Parameters

string $key
mixed $value
array $callbackParameters

Return Value

mixed

in Broadcaster at line 168
protected bool isImplicitlyBindable(string $key, ReflectionParameter $parameter)

Determine if a given key and parameter is implicitly bindable.

Parameters

string $key
ReflectionParameter $parameter

Return Value

bool

in Broadcaster at line 180
protected array formatChannels(array $channels)

Format the channel array into an array of strings.

Parameters

array $channels

Return Value

array

in Broadcaster at line 192
protected BindingRegistrar binder()

Get the model binding registrar instance.

Return Value

BindingRegistrar

at line 26
void __construct(Pusher $pusher)

Create a new broadcaster instance.

Parameters

Pusher $pusher

Return Value

void

at line 37
mixed auth(Request $request)

Authenticate the incoming request for a given channel.

Parameters

Request $request

Return Value

mixed

at line 60
mixed validAuthenticationResponse(Request $request, mixed $result)

Return the valid authentication response.

Parameters

Request $request
mixed $result

Return Value

mixed

at line 80
protected array decodePusherResponse(mixed $response)

Decode the given Pusher response.

Parameters

mixed $response

Return Value

array

at line 93
void broadcast(array $channels, string $event, array $payload = [])

Broadcast the given event.

Parameters

array $channels
string $event
array $payload

Return Value

void

at line 116
Pusher getPusher()

Get the Pusher SDK instance.

Return Value

Pusher