Channel

This subclass is used for client-to-client communication over MPD

MphpD::channel(string $name) : Channel

Methods

__construct

This class is not intended for direct usage. Use MphpD::channel() instead to retrieve an instance of this class.

Channel::__construct(FloFaber\MphpD\MphpD $mphpd, string $name) : mixed

Parameters

@param \MphpD $mphpd

@param string $name

Returns mixed

subscribe

Subscribe to the channel.

Channel::subscribe() : bool

Parameters

None.

Returns bool

bool

unsubscribe

Unsubscribe the channel.

Channel::unsubscribe() : bool

Parameters

None.

Returns bool

bool

read

Returns a list of the channel's messages.

Channel::read() : mixed

Parameters

None.

Returns mixed

array|false Array containing the messages on success. False otherwise.

send

Send a message to the channel.

Channel::send(string $message) : bool

Parameters

@param string $message

Returns bool

bool

© 2023 Florian Faber