function wsdl::getTypeDef in Salesforce Suite 5.2
Same name in this branch
- 5.2 includes/nusoap.php \wsdl::getTypeDef()
- 5.2 includes/nusoap.orig.php \wsdl::getTypeDef()
Same name and namespace in other branches
- 5 includes/nusoap.php \wsdl::getTypeDef()
- 5 includes/nusoap.orig.php \wsdl::getTypeDef()
returns an array of information about a given type returns false if no type exists by the given name
* typeDef = array( * 'elements' => array(), // refs to elements array * 'restrictionBase' => '', * 'phpType' => '', * 'order' => '(sequence|all)', * 'attrs' => array() // refs to attributes array * )
@access public
Parameters
$type string the type:
$ns string namespace (not prefix) of the type:
Return value
mixed
See also
xmlschema
8 calls to wsdl::getTypeDef()
- wsdl::serialize in includes/
nusoap.php - * serialize the parsed wsdl * *
- wsdl::serialize in includes/
nusoap.orig.php - * serialize the parsed wsdl * *
- wsdl::serializeComplexTypeAttributes in includes/
nusoap.php - * serializes the attributes for a complexType * *
- wsdl::serializeComplexTypeAttributes in includes/
nusoap.orig.php - * serializes the attributes for a complexType * *
- wsdl::serializeComplexTypeElements in includes/
nusoap.php - * serializes the elements for a complexType * *
File
- includes/
nusoap.orig.php, line 4689
Class
- wsdl
- parses a WSDL file, allows access to it's data, other utility methods
Code
function getTypeDef($type, $ns) {
$this
->debug("in getTypeDef: type={$type}, ns={$ns}");
if (!$ns && isset($this->namespaces['tns'])) {
$ns = $this->namespaces['tns'];
$this
->debug("in getTypeDef: type namespace forced to {$ns}");
}
if (isset($this->schemas[$ns])) {
$this
->debug("in getTypeDef: have schema for namespace {$ns}");
for ($i = 0; $i < count($this->schemas[$ns]); $i++) {
$xs =& $this->schemas[$ns][$i];
$t = $xs
->getTypeDef($type);
$this
->appendDebug($xs
->getDebug());
$xs
->clearDebug();
if ($t) {
if (!isset($t['phpType'])) {
// get info for type to tack onto the element
$uqType = substr($t['type'], strrpos($t['type'], ':') + 1);
$ns = substr($t['type'], 0, strrpos($t['type'], ':'));
$etype = $this
->getTypeDef($uqType, $ns);
if ($etype) {
$this
->debug("found type for [element] {$type}:");
$this
->debug($this
->varDump($etype));
if (isset($etype['phpType'])) {
$t['phpType'] = $etype['phpType'];
}
if (isset($etype['elements'])) {
$t['elements'] = $etype['elements'];
}
if (isset($etype['attrs'])) {
$t['attrs'] = $etype['attrs'];
}
}
}
return $t;
}
}
}
else {
$this
->debug("in getTypeDef: do not have schema for namespace {$ns}");
}
return false;
}