BroadcastPoolProxy
class BroadcastPoolProxy extends PoolProxy implements Broadcaster
Properties
| protected Closure|null | $authenticatedUserCallback | The callback to resolve the authenticated user information. |
Methods
Create a proxy that resolves its current pool per operation.
Invoke a synchronous method on a borrowed object.
Apply this proxy's authenticated-user callback to a borrowed broadcaster.
Resolve the authenticated user payload for the incoming connection request.
Register the user retrieval callback used to authenticate connections.
Register a channel authenticator.
Return the valid authentication response.
Broadcast the given event.
Get all of the registered channels.
Details
in
PoolProxy at line 17
__construct(PoolDefinition $definition, Closure $resolver, Factory $pools, Closure|null $releaseCallback = null)
Create a proxy that resolves its current pool per operation.
in
PoolProxy at line 28
protected ObjectPool
pool()
Resolve the current pool for this proxy's definition.
in
PoolProxy at line 59
protected mixed
invoke(string $method, array $arguments)
Invoke a synchronous method on a borrowed object.
at line 88
protected void
configureBorrowed(object $object)
Apply this proxy's authenticated-user callback to a borrowed broadcaster.
in
PoolProxy at line 90
PoolDefinition
getDefinition()
Get this proxy's immutable pool definition.
in
PoolProxy at line 98
string
getPoolName()
Get this proxy's pool identity.
in
PoolProxy at line 106
bool
invalidatePool()
Remove and close this proxy's current shared pool.
at line 26
array|null
resolveAuthenticatedUser(Request $request)
Resolve the authenticated user payload for the incoming connection request.
at line 37
void
resolveAuthenticatedUserUsing(Closure|null $callback)
Register the user retrieval callback used to authenticate connections.
Boot-only. The callback persists in instance state on the cached pool proxy for the worker lifetime; per-request use races across coroutines.
at line 49
BroadcastPoolProxy
channel(HasBroadcastChannel|string $channel, callable|string $callback, array $options = [])
Register a channel authenticator.
Boot-only. Delegates to the underlying broadcaster; the channel authorizer and options persist in shared static state on the Broadcaster class for the worker lifetime.
at line 56
mixed
auth(Request $request)
Authenticate the incoming request for a given channel.
at line 64
mixed
validAuthenticationResponse(Request $request, mixed $result)
Return the valid authentication response.
at line 72
void
broadcast(array $channels, string $event, array $payload = [])
Broadcast the given event.
at line 80
Collection
getChannels()
Get all of the registered channels.