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.
Unsubscribe a connection from all channels for the application.
Flush the channel manager repository.
Details
at line 28
ScopedChannelManager
for(Application $application)
Get a scoped channel manager for the given application.
at line 38
Channel|array|null
channels(string $appId, string|null $channel = null)
Get the channels for an application, optionally filtered by name.
at line 52
bool
channelExists(string $appId, string $channel)
Determine whether the given channel exists for the application.
at line 60
Channel|null
findChannel(string $appId, string $channel)
Find the given channel for the application.
at line 71
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 89
array
channelConnections(string $appId, string|null $channel = null)
Get all connections for the given channels.
at line 101
void
unsubscribeFromAllChannels(string $appId, Connection $connection)
Unsubscribe a connection from all channels for the application.
at line 114
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 122
void
flush()
Flush the channel manager repository.