PHP Interface Clue\React\Redis\Client

Inheritance: extends Evenement\EventEmitterInterface
Show file Open project: clue/redis-react Interface Usage Examples

Public Methods

Method Description
__call ( string $name, string[] $args ) : React\Promise\PromiseInterface Invoke the given command and return a Promise that will be resolved when the request has been replied to
close ( ) close connection immediately
end ( ) end connection once all pending requests have been replied to
isBusy ( ) : boolean Checks if the client is busy, i.e. still has any requests pending

Method Details

__call() public method

This is a magic method that will be invoked when calling any redis command on this instance.
public __call ( string $name, string[] $args ) : React\Promise\PromiseInterface
$name string
$args string[]
return React\Promise\PromiseInterface Promise

close() public method

This will emit the "close" event.
See also: self::end() for closing the connection once the client is idle
public close ( )

end() public method

end connection once all pending requests have been replied to
See also: self::close() for closing the connection immediately
public end ( )

isBusy() public method

Checks if the client is busy, i.e. still has any requests pending
public isBusy ( ) : boolean
return boolean