class Illuminate / Broadcasting / BroadcastManager

BroadcastManager

Implements

Properties

protected

$app Container

The application instance.

Default: null
protected

$drivers array

The array of resolved broadcast drivers.

Default: []
protected

$customCreators array

The registered custom driver creators.

Default: []

Methods

public

__construct ( $app ) : void

Create a new manager instance.

Parameters

public

routes ( array $attributes ) : void

Register the routes for handling broadcast channel authentication and sockets.

Parameters

  • $attributes array|null
public

userRoutes ( array $attributes ) : void

Register the routes for handling broadcast user authentication.

Parameters

  • $attributes array|null
public

channelRoutes ( array $attributes ) : void

Register the routes for handling broadcast authentication and sockets.

Parameters

  • $attributes array|null
public

socket ( $request ) : string|null

Get the socket ID for the given request.

Parameters

public

event ( $event ) : PendingBroadcast

Begin broadcasting an event.

Parameters

  • $event mixed|null
public

queue ( $event ) : void

Queue the given event for broadcast.

Parameters

  • $event mixed
protected

mustBeUniqueAndCannotAcquireLock ( $event ) : bool

Determine if the broadcastable event must be unique and determine if we can acquire the necessary lock.

Parameters

  • $event mixed
public

connection ( $driver ) : mixed

Get a driver instance.

Parameters

  • $driver string|null
public

driver ( $name ) : mixed

Get a driver instance.

Parameters

  • $name string|null
protected

get ( $name ) : Broadcaster

Attempt to get the connection from the local cache.

Parameters

  • $name string
protected

resolve ( $name ) : Broadcaster

Resolve the given broadcaster.

Parameters

  • $name string
protected

callCustomCreator ( array $config ) : mixed

Call a custom driver creator.

Parameters

  • $config array
protected

createPusherDriver ( array $config ) : Broadcaster

Create an instance of the driver.

Parameters

  • $config array
public

pusher ( array $config ) : Pusher\Pusher

Get a Pusher instance for the given configuration.

Parameters

  • $config array
protected

createAblyDriver ( array $config ) : Broadcaster

Create an instance of the driver.

Parameters

  • $config array
public

ably ( array $config ) : Ably\AblyRest

Get an Ably instance for the given configuration.

Parameters

  • $config array
protected

createRedisDriver ( array $config ) : Broadcaster

Create an instance of the driver.

Parameters

  • $config array
protected

createLogDriver ( array $config ) : Broadcaster

Create an instance of the driver.

Parameters

  • $config array
protected

createNullDriver ( array $config ) : Broadcaster

Create an instance of the driver.

Parameters

  • $config array
protected

getConfig ( $name ) : array

Get the connection configuration.

Parameters

  • $name string
public

getDefaultDriver ( ) : string

Get the default driver name.

public

setDefaultDriver ( $name ) : void

Set the default driver name.

Parameters

  • $name string
public

purge ( $name ) : void

Disconnect the given disk and remove from local cache.

Parameters

  • $name string|null
public

extend ( $driver , Closure $callback ) : $this

Register a custom driver creator Closure.

Parameters

public

getApplication ( ) : Application

Get the application instance used by the manager.

public

setApplication ( $app ) : $this

Set the application instance used by the manager.

Parameters

public

forgetDrivers ( ) : $this

Forget all of the resolved driver instances.

public

__call ( $method , $parameters ) : mixed

Dynamically call the default driver instance.

Parameters

  • $method string
  • $parameters array