src/Bigcommerce/Api/Client.php
private static function connection()
    {
        if (!self::$connection) {
            self::$connection = new Connection();
            if (self::$client_id) {
                self::$connection->authenticateOauth(self::$client_id, self::$auth_token);
            } else {
                self::$connection->authenticateBasic(self::$username, self::$api_key);
            }
        }

        return self::$connection;
    }
private static function connection()
    {
        if (!self::$connection) {
            self::$connection = new Connection();
            if (self::$client_id) {
                self::$connection->authenticateOauth(self::$client_id, self::$auth_token);
            } else {
                self::$connection->authenticateBasic(self::$username, self::$api_key);
            }
        }

        return self::$connection;
    }
private static function connection ( ) { if ( ! self :: $ connection ) { self :: $ connection = new Connection ( ) ; if ( self :: $ client_id ) { self :: $ connection -> authenticateOauth ( self :: $ client_id , self :: $ auth_token ) ; } else { self :: $ connection -> authenticateBasic ( self :: $ username , self :: $ api_key ) ; } } return self :: $ connection ; }
Get an instance of the HTTP connection object. Initializes
the connection if it is not already active.

@return Connection
Get an instance of the HTTP connection object . Initializes the connection if it is not already active .