PHP Interface Bravo3\Orm\Drivers\PubSubDriverInterface

Exibir arquivo Open project: bravo3/orm Interface Usage Examples

Public Methods

Method Description
getChannelPrefix ( ) : string Return the PubSub messaging channel prefix used in the underlying database driver.
isPubSubSupported ( ) : boolean Confirm that the driver supports Pub/Sub messaging.
listenToPubSub ( callable $callback ) : void Start listening to subscribed channels of the database (if PubSub is supported)
publishMessage ( string $channel, string $message ) : integer Publishes a message to the configured channel. Channel and Message length is limited based on the driver used.
setChannelPrefix ( string $prefix ) : Bravo3\Orm\Drivers\PubSubDriverInterface Sets the PubSub messaging channel prefix used in the underlying database driver.

Method Details

getChannelPrefix() public method

Return the PubSub messaging channel prefix used in the underlying database driver.
public getChannelPrefix ( ) : string
return string

isPubSubSupported() public method

Confirm that the driver supports Pub/Sub messaging.
public isPubSubSupported ( ) : boolean
return boolean

listenToPubSub() public method

Start listening to subscribed channels of the database (if PubSub is supported)
public listenToPubSub ( callable $callback ) : void
$callback callable
return void

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

setChannelPrefix() public method

Sets the PubSub messaging channel prefix used in the underlying database driver.
public setChannelPrefix ( string $prefix ) : Bravo3\Orm\Drivers\PubSubDriverInterface
$prefix string
return Bravo3\Orm\Drivers\PubSubDriverInterface