You are here

function nusoap_base::contractQname in Salesforce Suite 5

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

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

Parameters

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

File

includes/nusoap.orig.php, line 672

Class

nusoap_base
nusoap_base

Code

function contractQname($qname) {

  // get element namespace

  //$this->xdebug("Contract $qname");
  if (strrpos($qname, ':')) {

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

    // get ns
    $ns = substr($qname, 0, strrpos($qname, ':'));
    $p = $this
      ->getPrefixFromNamespace($ns);
    if ($p) {
      return $p . ':' . $name;
    }
    return $qname;
  }
  else {
    return $qname;
  }
}