ArrayChannelManager
class ArrayChannelManager implements ChannelManager
Properties
| protected Channel>> | $applications | The underlying array of applications and their channels. |
Methods
Get the channels for an application, optionally filtered by name.
Determine whether the given channel exists for the application.
Find the given channel for the application.
Find the given channel or create it if it doesn't exist.
Get all connections for the given channels.
Find a connection by its socket ID.
Unsubscribe a connection from all channels for the application.
Flush the channel manager repository.
Details
at line 29
ScopedChannelManager
for(Application $application)
Get a scoped channel manager for the given application.
at line 39
Channel|array|null
channels(string $appId, string|null $channel = null)
Get the channels for an application, optionally filtered by name.
at line 53
bool
channelExists(string $appId, string $channel)
Determine whether the given channel exists for the application.
at line 61
Channel|null
findChannel(string $appId, string $channel)
Find the given channel for the application.
at line 72
Channel
findOrCreateChannel(string $appId, string $channelName)
Find the given channel or create it if it doesn't exist.
Note: ChannelCreated event dispatch is handled by Channel::subscribe() via SharedState, not here.
at line 90
array
channelConnections(string $appId, string|null $channel = null)
Get all connections for the given channels.
at line 111
ChannelConnection|null
findConnection(string $appId, string $socketId)
Find a connection by its socket ID.
at line 125
void
unsubscribeFromAllChannels(string $appId, Connection $connection)
Unsubscribe a connection from all channels for the application.
at line 149
void
removeChannel(string $appId, Channel $channel)
Remove the given channel from the application.
Note: ChannelRemoved event dispatch is handled by Channel::unsubscribe() via SharedState, not here.
at line 165
void
flush()
Flush the channel manager repository.