Predis\Pipeline\Pipeline::getConnection PHP Method

getConnection() protected method

Returns the underlying connection to be used by the pipeline.
protected getConnection ( ) : Predis\Connection\ConnectionInterface
return Predis\Connection\ConnectionInterface
    protected function getConnection()
    {
        $connection = $this->getClient()->getConnection();
        if ($connection instanceof ReplicationInterface) {
            $connection->switchToMaster();
        }
        return $connection;
    }