class Manager

Properties

protected Channel> $channels

Methods

__construct(int $size = 1)

No description

Channel|null
get(int $id, bool $initialize = false)

Get a channel by ID, optionally initializing it if it doesn't exist.

make(int $limit)

Create a new channel with the given capacity.

void
close(int $id)

Close and remove a channel by ID.

array
getChannels()

Get all managed channels.

void
flush()

Close and remove all managed channels.

Details

at line 16
__construct(int $size = 1)

No description

Parameters

int $size

at line 24
Channel|null get(int $id, bool $initialize = false)

Get a channel by ID, optionally initializing it if it doesn't exist.

Parameters

int $id
bool $initialize

Return Value

Channel|null

at line 40
Channel make(int $limit)

Create a new channel with the given capacity.

Parameters

int $limit

Return Value

Channel

at line 48
void close(int $id)

Close and remove a channel by ID.

Parameters

int $id

Return Value

void

at line 62
array getChannels()

Get all managed channels.

Return Value

array

at line 70
void flush()

Close and remove all managed channels.

Return Value

void