You are here

function nusoap_base::expandQname in Salesforce Suite 5.2

Same name in this branch
  1. 5.2 includes/nusoap.php \nusoap_base::expandQname()
  2. 5.2 includes/nusoap.orig.php \nusoap_base::expandQname()
Same name and namespace in other branches
  1. 5 includes/nusoap.php \nusoap_base::expandQname()
  2. 5 includes/nusoap.orig.php \nusoap_base::expandQname()

* expands (changes prefix to namespace) a qualified name * *

Parameters

string $string qname: * @return string expanded qname * @access private

File

includes/nusoap.php, line 702

Class

nusoap_base
nusoap_base

Code

function expandQname($qname) {

  // get element prefix
  if (strpos($qname, ':') && !ereg('^http://', $qname)) {

    // get unqualified name
    $name = substr(strstr($qname, ':'), 1);

    // get ns prefix
    $prefix = substr($qname, 0, strpos($qname, ':'));
    if (isset($this->namespaces[$prefix])) {
      return $this->namespaces[$prefix] . ':' . $name;
    }
    else {
      return $qname;
    }
  }
  else {
    return $qname;
  }
}