class Illuminate / Broadcasting / Broadcasters / Broadcaster
abstract

Broadcaster

Implements

Properties

protected

$authenticatedUserCallback Closure |null

The callback to resolve the authenticated user information.

Default: null
protected

$channels array

The registered channel authenticators.

Default: []
protected

$channelOptions array

The registered channel options.

Default: []
protected

$bindingRegistrar BindingRegistrar

The binding registrar instance.

Default: null

Methods

public

resolveAuthenticatedUser ( $request ) : array|null

Resolve the authenticated user payload for the incoming connection request.

Parameters

public

resolveAuthenticatedUserUsing ( Closure $callback ) : void

Register the user retrieval callback used to authenticate connections.

Parameters

public

channel ( $channel , $callback , $options ) : $this

Register a channel authenticator.

Parameters

protected

verifyUserCanAccessChannel ( $request , $channel ) : mixed

Authenticate the incoming request for a given channel.

Parameters

protected

extractAuthParameters ( $pattern , $channel , $callback ) : array

Extract the parameters from the given pattern and channel.

Parameters

  • $pattern string
  • $channel string
  • $callback callable|string
protected

extractParameters ( $callback ) : ReflectionParameter[]

Extracts the parameters out of what the user passed to handle the channel authentication.

Parameters

  • $callback callable|string
protected

extractParametersFromClass ( $callback ) : ReflectionParameter[]

Extracts the parameters out of a class channel's "join" method.

Parameters

  • $callback string
protected

extractChannelKeys ( $pattern , $channel ) : array

Extract the channel keys from the incoming channel name.

Parameters

  • $pattern string
  • $channel string
protected

resolveBinding ( $key , $value , $callbackParameters ) : mixed

Resolve the given parameter binding.

Parameters

  • $key string
  • $value string
  • $callbackParameters array
protected

resolveExplicitBindingIfPossible ( $key , $value ) : mixed

Resolve an explicit parameter binding if applicable.

Parameters

  • $key string
  • $value mixed
protected

resolveImplicitBindingIfPossible ( $key , $value , $callbackParameters ) : mixed

Resolve an implicit parameter binding if applicable.

Parameters

  • $key string
  • $value mixed
  • $callbackParameters array
protected

isImplicitlyBindable ( $key , $parameter ) : bool

Determine if a given key and parameter is implicitly bindable.

Parameters

protected

formatChannels ( array $channels ) : array

Format the channel array into an array of strings.

Parameters

  • $channels array
protected

binder ( ) : BindingRegistrar

Get the model binding registrar instance.

protected

normalizeChannelHandlerToCallable ( $callback ) : callable

Normalize the given callback into a callable.

Parameters

  • $callback mixed
protected

retrieveUser ( $request , $channel ) : mixed

Retrieve the authenticated user using the configured guard (if any).

Parameters

protected

retrieveChannelOptions ( $channel ) : array

Retrieve options for a certain channel.

Parameters

  • $channel string
protected

channelNameMatchesPattern ( $channel , $pattern ) : bool

Check if the channel name from the request matches a pattern from registered channels.

Parameters

  • $channel string
  • $pattern string
public

getChannels ( ) : Illuminate\...\Collection

Get all of the registered channels.