You are here

function nusoap_base::getPrefixFromNamespace in Salesforce Suite 5.2

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

returns the prefix for a given namespace (or prefix) or false if no prefixes registered for the given namespace

@access public

Parameters

string $ns The namespace:

Return value

mixed The prefix, false if the namespace has no prefixes

2 calls to nusoap_base::getPrefixFromNamespace()
nusoap_base::contractQname in includes/nusoap.php
* contracts (changes namespace to prefix) a qualified name * *
nusoap_base::contractQname in includes/nusoap.orig.php
* contracts (changes namespace to prefix) a qualified name * *

File

includes/nusoap.orig.php, line 770

Class

nusoap_base
nusoap_base

Code

function getPrefixFromNamespace($ns) {
  foreach ($this->namespaces as $p => $n) {
    if ($ns == $n || $ns == $p) {
      $this->usedNamespaces[$p] = $n;
      return $p;
    }
  }
  return false;
}