PusherBroadcaster
extends Broadcaster
in package
Table of Contents
- $bindingRegistrar : BindingRegistrar
- The binding registrar instance.
- $channels : array<string|int, mixed>
- The registered channel authenticators.
- $pusher : Pusher
- The Pusher SDK instance.
- __construct() : void
- Create a new broadcaster instance.
- auth() : mixed
- Authenticate the incoming request for a given channel.
- broadcast() : void
- Broadcast the given event.
- channel() : $this
- Register a channel authenticator.
- getPusher() : Pusher
- Get the Pusher SDK instance.
- validAuthenticationResponse() : mixed
- Return the valid authentication response.
- binder() : BindingRegistrar
- Get the model binding registrar instance.
- decodePusherResponse() : array<string|int, mixed>
- Decode the given Pusher response.
- extractAuthParameters() : array<string|int, mixed>
- Extract the parameters from the given pattern and channel.
- extractChannelKeys() : array<string|int, mixed>
- Extract the channel keys from the incoming channel name.
- formatChannels() : array<string|int, mixed>
- Format the channel array into an array of strings.
- isImplicitlyBindable() : bool
- Determine if a given key and parameter is implicitly bindable.
- resolveBinding() : mixed
- Resolve the given parameter binding.
- resolveExplicitBindingIfPossible() : mixed
- Resolve an explicit parameter binding if applicable.
- resolveImplicitBindingIfPossible() : mixed
- Resolve an implicit parameter binding if applicable.
- verifyUserCanAccessChannel() : mixed
- Authenticate the incoming request for a given channel.
Properties
$bindingRegistrar
The binding registrar instance.
protected
BindingRegistrar
$bindingRegistrar
$channels
The registered channel authenticators.
protected
array<string|int, mixed>
$channels
= []
$pusher
The Pusher SDK instance.
protected
Pusher
$pusher
Methods
__construct()
Create a new broadcaster instance.
public
__construct(Pusher $pusher) : void
Parameters
- $pusher : Pusher
Return values
void —auth()
Authenticate the incoming request for a given channel.
public
auth(Request $request) : mixed
Parameters
- $request : Request
Tags
Return values
mixed —broadcast()
Broadcast the given event.
public
broadcast(array<string|int, mixed> $channels, string $event[, array<string|int, mixed> $payload = [] ]) : void
Parameters
- $channels : array<string|int, mixed>
- $event : string
- $payload : array<string|int, mixed> = []
Return values
void —channel()
Register a channel authenticator.
public
channel(string $channel, callable $callback) : $this
Parameters
- $channel : string
- $callback : callable
Return values
$this —getPusher()
Get the Pusher SDK instance.
public
getPusher() : Pusher
Return values
Pusher —validAuthenticationResponse()
Return the valid authentication response.
public
validAuthenticationResponse(Request $request, mixed $result) : mixed
Parameters
- $request : Request
- $result : mixed
Return values
mixed —binder()
Get the model binding registrar instance.
protected
binder() : BindingRegistrar
Return values
BindingRegistrar —decodePusherResponse()
Decode the given Pusher response.
protected
decodePusherResponse(mixed $response) : array<string|int, mixed>
Parameters
- $response : mixed
Return values
array<string|int, mixed> —extractAuthParameters()
Extract the parameters from the given pattern and channel.
protected
extractAuthParameters(string $pattern, string $channel, callable $callback) : array<string|int, mixed>
Parameters
- $pattern : string
- $channel : string
- $callback : callable
Return values
array<string|int, mixed> —extractChannelKeys()
Extract the channel keys from the incoming channel name.
protected
extractChannelKeys(string $pattern, string $channel) : array<string|int, mixed>
Parameters
- $pattern : string
- $channel : string
Return values
array<string|int, mixed> —formatChannels()
Format the channel array into an array of strings.
protected
formatChannels(array<string|int, mixed> $channels) : array<string|int, mixed>
Parameters
- $channels : array<string|int, mixed>
Return values
array<string|int, mixed> —isImplicitlyBindable()
Determine if a given key and parameter is implicitly bindable.
protected
isImplicitlyBindable(string $key, ReflectionParameter $parameter) : bool
Parameters
- $key : string
- $parameter : ReflectionParameter
Return values
bool —resolveBinding()
Resolve the given parameter binding.
protected
resolveBinding(string $key, string $value, array<string|int, mixed> $callbackParameters) : mixed
Parameters
- $key : string
- $value : string
- $callbackParameters : array<string|int, mixed>
Return values
mixed —resolveExplicitBindingIfPossible()
Resolve an explicit parameter binding if applicable.
protected
resolveExplicitBindingIfPossible(string $key, mixed $value) : mixed
Parameters
- $key : string
- $value : mixed
Return values
mixed —resolveImplicitBindingIfPossible()
Resolve an implicit parameter binding if applicable.
protected
resolveImplicitBindingIfPossible(string $key, mixed $value, array<string|int, mixed> $callbackParameters) : mixed
Parameters
- $key : string
- $value : mixed
- $callbackParameters : array<string|int, mixed>
Tags
Return values
mixed —verifyUserCanAccessChannel()
Authenticate the incoming request for a given channel.
protected
verifyUserCanAccessChannel(Request $request, string $channel) : mixed
Parameters
- $request : Request
- $channel : string