Documentation

RedisBroadcaster extends Broadcaster
in package

Table of Contents

$bindingRegistrar  : BindingRegistrar
The binding registrar instance.
$channels  : array<string|int, mixed>
The registered channel authenticators.
$connection  : string
The Redis connection to use for broadcasting.
$redis  : Factory
The Redis 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.
validAuthenticationResponse()  : mixed
Return the valid authentication response.
binder()  : BindingRegistrar
Get the model binding registrar instance.
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

$channels

The registered channel authenticators.

protected array<string|int, mixed> $channels = []

$connection

The Redis connection to use for broadcasting.

protected string $connection

Methods

__construct()

Create a new broadcaster instance.

public __construct(Factory $redis[, string $connection = null ]) : void
Parameters
$redis : Factory
$connection : string = null
Return values
void

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

validAuthenticationResponse()

Return the valid authentication response.

public validAuthenticationResponse(Request $request, mixed $result) : mixed
Parameters
$request : Request
$result : mixed
Return values
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
throws
AccessDeniedHttpException
Return values
mixed

verifyUserCanAccessChannel()

Authenticate the incoming request for a given channel.

protected verifyUserCanAccessChannel(Request $request, string $channel) : mixed
Parameters
$request : Request
$channel : string
Tags
throws
AccessDeniedHttpException
Return values
mixed

Search results