Enforces the use of a single connection
@return Client|null
967935
public static function getGuzzleClient()
    {
        if (!isset(self::$guzzleClient) || is_null(self::$guzzleClient)) {
            self::$guzzleClient = new Client(array('timeout' => Config::TIMEOUT, 'connection_timeout' => Config::CONN_TIMEOUT, 'verify' => Config::$IS_LIVE));
        }

        return self::$guzzleClient;
    }
90801
private function getHttpClient()
    {
        if ($httpClient = $this->app->config->get('swap.http_client')) {
            return $this->app[$httpClient];
        }

        return null;
    }
265354
public function getOpenedClient()
    {
        if (!isset($this->openedClient)) {
            $this->openedClient = new \Zend\Http\Client(
                null, [
                    'adapter' => 'Zend\Http\Client\Adapter\Socket',
                    'sslverifypeer' => false,
                ]
            );
        }

        return $this->openedClient;
    }
721575
protected function getClient(): HttpClient
    {
        if ($this->client === null) {
            $this->client = new HttpClient($this->getClientConfig());
        }

        return $this->client;
    }
158560
protected function connection()
	{
		if (empty($this->connection))
		{
			$this->connection = new \SoapClient($this->resource, $this->options);
		}

		return $this->connection;
	}
717390
public function disconnect()
    {
        $this->pgConn = null;
        $this->pendingConnection = true;
        $this->lastActivityTime = null;

        return $this;
    }
1210964
public function disconnect()
    {
        if ($this->socket) {
            $this->push('QUIT');

            fclose($this->socket);

            $this->socket = null;
        }

        return $this;
    }
196957
public function getClient() {
		if ( $this->client === null ) {
			$this->client = $this->newClient();
		}
		return $this->client;
	}
239919
public function getConnection()
    {
        if(!$this->_connection) {
            $this->_connection = new \Guzzle\Http\Client($this->getHost());
        }

        return $this->_connection;
    }
434509
public function connect()
    {
        $this->initialize();

        $riakClient = $this->riakClient;
        return $this->retry(function() use ($riakClient) {
            return $riakClient->connect();
        });
    }
83509
public function disconnect(): self
    {
        if ($this->isConnected()) {
            pg_close($this->resource);
            $this->resource = null;
        }

        return $this;
    }
429462
public function getInternalRequestClient()
	{
		// if we didnt find one lets make one
		if (!$client = $this->findInternalClient())
		{
			if ($this->createInternalRequestClient())
			{
				$client = $this->findInternalClient();
			}
		}

		// return client
		return ($client) ? $client : null;
	}
355771
public function getClient()
    {
        if (!$this->client instanceof Client) {
            $this->client = new Client([
                "cookies" => true
            ]);
        }
        return $this->client;
    }
1204945
public static function resolveConnection() 
    {
        $cls = get_called_class();
        $env = Connection::selectEnvironment();

        if (array_key_exists($cls, self::$_connections) 
            && array_key_exists($env, self::$_connections[$cls])
        ) {
                return self::$_connections[$cls][$env];
        }
        return self::$connection ? self::$connection : Connection::getConnection();
    }
538214
protected function openConnection()
    {
        $this->response = null;
        $this->httpStatus = null;

        if (!$this->connection = curl_init()) {
            throw new ConnectionErrorException('Unable to open connection');
        }

        $this->setConnectionOptions($this->connectionOptions);
        return $this;
    }
932010
protected function client()
    {
        $dsn = $this->config('dsn');
        if (!$dsn) {
            return null;
        }

        $client = new Raven_Client($dsn);
        $callInstall = $this->config('callInstall');
        if ($callInstall === true) {
            $client->install();
        }

        return $client;
    }
1089506
public static function getInstance(): ConnectionManager
	{
		if (self::$instance === NULL)
		{
			self::$instance = new self();
		}

		return self::$instance;
	}