original_string: public function connect(array $config)
      {
          $connection = $this->createConnection($config);
  
          $this->validateCredentials($config);
  
          // For basic authentication we need an Authorization
          // header to be set. We add it to the request here.
          $this->addHeader(
              'Authorization',
              'Basic ' . base64_encode(
                  array_get($config, 'identifier') . ':' . array_get($config, 'secret')
              )
          );
  
          return $connection;
      }
code: public function connect(array $config)
      {
          $connection = $this->createConnection($config);
  
          $this->validateCredentials($config);
  
          // For basic authentication we need an Authorization
          // header to be set. We add it to the request here.
          $this->addHeader(
              'Authorization',
              'Basic ' . base64_encode(
                  array_get($config, 'identifier') . ':' . array_get($config, 'secret')
              )
          );
  
          return $connection;
      }
code_tokens: public function connect ( array $ config ) { $ connection = $ this -> createConnection ( $ config ) ; $ this -> validateCredentials ( $ config ) ; // For basic authentication we need an Authorization // header to be set. We add it to the request here. $ this -> addHeader ( 'Authorization' , 'Basic ' . base64_encode ( array_get ( $ config , 'identifier' ) . ':' . array_get ( $ config , 'secret' ) ) ) ; return $ connection ; }
docstring: Establish an API connection.
  
  @param  array  $config
  @return self
docstring_tokens: Establish an API connection .