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])) {
			foreach ($this->schemas as $ns0 => $schema0) {
				if (strcasecmp($ns, $ns0) == 0) {
					$this->debug("in getTypeDef: replacing schema namespace $ns with $ns0");
					$ns = $ns0;
					break;
				}
			}
		}
		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) {
					$this->debug("in getTypeDef: found type $type");
					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'];
							}
						} else {
							$this->debug("did not find type for [element] $type");
						}
					}
					return $t;
				}
			}
			$this->debug("in getTypeDef: did not find type $type");
		} else {
			$this->debug("in getTypeDef: do not have schema for namespace $ns");
		}
		return false;
	}
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])) {
			foreach ($this->schemas as $ns0 => $schema0) {
				if (strcasecmp($ns, $ns0) == 0) {
					$this->debug("in getTypeDef: replacing schema namespace $ns with $ns0");
					$ns = $ns0;
					break;
				}
			}
		}
		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) {
					$this->debug("in getTypeDef: found type $type");
					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'];
							}
						} else {
							$this->debug("did not find type for [element] $type");
						}
					}
					return $t;
				}
			}
			$this->debug("in getTypeDef: did not find type $type");
		} else {
			$this->debug("in getTypeDef: do not have schema for namespace $ns");
		}
		return false;
	}
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 ] ) ) { foreach ( $ this -> schemas as $ ns0 => $ schema0 ) { if ( strcasecmp ( $ ns , $ ns0 ) == 0 ) { $ this -> debug ( "in getTypeDef: replacing schema namespace $ns with $ns0" ) ; $ ns = $ ns0 ; break ; } } } 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 ) { $ this -> debug ( "in getTypeDef: found type $type" ) ; 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' ] ; } } else { $ this -> debug ( "did not find type for [element] $type" ) ; } } return $ t ; } } $ this -> debug ( "in getTypeDef: did not find type $type" ) ; } else { $ this -> debug ( "in getTypeDef: do not have schema for namespace $ns" ) ; } return false ; }
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
)

@param string $type the type
@param string $ns namespace (not prefix) of the type
@return mixed
@access public
@see nusoap_xmlschema
returns an array of information about a given type returns false if no type exists by the given name