Bravo3\Orm\Drivers\PubSubDriverInterface::publishMessage PHP Method

publishMessage() public method

Publishes a message to the configured channel. Channel and Message length is limited based on the driver used.
public publishMessage ( string $channel, string $message ) : integer
$channel string
$message string
return integer
    public function publishMessage($channel, $message);

Usage Example

Beispiel #1
0
 /**
  * Publishes a message to the configured channel. Channel and Message length is limited based on the driver used.
  * Returns true on success of delivery of the message, or false on failure.
  * Usually a message delivery fails if there are not subscribed clients for the channel.
  *
  * @param string $channel
  * @param string $message
  * @return bool
  */
 public function publish($channel, $message)
 {
     return (bool) $this->driver->publishMessage($channel, $message);
 }