BroadcastManager
in package
implements
Factory
Tags
Interfaces, Classes and Traits
Table of Contents
- $app : Application
- The application instance.
- $customCreators : array<string|int, mixed>
- The registered custom driver creators.
- $drivers : array<string|int, mixed>
- The array of resolved broadcast drivers.
- __call() : mixed
- Dynamically call the default driver instance.
- __construct() : void
- Create a new manager instance.
- connection() : mixed
- Get a driver instance.
- driver() : mixed
- Get a driver instance.
- event() : PendingBroadcast|void
- Begin broadcasting an event.
- extend() : $this
- Register a custom driver creator Closure.
- getDefaultDriver() : string
- Get the default driver name.
- queue() : void
- Queue the given event for broadcast.
- routes() : void
- Register the routes for handling broadcast authentication and sockets.
- setDefaultDriver() : void
- Set the default driver name.
- socket() : string|null
- Get the socket ID for the given request.
- callCustomCreator() : mixed
- Call a custom driver creator.
- createLogDriver() : Broadcaster
- Create an instance of the driver.
- createNullDriver() : Broadcaster
- Create an instance of the driver.
- createPusherDriver() : Broadcaster
- Create an instance of the driver.
- createRedisDriver() : Broadcaster
- Create an instance of the driver.
- get() : Broadcaster
- Attempt to get the connection from the local cache.
- getConfig() : array<string|int, mixed>
- Get the connection configuration.
- resolve() : Broadcaster
- Resolve the given store.
Properties
$app
The application instance.
protected
Application
$app
$customCreators
The registered custom driver creators.
protected
array<string|int, mixed>
$customCreators
= []
$drivers
The array of resolved broadcast drivers.
protected
array<string|int, mixed>
$drivers
= []
Methods
__call()
Dynamically call the default driver instance.
public
__call(string $method, array<string|int, mixed> $parameters) : mixed
Parameters
- $method : string
- $parameters : array<string|int, mixed>
Return values
mixed —__construct()
Create a new manager instance.
public
__construct(Application $app) : void
Parameters
- $app : Application
Return values
void —connection()
Get a driver instance.
public
connection([string $driver = null ]) : mixed
Parameters
- $driver : string = null
Return values
mixed —driver()
Get a driver instance.
public
driver([string $name = null ]) : mixed
Parameters
- $name : string = null
Return values
mixed —event()
Begin broadcasting an event.
public
event([mixed|null $event = null ]) : PendingBroadcast|void
Parameters
- $event : mixed|null = null
Return values
PendingBroadcast|void —extend()
Register a custom driver creator Closure.
public
extend(string $driver, Closure $callback) : $this
Parameters
- $driver : string
- $callback : Closure
Return values
$this —getDefaultDriver()
Get the default driver name.
public
getDefaultDriver() : string
Return values
string —queue()
Queue the given event for broadcast.
public
queue(mixed $event) : void
Parameters
- $event : mixed
Return values
void —routes()
Register the routes for handling broadcast authentication and sockets.
public
routes([array<string|int, mixed>|null $attributes = null ]) : void
Parameters
- $attributes : array<string|int, mixed>|null = null
Return values
void —setDefaultDriver()
Set the default driver name.
public
setDefaultDriver(string $name) : void
Parameters
- $name : string
Return values
void —socket()
Get the socket ID for the given request.
public
socket([Request|null $request = null ]) : string|null
Parameters
- $request : Request|null = null
Return values
string|null —callCustomCreator()
Call a custom driver creator.
protected
callCustomCreator(array<string|int, mixed> $config) : mixed
Parameters
- $config : array<string|int, mixed>
Return values
mixed —createLogDriver()
Create an instance of the driver.
protected
createLogDriver(array<string|int, mixed> $config) : Broadcaster
Parameters
- $config : array<string|int, mixed>
Return values
Broadcaster —createNullDriver()
Create an instance of the driver.
protected
createNullDriver(array<string|int, mixed> $config) : Broadcaster
Parameters
- $config : array<string|int, mixed>
Return values
Broadcaster —createPusherDriver()
Create an instance of the driver.
protected
createPusherDriver(array<string|int, mixed> $config) : Broadcaster
Parameters
- $config : array<string|int, mixed>
Return values
Broadcaster —createRedisDriver()
Create an instance of the driver.
protected
createRedisDriver(array<string|int, mixed> $config) : Broadcaster
Parameters
- $config : array<string|int, mixed>
Return values
Broadcaster —get()
Attempt to get the connection from the local cache.
protected
get(string $name) : Broadcaster
Parameters
- $name : string
Return values
Broadcaster —getConfig()
Get the connection configuration.
protected
getConfig(string $name) : array<string|int, mixed>
Parameters
- $name : string
Return values
array<string|int, mixed> —resolve()
Resolve the given store.
protected
resolve(string $name) : Broadcaster
Parameters
- $name : string