Elastica\Transport\Guzzle::_getGuzzleClient PHP Method

_getGuzzleClient() protected method

Return Guzzle resource.
protected _getGuzzleClient ( string $baseUrl, boolean $persistent = true ) : Client
$baseUrl string
$persistent boolean False if not persistent connection
return GuzzleHttp\Client
    protected function _getGuzzleClient($baseUrl, $persistent = true)
    {
        if (!$persistent || !self::$_guzzleClientConnection) {
            self::$_guzzleClientConnection = new Client(['base_uri' => $baseUrl]);
        }
        return self::$_guzzleClientConnection;
    }