ScopedChannelManager
class ScopedChannelManager implements ScopedChannelManager
Immutable scoped proxy for the ArrayChannelManager.
Captures the Application and delegates all operations to the underlying manager with the app ID. This is coroutine-safe — each caller gets its own proxy instance with a fixed app scope.
Methods
Create a new scoped channel manager instance.
Get the application instance.
Get all the channels.
Determine whether the given channel exists.
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.
Details
at line 25
__construct(Application $application, ArrayChannelManager $manager)
Create a new scoped channel manager instance.
at line 34
Application
app()
Get the application instance.
at line 44
array
all()
Get all the channels.
at line 52
bool
exists(string $channel)
Determine whether the given channel exists.
at line 60
Channel|null
find(string $channel)
Find the given channel.
at line 68
Channel
findOrCreate(string $channel)
Find the given channel or create it if it doesn't exist.
at line 78
array
connections(string|null $channel = null)
Get all connections for the given channels.
at line 86
ChannelConnection|null
findConnection(string $socketId)
Find a connection by its socket ID.
at line 94
void
unsubscribeFromAll(Connection $connection)
Unsubscribe from all channels.
at line 102
void
remove(Channel $channel)
Remove the given channel.