Свойство | Type | Description | |
---|---|---|---|
$driver | Bravo3\Orm\Drivers\PubSubDriverInterface | ||
$event_dispatcher |
Méthode | Description | |
---|---|---|
__construct ( Bravo3\Orm\Drivers\PubSubDriverInterface $driver ) | ||
addListener ( string $channel, callable $callback, integer $priority ) : |
Add a callback to a channel which will get triggered when channel receives a message via a publisher. | |
eventTrigger ( array $payload ) : |
Function triggers PubSub events based on the messages received on subscribed channels. | |
publish ( string $channel, string $message ) : boolean | Publishes a message to the configured channel. Channel and Message length is limited based on the driver used. | |
removeListener ( string $channel, callable $callback ) : |
Removes the callbacks assigned to database driver PubSub mechanism. | |
run ( ) : void |
Méthode | Description | |
---|---|---|
generateEventName ( $channel ) : string | Returns the event name with the prefix prepended. |
public __construct ( Bravo3\Orm\Drivers\PubSubDriverInterface $driver ) | ||
$driver | Bravo3\Orm\Drivers\PubSubDriverInterface |
public eventTrigger ( array $payload ) : |
||
$payload | array | |
Résultat |
public removeListener ( string $channel, callable $callback ) : |
||
$channel | string | |
$callback | callable | |
Résultat |
protected PubSubDriverInterface,Bravo3\Orm\Drivers $driver | ||
Résultat | Bravo3\Orm\Drivers\PubSubDriverInterface |