W3cubDocs

/Laravel 5.5

RedisBroadcaster

class RedisBroadcaster extends Broadcaster (View source)

Properties

protected array $channels The registered channel authenticators. from Broadcaster
protected BindingRegistrar $bindingRegistrar The binding registrar instance. from Broadcaster
protected Factory $redis The Redis instance.
protected string $connection The Redis connection to use for broadcasting.

Methods

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

Register a channel authenticator.

from Broadcaster
mixed verifyUserCanAccessChannel(Request $request, string $channel)

Authenticate the incoming request for a given channel.

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

Extract the parameters from the given pattern and channel.

from Broadcaster
array extractChannelKeys(string $pattern, string $channel)

Extract the channel keys from the incoming channel name.

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

Resolve the given parameter binding.

from Broadcaster
mixed resolveExplicitBindingIfPossible(string $key, mixed $value)

Resolve an explicit parameter binding if applicable.

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

Resolve an implicit parameter binding if applicable.

from Broadcaster
bool isImplicitlyBindable(string $key, ReflectionParameter $parameter)

Determine if a given key and parameter is implicitly bindable.

from Broadcaster
array formatChannels(array $channels)

Format the channel array into an array of strings.

from Broadcaster
BindingRegistrar binder()

Get the model binding registrar instance.

from Broadcaster
void __construct(Factory $redis, string $connection = null)

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.

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

Broadcast the given event.

Details

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

Register a channel authenticator.

Parameters

string $channel
callable $callback

Return Value

$this

protected mixed verifyUserCanAccessChannel(Request $request, string $channel)

Authenticate the incoming request for a given channel.

Parameters

Request $request
string $channel

Return Value

mixed

Exceptions

AccessDeniedHttpException

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

protected array extractChannelKeys(string $pattern, string $channel)

Extract the channel keys from the incoming channel name.

Parameters

string $pattern
string $channel

Return Value

array

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

Resolve the given parameter binding.

Parameters

string $key
string $value
array $callbackParameters

Return Value

mixed

protected mixed resolveExplicitBindingIfPossible(string $key, mixed $value)

Resolve an explicit parameter binding if applicable.

Parameters

string $key
mixed $value

Return Value

mixed

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

Exceptions

AccessDeniedHttpException

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

protected array formatChannels(array $channels)

Format the channel array into an array of strings.

Parameters

array $channels

Return Value

array

protected BindingRegistrar binder()

Get the model binding registrar instance.

Return Value

BindingRegistrar

void __construct(Factory $redis, string $connection = null)

Create a new broadcaster instance.

Parameters

Factory $redis
string $connection

Return Value

void

mixed auth(Request $request)

Authenticate the incoming request for a given channel.

Parameters

Request $request

Return Value

mixed

Exceptions

AccessDeniedHttpException

mixed validAuthenticationResponse(Request $request, mixed $result)

Return the valid authentication response.

Parameters

Request $request
mixed $result

Return Value

mixed

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

Broadcast the given event.

Parameters

array $channels
string $event
array $payload

Return Value

void

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.5/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.html