class 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

__construct(Application $application, ArrayChannelManager $manager)

Create a new scoped channel manager instance.

app()

Get the application instance.

array
all()

Get all the channels.

bool
exists(string $channel)

Determine whether the given channel exists.

Channel|null
find(string $channel)

Find the given channel.

findOrCreate(string $channel)

Find the given channel or create it if it doesn't exist.

array
connections(string|null $channel = null)

Get all connections for the given channels.

void
unsubscribeFromAll(Connection $connection)

Unsubscribe from all channels.

void
remove(Channel $channel)

Remove the given channel.

Details

at line 24
__construct(Application $application, ArrayChannelManager $manager)

Create a new scoped channel manager instance.

Parameters

Application $application
ArrayChannelManager $manager

at line 33
Application app()

Get the application instance.

Return Value

Application

at line 43
array all()

Get all the channels.

Return Value

array

at line 51
bool exists(string $channel)

Determine whether the given channel exists.

Parameters

string $channel

Return Value

bool

at line 59
Channel|null find(string $channel)

Find the given channel.

Parameters

string $channel

Return Value

Channel|null

at line 67
Channel findOrCreate(string $channel)

Find the given channel or create it if it doesn't exist.

Parameters

string $channel

Return Value

Channel

at line 77
array connections(string|null $channel = null)

Get all connections for the given channels.

Parameters

string|null $channel

Return Value

array

at line 85
void unsubscribeFromAll(Connection $connection)

Unsubscribe from all channels.

Parameters

Connection $connection

Return Value

void

at line 93
void remove(Channel $channel)

Remove the given channel.

Parameters

Channel $channel

Return Value

void