function nusoap_base::contractQname in Salesforce Suite 5
Same name in this branch
- 5 includes/nusoap.php \nusoap_base::contractQname()
- 5 includes/nusoap.orig.php \nusoap_base::contractQname()
Same name and namespace in other branches
- 5.2 includes/nusoap.php \nusoap_base::contractQname()
- 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.php, line 677
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;
}
}