PHP Interface Kraken\Channel\ChannelModelInterface

Inheritance: extends Kraken\Event\EventEmitterInterface
Afficher le fichier Open project: kraken-php/framework Interface Usage Examples

Méthodes publiques

Méthode Description
broadcast ( string[] | string $message ) : bool[] Send broadcast message.
getConnected ( ) : string[] Return array of all connected external channels' IDs.
isConnected ( string $id ) : boolean Check if specific external channel is connected.
isStarted ( ) : boolean Check if channel is started.
isStopped ( ) : boolean Check if channel is stopped.
start ( boolean $blockEvent = false ) : boolean Start Channel.
stop ( boolean $blockEvent = false ) : boolean Stop Channel.
unicast ( string $alias, string[] | string $message, integer $flags ) : boolean Send unicast message.

Method Details

broadcast() public méthode

Send broadcast message.
public broadcast ( string[] | string $message ) : bool[]
$message string[] | string
Résultat bool[]

getConnected() public méthode

Return array of all connected external channels' IDs.
public getConnected ( ) : string[]
Résultat string[]

isConnected() public méthode

Check if specific external channel is connected.
public isConnected ( string $id ) : boolean
$id string
Résultat boolean

isStarted() public méthode

Check if channel is started.
public isStarted ( ) : boolean
Résultat boolean

isStopped() public méthode

Check if channel is stopped.
public isStopped ( ) : boolean
Résultat boolean

start() public méthode

Start Channel.
public start ( boolean $blockEvent = false ) : boolean
$blockEvent boolean
Résultat boolean

stop() public méthode

Stop Channel.
public stop ( boolean $blockEvent = false ) : boolean
$blockEvent boolean
Résultat boolean

unicast() public méthode

Flags might be one of: Channel::MODE_STANDARD - sends message if both sender and receiver are online. Channel::MODE_BUFFER_OFFLINE - works in similar way as MODE_STANDARD, but also enables buffering messages in case that sender is offline. Channel::MODE_BUFFER_ONLINE - works in similar way as MODE_STANDARD, but also enables buffering messages in case that receiver is offline. Channel::MODE_BUFFER - sends message if both sender and receiver are online or buffers it if one of them is offline.
public unicast ( string $alias, string[] | string $message, integer $flags ) : boolean
$alias string
$message string[] | string
$flags integer
Résultat boolean