PHP Class Vinelab\Minion\Provider

Author: Abed Halawi ([email protected])
Datei anzeigen Open project: vinelab/minion

Protected Properties

Property Type Description
$prefix string The topic prefix.

Public Methods

Method Description
__call ( string $name, array $arguments ) : string Override to redirect non-existing calls to the client.
__construct ( Client $client ) Constructor.
boot ( ) Boot this provider. This is the best place to have your subscriptions/registrations for your RPCs and PubSub.
publish ( string $topic, array | mixed $arguments = null, array | mixed $argumentsKw = null, array $options = null ) : Promise Publish to a topic with the given data.

Protected Methods

Method Description
getClient ( ) : Client Get the client instance.

Private Methods

Method Description
setClient ( Client $client ) Set the client instance.

Method Details

__call() public method

This allows calling client methods directly from the provider which is useful when passing the Client to a registered Closure.
public __call ( string $name, array $arguments ) : string
$name string
$arguments array
return string

__construct() public method

Constructor.
public __construct ( Client $client )
$client Client

boot() abstract public method

Boot this provider. This is the best place to have your subscriptions/registrations for your RPCs and PubSub.
abstract public boot ( )

getClient() protected method

Get the client instance.
protected getClient ( ) : Client
return Client

publish() public method

Publish to a topic with the given data.
public publish ( string $topic, array | mixed $arguments = null, array | mixed $argumentsKw = null, array $options = null ) : Promise
$topic string
$arguments array | mixed
$argumentsKw array | mixed
$options array
return React\Promise\Promise

Property Details

$prefix protected_oe property

The topic prefix.
protected string $prefix
return string