Property | Type | Description | |
---|---|---|---|
$delegateProvider | The delegate provider instance. | ||
$topicPrefix | string | The prefix to use when generating topics/. |
Method | Description | |
---|---|---|
__construct ( string $realm, array $providers ) | Constructor. | |
call ( string $procedure, array $arguments = null, array $argumentsKw = null, array $options = null ) : |
Call a registered procedure. | |
getDelegateProvider ( ) : |
Get the delegate provider of this client. | |
getProviders ( ) : array | Get the registered providers. | |
getTopicPrefix ( ) : string | Get the topic prefix. | |
onSessionStart ( |
Called when the server session has started which will call all the providers so that they perform whatever they have to do. | |
publish ( string $topic, array | mixed $arguments = null, array | mixed $argumentsKw = null, array $options = null ) : |
Publish to a topic with the given data. | |
register ( string $topic, Closure $callback, array $options = null, boolean $isFunction = false ) : |
Register a RPC. | |
setDelegateProvider ( |
Set the delegate provider of this client. | |
setTopicPrefix ( string $prefix ) | Set the topic prefix. | |
start ( $debug = false, boolean $startLoop = true ) | Start the transport. | |
subscribe ( string $topic, string | Closur\Closure $callback, array $options = null, boolean $isFunction = false ) : |
Subscribe to a topic and specify a callback for it. | |
wrapWithProxy ( mixed $callback, boolean $isFunction = false ) : Closure | Wrap the given callback with a proxy Closure. |
Method | Description | |
---|---|---|
prepareTopic ( string $topic ) : string | Prepare the topic by prefixing it with @property $prefix as a convenience for having to manually prefix every topic. |
Method | Description | |
---|---|---|
bootProviders ( ) | Boot up the registered providers by calling their boot() method. |
public __construct ( string $realm, array $providers ) | ||
$realm | string | |
$providers | array |
public getDelegateProvider ( ) : |
||
return |
public getProviders ( ) : array | ||
return | array |
public getTopicPrefix ( ) : string | ||
return | string |
public onSessionStart ( |
||
$session | ||
$transport | Thruway\Transport\TransportInterface |
protected prepareTopic ( string $topic ) : string | ||
$topic | string | |
return | string |
public setDelegateProvider ( |
||
$provider |
public setTopicPrefix ( string $prefix ) | ||
$prefix | string |
public subscribe ( string $topic, string | Closur\Closure $callback, array $options = null, boolean $isFunction = false ) : |
||
$topic | string | The topic name. |
$callback | string | Closur\Closure | The callable to be called when the topic received a publish. |
$options | array | Will be passed straight to thruway @see \Thruway\ClientSession::subscribe |
$isFunction | boolean | Specify whether you're passing in a function from a different scope, Set this to TRUE to avoid calling the passed callable from this provider's scope. |
return |
protected Provider,Vinelab\Minion $delegateProvider | ||
return |
protected string $topicPrefix | ||
return | string |