original_string: private function parseDbSettings(\DOMNode $db) {
  
  		$context = $this->isLocalhost ? 'local' : 'remote';
  		$xpath = new \DOMXPath($db->ownerDocument);
  
  		$d = $xpath->query("db_connection[@context='$context']", $db);
  		
  		if(!$d->length) {
  			$d = $db->getElementsByTagName('db_connection');
  		}
  
  		if($d->length) {
  			$this->db = new \stdClass();
  
  			foreach($d->item(0)->childNodes as $node) {
  
  				if($node->nodeType !== XML_ELEMENT_NODE) {
  					continue;
  				}
  
  				$v = trim($node->nodeValue);
  				$k = $node->nodeName;
  
  				$this->db->$k = $v;
  
  			}
  		}
  
  	}
code: private function parseDbSettings(\DOMNode $db) {
  
  		$context = $this->isLocalhost ? 'local' : 'remote';
  		$xpath = new \DOMXPath($db->ownerDocument);
  
  		$d = $xpath->query("db_connection[@context='$context']", $db);
  		
  		if(!$d->length) {
  			$d = $db->getElementsByTagName('db_connection');
  		}
  
  		if($d->length) {
  			$this->db = new \stdClass();
  
  			foreach($d->item(0)->childNodes as $node) {
  
  				if($node->nodeType !== XML_ELEMENT_NODE) {
  					continue;
  				}
  
  				$v = trim($node->nodeValue);
  				$k = $node->nodeName;
  
  				$this->db->$k = $v;
  
  			}
  		}
  
  	}
code_tokens: private function parseDbSettings ( \ DOMNode $ db ) { $ context = $ this -> isLocalhost ? 'local' : 'remote' ; $ xpath = new \ DOMXPath ( $ db -> ownerDocument ) ; $ d = $ xpath -> query ( "db_connection[@context='$context']" , $ db ) ; if ( ! $ d -> length ) { $ d = $ db -> getElementsByTagName ( 'db_connection' ) ; } if ( $ d -> length ) { $ this -> db = new \ stdClass ( ) ; foreach ( $ d -> item ( 0 ) -> childNodes as $ node ) { if ( $ node -> nodeType !== XML_ELEMENT_NODE ) { continue ; } $ v = trim ( $ node -> nodeValue ) ; $ k = $ node -> nodeName ; $ this -> db -> $ k = $ v ; } } }
docstring: parse db settings
  
  @deprecated will be replaced by datasource settings
  
  @param DOMNode $db
docstring_tokens: parse db settings