Predis\PubSub\Consumer::getClient PHP Method

getClient() public method

Returns the underlying client instance used by the pub/sub iterator.
public getClient ( ) : Predis\ClientInterface
return Predis\ClientInterface
    public function getClient()
    {
        return $this->client;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * @group disconnected
  */
 public function testGetUnderlyingClientInstance()
 {
     $connection = $this->getMock('Predis\\Connection\\NodeConnectionInterface');
     $client = new Client($connection);
     $pubsub = new PubSubConsumer($client);
     $this->assertSame($client, $pubsub->getClient());
 }