original_string: public function get($id)
      {
          if (isset($this->connections[$id])) {
              return $this->connections[$id];
          }
  
          if (!isset($this->config[$id])) {
              throw new JAQBException('No configuration or connection has been supplied for the ID "'.$id.'".');
          }
  
          $this->connections[$id] = $this->buildFromConfig($this->config[$id], $id);
  
          return $this->connections[$id];
      }
code: public function get($id)
      {
          if (isset($this->connections[$id])) {
              return $this->connections[$id];
          }
  
          if (!isset($this->config[$id])) {
              throw new JAQBException('No configuration or connection has been supplied for the ID "'.$id.'".');
          }
  
          $this->connections[$id] = $this->buildFromConfig($this->config[$id], $id);
  
          return $this->connections[$id];
      }
code_tokens: public function get ( $ id ) { if ( isset ( $ this -> connections [ $ id ] ) ) { return $ this -> connections [ $ id ] ; } if ( ! isset ( $ this -> config [ $ id ] ) ) { throw new JAQBException ( 'No configuration or connection has been supplied for the ID "' . $ id . '".' ) ; } $ this -> connections [ $ id ] = $ this -> buildFromConfig ( $ this -> config [ $ id ] , $ id ) ; return $ this -> connections [ $ id ] ; }
docstring: Gets a database connection by ID.
  
  @param string $id
  
  @throws JAQBException if the connection does not exist
  
  @return QueryBuilder
docstring_tokens: Gets a database connection by ID .