ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
nusoap_xmlschema Class Reference

parses an XML Schema, allows access to it's data, other utility methods. More...

+ Inheritance diagram for nusoap_xmlschema:
+ Collaboration diagram for nusoap_xmlschema:

Public Member Functions

 __construct ($schema='', $xml='', $namespaces=array())
 constructor More...
 
 parseFile ($xml, $type)
 parse an XML file More...
 
 parseString ($xml, $type)
 parse an XML string More...
 
 CreateTypeName ($ename)
 gets a type name for an unnamed type More...
 
 schemaStartElement ($parser, $name, $attrs)
 start-element handler More...
 
 schemaEndElement ($parser, $name)
 end-element handler More...
 
 schemaCharacterData ($parser, $data)
 element content handler More...
 
 serializeSchema ()
 serialize the schema More...
 
 xdebug ($string)
 adds debug data to the clas level debug string More...
 
 getPHPType ($type, $ns)
 get the PHP type of a user defined type in the schema PHP type is kind of a misnomer since it actually returns 'struct' for assoc. More...
 
 getTypeDef ($type)
 returns an associative array of information about a given type returns false if no type exists by the given name More...
 
 serializeTypeDef ($type)
 returns a sample serialization of a given type, or false if no type by the given name More...
 
 typeToForm ($name, $type)
 returns HTML form elements that allow a user to enter values for creating an instance of the given type. More...
 
 addComplexType ($name, $typeClass='complexType', $phpType='array', $compositor='', $restrictionBase='', $elements=array(), $attrs=array(), $arrayType='')
 adds a complex type to the schema More...
 
 addSimpleType ($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array())
 adds a simple type to the schema More...
 
 addElement ($attrs)
 adds an element to the schema More...
 
- Public Member Functions inherited from nusoap_base
 __construct ()
 constructor More...
 
 getGlobalDebugLevel ()
 gets the global debug level, which applies to future instances More...
 
 setGlobalDebugLevel ($level)
 sets the global debug level, which applies to future instances More...
 
 getDebugLevel ()
 gets the debug level for this instance More...
 
 setDebugLevel ($level)
 sets the debug level for this instance More...
 
 debug ($string)
 adds debug data to the instance debug string with formatting More...
 
 appendDebug ($string)
 adds debug data to the instance debug string without formatting More...
 
 clearDebug ()
 clears the current debug data for this instance More...
 
getDebug ()
 gets the current debug data for this instance More...
 
getDebugAsXMLComment ()
 gets the current debug data for this instance as an XML comment this may change the contents of the debug data More...
 
 expandEntities ($val)
 expands entities, e.g. More...
 
 getError ()
 returns error string if present More...
 
 setError ($str)
 sets error string More...
 
 isArraySimpleOrStruct ($val)
 detect if array is a simple array or a struct (associative array) More...
 
 serialize_val ($val, $name=false, $type=false, $name_ns=false, $type_ns=false, $attributes=false, $use='encoded', $soapval=false)
 serializes PHP values in accordance w/ section 5. More...
 
 serializeEnvelope ($body, $headers=false, $namespaces=array(), $style='rpc', $use='encoded', $encodingStyle='http://schemas.xmlsoap.org/soap/encoding/')
 serializes a message More...
 
 formatDump ($str)
 formats a string to be inserted into an HTML stream More...
 
 contractQname ($qname)
 contracts (changes namespace to prefix) a qualified name More...
 
 expandQname ($qname)
 expands (changes prefix to namespace) a qualified name More...
 
 getLocalPart ($str)
 returns the local part of a prefixed string returns the original string, if not prefixed More...
 
 getPrefix ($str)
 returns the prefix part of a prefixed string returns false, if not prefixed More...
 
 getNamespaceFromPrefix ($prefix)
 pass it a prefix, it returns a namespace More...
 
 getPrefixFromNamespace ($ns)
 returns the prefix for a given namespace (or prefix) or false if no prefixes registered for the given namespace More...
 
 getmicrotime ()
 returns the time in ODBC canonical form with microseconds More...
 
 varDump ($data)
 Returns a string with the output of var_dump. More...
 
 __toString ()
 represents the object as a string More...
 

Data Fields

 $schema = ''
 
 $xml = ''
 
 $enclosingNamespaces
 
 $schemaInfo = array()
 
 $schemaTargetNamespace = ''
 
 $attributes = array()
 
 $complexTypes = array()
 
 $complexTypeStack = array()
 
 $currentComplexType = null
 
 $elements = array()
 
 $elementStack = array()
 
 $currentElement = null
 
 $simpleTypes = array()
 
 $simpleTypeStack = array()
 
 $currentSimpleType = null
 
 $imports = array()
 
 $parser
 
 $position = 0
 
 $depth = 0
 
 $depth_array = array()
 
 $message = array()
 
 $defaultNamespace = array()
 
- Data Fields inherited from nusoap_base
 $title = 'NuSOAP'
 
 $version = '0.7.3'
 
 $revision = '$Revision$'
 
 $error_str = ''
 
 $debug_str = ''
 
 $charencoding = true
 
 $debugLevel
 
 $XMLSchemaVersion = 'http://www.w3.org/2001/XMLSchema'
 
 $soap_defencoding = 'UTF-8'
 
 $namespaces
 
 $usedNamespaces = array()
 
 $typemap
 
 $xmlEntities
 

Detailed Description

parses an XML Schema, allows access to it's data, other utility methods.

imperfect, no validation... yet, but quite functional.

Author
Dietrich Ayala dietr.nosp@m.ich@.nosp@m.ganx4.nosp@m..com
Scott Nichol snich.nosp@m.ol@u.nosp@m.sers..nosp@m.sour.nosp@m.cefor.nosp@m.ge.n.nosp@m.et
Version
$Id$ public

Definition at line 1127 of file nusoap.php.

Constructor & Destructor Documentation

◆ __construct()

nusoap_xmlschema::__construct (   $schema = '',
  $xml = '',
  $namespaces = array() 
)

constructor

Parameters
string$schemaschema document URI
string$xmlxml document URI
string$namespacesnamespaces defined in enclosing XML public

Definition at line 1166 of file nusoap.php.

References nusoap_base\$namespaces, $xml, ILIAS\GlobalScreen\Provider\__construct(), and nusoap_base\debug().

1167  {
1169  $this->debug('nusoap_xmlschema class instantiated, inside constructor');
1170  // files
1171  $this->schema = $schema;
1172  $this->xml = $xml;
1173 
1174  // namespaces
1175  $this->enclosingNamespaces = $namespaces;
1176  $this->namespaces = array_merge($this->namespaces, $namespaces);
1177 
1178  // parse schema file
1179  if ($schema != '') {
1180  $this->debug('initial schema file: ' . $schema);
1181  $this->parseFile($schema, 'schema');
1182  }
1183 
1184  // parse xml file
1185  if ($xml != '') {
1186  $this->debug('initial xml file: ' . $xml);
1187  $this->parseFile($xml, 'xml');
1188  }
1189  }
parseFile($xml, $type)
parse an XML file
Definition: nusoap.php:1199
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ addComplexType()

nusoap_xmlschema::addComplexType (   $name,
  $typeClass = 'complexType',
  $phpType = 'array',
  $compositor = '',
  $restrictionBase = '',
  $elements = array(),
  $attrs = array(),
  $arrayType = '' 
)

adds a complex type to the schema

example: array

addType( 'ArrayOfstring', 'complexType', 'array', '', 'SOAP-ENC:Array', array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'string[]'), 'xsd:string' );

example: PHP associative array ( SOAP Struct )

addType( 'SOAPStruct', 'complexType', 'struct', 'all', array('myVar'=> array('name'=>'myVar','type'=>'string') );

Parameters
name
typeClass(complexType|simpleType|attribute)
phpTypecurrently supported are array and struct (php assoc array)
compositor(all|sequence|choice)
restrictionBasenamespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array)
elements= array ( name = array(name=>'',type=>'') )
attrs= array( array( 'ref' => "http://schemas.xmlsoap.org/soap/encoding/:arrayType", "http://schemas.xmlsoap.org/wsdl/:arrayType" => "string[]" ) )
arrayTypenamespace:name (http://www.w3.org/2001/XMLSchema:string) public
See also
getTypeDef

Definition at line 1995 of file nusoap.php.

References $name, nusoap_base\appendDebug(), and nusoap_base\varDump().

1996  {
1997  $this->complexTypes[$name] = array(
1998  'name' => $name,
1999  'typeClass' => $typeClass,
2000  'phpType' => $phpType,
2001  'compositor'=> $compositor,
2002  'restrictionBase' => $restrictionBase,
2003  'elements' => $elements,
2004  'attrs' => $attrs,
2005  'arrayType' => $arrayType
2006  );
2007 
2008  $this->xdebug("addComplexType $name:");
2009  $this->appendDebug($this->varDump($this->complexTypes[$name]));
2010  }
appendDebug($string)
adds debug data to the instance debug string without formatting
Definition: nusoap.php:305
xdebug($string)
adds debug data to the clas level debug string
Definition: nusoap.php:1757
if($format !==null) $name
Definition: metadata.php:247
varDump($data)
Returns a string with the output of var_dump.
Definition: nusoap.php:909
+ Here is the call graph for this function:

◆ addElement()

nusoap_xmlschema::addElement (   $attrs)

adds an element to the schema

Parameters
array$attrsattributes that must include name and type
See also
nusoap_xmlschema public

Definition at line 2045 of file nusoap.php.

References nusoap_base\appendDebug(), nusoap_base\getPrefix(), and nusoap_base\varDump().

2046  {
2047  if (! $this->getPrefix($attrs['type'])) {
2048  $attrs['type'] = $this->schemaTargetNamespace . ':' . $attrs['type'];
2049  }
2050  $this->elements[ $attrs['name'] ] = $attrs;
2051  $this->elements[ $attrs['name'] ]['typeClass'] = 'element';
2052 
2053  $this->xdebug("addElement " . $attrs['name']);
2054  $this->appendDebug($this->varDump($this->elements[ $attrs['name'] ]));
2055  }
appendDebug($string)
adds debug data to the instance debug string without formatting
Definition: nusoap.php:305
xdebug($string)
adds debug data to the clas level debug string
Definition: nusoap.php:1757
varDump($data)
Returns a string with the output of var_dump.
Definition: nusoap.php:909
getPrefix($str)
returns the prefix part of a prefixed string returns false, if not prefixed
Definition: nusoap.php:839
+ Here is the call graph for this function:

◆ addSimpleType()

nusoap_xmlschema::addSimpleType (   $name,
  $restrictionBase = '',
  $typeClass = 'simpleType',
  $phpType = 'scalar',
  $enumeration = array() 
)

adds a simple type to the schema

Parameters
string$name
string$restrictionBasenamespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array)
string$typeClass(should always be simpleType)
string$phpType(should always be scalar)
array$enumerationarray of values public
See also
nusoap_xmlschema
getTypeDef

Definition at line 2024 of file nusoap.php.

References $name, nusoap_base\appendDebug(), and nusoap_base\varDump().

2025  {
2026  $this->simpleTypes[$name] = array(
2027  'name' => $name,
2028  'typeClass' => $typeClass,
2029  'phpType' => $phpType,
2030  'type' => $restrictionBase,
2031  'enumeration' => $enumeration
2032  );
2033 
2034  $this->xdebug("addSimpleType $name:");
2035  $this->appendDebug($this->varDump($this->simpleTypes[$name]));
2036  }
appendDebug($string)
adds debug data to the instance debug string without formatting
Definition: nusoap.php:305
xdebug($string)
adds debug data to the clas level debug string
Definition: nusoap.php:1757
if($format !==null) $name
Definition: metadata.php:247
varDump($data)
Returns a string with the output of var_dump.
Definition: nusoap.php:909
+ Here is the call graph for this function:

◆ CreateTypeName()

nusoap_xmlschema::CreateTypeName (   $ename)

gets a type name for an unnamed type

Parameters
stringElement name
Returns
string A type name for an unnamed type private

Definition at line 1275 of file nusoap.php.

References $i, and $scope.

1276  {
1277  $scope = '';
1278  for ($i = 0; $i < count($this->complexTypeStack); $i++) {
1279  $scope .= $this->complexTypeStack[$i] . '_';
1280  }
1281  return $scope . $ename . '_ContainedType';
1282  }
$scope
Definition: ltiregstart.php:53
$i
Definition: metadata.php:41

◆ getPHPType()

nusoap_xmlschema::getPHPType (   $type,
  $ns 
)

get the PHP type of a user defined type in the schema PHP type is kind of a misnomer since it actually returns 'struct' for assoc.

arrays returns false if no type exists, or not w/ the given namespace else returns a string that is either a native php type, or 'struct'

Parameters
string$typename of defined type
string$nsnamespace of type
Returns
mixed public
Deprecated:

Definition at line 1774 of file nusoap.php.

References $type.

1775  {
1776  if (isset($this->typemap[$ns][$type])) {
1777  //print "found type '$type' and ns $ns in typemap<br>";
1778  return $this->typemap[$ns][$type];
1779  } elseif (isset($this->complexTypes[$type])) {
1780  //print "getting type '$type' and ns $ns from complexTypes array<br>";
1781  return $this->complexTypes[$type]['phpType'];
1782  }
1783  return false;
1784  }
$type

◆ getTypeDef()

nusoap_xmlschema::getTypeDef (   $type)

returns an associative array of information about a given type returns false if no type exists by the given name

For a complexType typeDef = array( 'restrictionBase' => '', 'phpType' => '', 'compositor' => '(sequence|all)', 'elements' => array(), // refs to elements array 'attrs' => array() // refs to attributes array ... and so on (see addComplexType) )

For simpleType or element, the array has different keys.

Parameters
string$type
Returns
mixed public
See also
addComplexType
addSimpleType
addElement

Definition at line 1808 of file nusoap.php.

References $type, and nusoap_base\varDump().

1809  {
1810  //$this->debug("in getTypeDef for type $type");
1811  if (substr($type, -1) == '^') {
1812  $is_element = 1;
1813  $type = substr($type, 0, -1);
1814  } else {
1815  $is_element = 0;
1816  }
1817 
1818  if ((! $is_element) && isset($this->complexTypes[$type])) {
1819  $this->xdebug("in getTypeDef, found complexType $type");
1820  return $this->complexTypes[$type];
1821  } elseif ((! $is_element) && isset($this->simpleTypes[$type])) {
1822  $this->xdebug("in getTypeDef, found simpleType $type");
1823  if (!isset($this->simpleTypes[$type]['phpType'])) {
1824  // get info for type to tack onto the simple type
1825  // TODO: can this ever really apply (i.e. what is a simpleType really?)
1826  $uqType = substr($this->simpleTypes[$type]['type'], strrpos($this->simpleTypes[$type]['type'], ':') + 1);
1827  $ns = substr($this->simpleTypes[$type]['type'], 0, strrpos($this->simpleTypes[$type]['type'], ':'));
1828  $etype = $this->getTypeDef($uqType);
1829  if ($etype) {
1830  $this->xdebug("in getTypeDef, found type for simpleType $type:");
1831  $this->xdebug($this->varDump($etype));
1832  if (isset($etype['phpType'])) {
1833  $this->simpleTypes[$type]['phpType'] = $etype['phpType'];
1834  }
1835  if (isset($etype['elements'])) {
1836  $this->simpleTypes[$type]['elements'] = $etype['elements'];
1837  }
1838  }
1839  }
1840  return $this->simpleTypes[$type];
1841  } elseif (isset($this->elements[$type])) {
1842  $this->xdebug("in getTypeDef, found element $type");
1843  if (!isset($this->elements[$type]['phpType'])) {
1844  // get info for type to tack onto the element
1845  $uqType = substr($this->elements[$type]['type'], strrpos($this->elements[$type]['type'], ':') + 1);
1846  $ns = substr($this->elements[$type]['type'], 0, strrpos($this->elements[$type]['type'], ':'));
1847  $etype = $this->getTypeDef($uqType);
1848  if ($etype) {
1849  $this->xdebug("in getTypeDef, found type for element $type:");
1850  $this->xdebug($this->varDump($etype));
1851  if (isset($etype['phpType'])) {
1852  $this->elements[$type]['phpType'] = $etype['phpType'];
1853  }
1854  if (isset($etype['elements'])) {
1855  $this->elements[$type]['elements'] = $etype['elements'];
1856  }
1857  } elseif ($ns == 'http://www.w3.org/2001/XMLSchema') {
1858  $this->xdebug("in getTypeDef, element $type is an XSD type");
1859  $this->elements[$type]['phpType'] = 'scalar';
1860  }
1861  }
1862  return $this->elements[$type];
1863  } elseif (isset($this->attributes[$type])) {
1864  $this->xdebug("in getTypeDef, found attribute $type");
1865  return $this->attributes[$type];
1866  } elseif (preg_match('/_ContainedType$/', $type)) {
1867  $this->xdebug("in getTypeDef, have an untyped element $type");
1868  $typeDef['typeClass'] = 'simpleType';
1869  $typeDef['phpType'] = 'scalar';
1870  $typeDef['type'] = 'http://www.w3.org/2001/XMLSchema:string';
1871  return $typeDef;
1872  }
1873  $this->xdebug("in getTypeDef, did not find $type");
1874  return false;
1875  }
$type
getTypeDef($type)
returns an associative array of information about a given type returns false if no type exists by the...
Definition: nusoap.php:1808
xdebug($string)
adds debug data to the clas level debug string
Definition: nusoap.php:1757
varDump($data)
Returns a string with the output of var_dump.
Definition: nusoap.php:909
+ Here is the call graph for this function:

◆ parseFile()

nusoap_xmlschema::parseFile (   $xml,
  $type 
)

parse an XML file

Parameters
string$xmlpath/URL to XML file
string$type(schema | xml)
Returns
boolean public

Definition at line 1199 of file nusoap.php.

References $type, $xml, nusoap_base\debug(), and nusoap_base\setError().

1200  {
1201  // parse xml file
1202  if ($xml != "") {
1203  $xmlStr = @join("", @file($xml));
1204  if ($xmlStr == "") {
1205  $msg = 'Error reading XML from ' . $xml;
1206  $this->setError($msg);
1207  $this->debug($msg);
1208  return false;
1209  } else {
1210  $this->debug("parsing $xml");
1211  $this->parseString($xmlStr, $type);
1212  $this->debug("done parsing $xml");
1213  return true;
1214  }
1215  }
1216  return false;
1217  }
setError($str)
sets error string
Definition: nusoap.php:395
parseString($xml, $type)
parse an XML string
Definition: nusoap.php:1226
$type
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
+ Here is the call graph for this function:

◆ parseString()

nusoap_xmlschema::parseString (   $xml,
  $type 
)

parse an XML string

Parameters
string$xmlpath or URL
string$type(schema|xml) private

Definition at line 1226 of file nusoap.php.

References $type, $xml, nusoap_base\debug(), and nusoap_base\setError().

1227  {
1228  // parse xml string
1229  if ($xml != "") {
1230 
1231  // Create an XML parser.
1232  $this->parser = xml_parser_create();
1233  // Set the options for parsing the XML data.
1234  xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0);
1235 
1236  // Set the object for the parser.
1237  xml_set_object($this->parser, $this);
1238 
1239  // Set the element handlers for the parser.
1240  if ($type == "schema") {
1241  xml_set_element_handler($this->parser, 'schemaStartElement', 'schemaEndElement');
1242  xml_set_character_data_handler($this->parser, 'schemaCharacterData');
1243  } elseif ($type == "xml") {
1244  xml_set_element_handler($this->parser, 'xmlStartElement', 'xmlEndElement');
1245  xml_set_character_data_handler($this->parser, 'xmlCharacterData');
1246  }
1247 
1248  // Parse the XML file.
1249  if (!xml_parse($this->parser, $xml, true)) {
1250  // Display an error message.
1251  $errstr = sprintf(
1252  'XML error parsing XML schema on line %d: %s',
1253  xml_get_current_line_number($this->parser),
1254  xml_error_string(xml_get_error_code($this->parser))
1255  );
1256  $this->debug($errstr);
1257  $this->debug("XML payload:\n" . $xml);
1258  $this->setError($errstr);
1259  }
1260 
1261  xml_parser_free($this->parser);
1262  } else {
1263  $this->debug('no xml passed to parseString()!!');
1264  $this->setError('no xml passed to parseString()!!');
1265  }
1266  }
setError($str)
sets error string
Definition: nusoap.php:395
$type
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
+ Here is the call graph for this function:

◆ schemaCharacterData()

nusoap_xmlschema::schemaCharacterData (   $parser,
  $data 
)

element content handler

Parameters
string$parserXML parser object
string$dataelement content private

Definition at line 1628 of file nusoap.php.

References $data.

1629  {
1630  $pos = $this->depth_array[$this->depth - 1];
1631  $this->message[$pos]['cdata'] .= $data;
1632  }

◆ schemaEndElement()

nusoap_xmlschema::schemaEndElement (   $parser,
  $name 
)

end-element handler

Parameters
string$parserXML parser object
string$nameelement name private

Definition at line 1590 of file nusoap.php.

References $name, nusoap_base\getLocalPart(), and nusoap_base\getPrefix().

1591  {
1592  // bring depth down a notch
1593  $this->depth--;
1594  // position of current element is equal to the last value left in depth_array for my depth
1595  if (isset($this->depth_array[$this->depth])) {
1596  $pos = $this->depth_array[$this->depth];
1597  }
1598  // get element prefix
1599  if ($prefix = $this->getPrefix($name)) {
1600  // get unqualified name
1601  $name = $this->getLocalPart($name);
1602  } else {
1603  $prefix = '';
1604  }
1605  // move on...
1606  if ($name == 'complexType') {
1607  $this->xdebug('done processing complexType ' . ($this->currentComplexType ? $this->currentComplexType : '(unknown)'));
1608  $this->currentComplexType = array_pop($this->complexTypeStack);
1609  //$this->currentElement = false;
1610  }
1611  if ($name == 'element') {
1612  $this->xdebug('done processing element ' . ($this->currentElement ? $this->currentElement : '(unknown)'));
1613  $this->currentElement = array_pop($this->elementStack);
1614  }
1615  if ($name == 'simpleType') {
1616  $this->xdebug('done processing simpleType ' . ($this->currentSimpleType ? $this->currentSimpleType : '(unknown)'));
1617  $this->currentSimpleType = array_pop($this->simpleTypeStack);
1618  }
1619  }
getLocalPart($str)
returns the local part of a prefixed string returns the original string, if not prefixed ...
Definition: nusoap.php:821
xdebug($string)
adds debug data to the clas level debug string
Definition: nusoap.php:1757
if($format !==null) $name
Definition: metadata.php:247
getPrefix($str)
returns the prefix part of a prefixed string returns false, if not prefixed
Definition: nusoap.php:839
+ Here is the call graph for this function:

◆ schemaStartElement()

nusoap_xmlschema::schemaStartElement (   $parser,
  $name,
  $attrs 
)

start-element handler

Parameters
string$parserXML parser object
string$nameelement name
string$attrsassociative array of attributes private

Definition at line 1292 of file nusoap.php.

References $name, $type, nusoap_base\appendDebug(), nusoap_base\expandQname(), nusoap_base\getLocalPart(), nusoap_base\getNamespaceFromPrefix(), nusoap_base\getPrefix(), nusoap_base\getPrefixFromNamespace(), and nusoap_base\varDump().

1293  {
1294 
1295  // position in the total number of elements, starting from 0
1296  $pos = $this->position++;
1297  $depth = $this->depth++;
1298  // set self as current value for this depth
1299  $this->depth_array[$depth] = $pos;
1300  $this->message[$pos] = array('cdata' => '');
1301  if ($depth > 0) {
1302  $this->defaultNamespace[$pos] = $this->defaultNamespace[$this->depth_array[$depth - 1]];
1303  } else {
1304  $this->defaultNamespace[$pos] = false;
1305  }
1306 
1307  // get element prefix
1308  if ($prefix = $this->getPrefix($name)) {
1309  // get unqualified name
1310  $name = $this->getLocalPart($name);
1311  } else {
1312  $prefix = '';
1313  }
1314 
1315  // loop thru attributes, expanding, and registering namespace declarations
1316  if (count($attrs) > 0) {
1317  foreach ($attrs as $k => $v) {
1318  // if ns declarations, add to class level array of valid namespaces
1319  if (preg_match('/^xmlns/', $k)) {
1320  //$this->xdebug("$k: $v");
1321  //$this->xdebug('ns_prefix: '.$this->getPrefix($k));
1322  if ($ns_prefix = substr(strrchr($k, ':'), 1)) {
1323  //$this->xdebug("Add namespace[$ns_prefix] = $v");
1324  $this->namespaces[$ns_prefix] = $v;
1325  } else {
1326  $this->defaultNamespace[$pos] = $v;
1327  if (! $this->getPrefixFromNamespace($v)) {
1328  $this->namespaces['ns' . (count($this->namespaces)+1)] = $v;
1329  }
1330  }
1331  if ($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema') {
1332  $this->XMLSchemaVersion = $v;
1333  $this->namespaces['xsi'] = $v . '-instance';
1334  }
1335  }
1336  }
1337  foreach ($attrs as $k => $v) {
1338  // expand each attribute
1339  $k = strpos($k, ':') ? $this->expandQname($k) : $k;
1340  $v = strpos($v, ':') ? $this->expandQname($v) : $v;
1341  $eAttrs[$k] = $v;
1342  }
1343  $attrs = $eAttrs;
1344  } else {
1345  $attrs = array();
1346  }
1347  // find status, register data
1348  switch ($name) {
1349  case 'all': // (optional) compositor content for a complexType
1350  case 'choice':
1351  case 'group':
1352  case 'sequence':
1353  //$this->xdebug("compositor $name for currentComplexType: $this->currentComplexType and currentElement: $this->currentElement");
1354  $this->complexTypes[$this->currentComplexType]['compositor'] = $name;
1355  //if($name == 'all' || $name == 'sequence'){
1356  // $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct';
1357  //}
1358  break;
1359  case 'attribute': // complexType attribute
1360  //$this->xdebug("parsing attribute $attrs[name] $attrs[ref] of value: ".$attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']);
1361  $this->xdebug("parsing attribute:");
1362  $this->appendDebug($this->varDump($attrs));
1363  if (!isset($attrs['form'])) {
1364  $attrs['form'] = $this->schemaInfo['attributeFormDefault'];
1365  }
1366  if (isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])) {
1367  $v = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'];
1368  if (!strpos($v, ':')) {
1369  // no namespace in arrayType attribute value...
1370  if ($this->defaultNamespace[$pos]) {
1371  // ...so use the default
1372  $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'] = $this->defaultNamespace[$pos] . ':' . $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'];
1373  }
1374  }
1375  }
1376  if (isset($attrs['name'])) {
1377  $this->attributes[$attrs['name']] = $attrs;
1378  $aname = $attrs['name'];
1379  } elseif (isset($attrs['ref']) && $attrs['ref'] == 'http://schemas.xmlsoap.org/soap/encoding/:arrayType') {
1380  if (isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])) {
1381  $aname = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'];
1382  } else {
1383  $aname = '';
1384  }
1385  } elseif (isset($attrs['ref'])) {
1386  $aname = $attrs['ref'];
1387  $this->attributes[$attrs['ref']] = $attrs;
1388  }
1389 
1390  if ($this->currentComplexType) { // This should *always* be
1391  $this->complexTypes[$this->currentComplexType]['attrs'][$aname] = $attrs;
1392  }
1393  // arrayType attribute
1394  if (isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']) || $this->getLocalPart($aname) == 'arrayType') {
1395  $this->complexTypes[$this->currentComplexType]['phpType'] = 'array';
1396  $prefix = $this->getPrefix($aname);
1397  if (isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])) {
1398  $v = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'];
1399  } else {
1400  $v = '';
1401  }
1402  if (strpos($v, '[,]')) {
1403  $this->complexTypes[$this->currentComplexType]['multidimensional'] = true;
1404  }
1405  $v = substr($v, 0, strpos($v, '[')); // clip the []
1406  if (!strpos($v, ':') && isset($this->typemap[$this->XMLSchemaVersion][$v])) {
1407  $v = $this->XMLSchemaVersion . ':' . $v;
1408  }
1409  $this->complexTypes[$this->currentComplexType]['arrayType'] = $v;
1410  }
1411  break;
1412  case 'complexContent': // (optional) content for a complexType
1413  break;
1414  case 'complexType':
1415  array_push($this->complexTypeStack, $this->currentComplexType);
1416  if (isset($attrs['name'])) {
1417  // TODO: what is the scope of named complexTypes that appear
1418  // nested within other c complexTypes?
1419  $this->xdebug('processing named complexType ' . $attrs['name']);
1420  //$this->currentElement = false;
1421  $this->currentComplexType = $attrs['name'];
1422  $this->complexTypes[$this->currentComplexType] = $attrs;
1423  $this->complexTypes[$this->currentComplexType]['typeClass'] = 'complexType';
1424  // This is for constructs like
1425  // <complexType name="ListOfString" base="soap:Array">
1426  // <sequence>
1427  // <element name="string" type="xsd:string"
1428  // minOccurs="0" maxOccurs="unbounded" />
1429  // </sequence>
1430  // </complexType>
1431  if (isset($attrs['base']) && preg_match('/:Array$/', $attrs['base'])) {
1432  $this->xdebug('complexType is unusual array');
1433  $this->complexTypes[$this->currentComplexType]['phpType'] = 'array';
1434  } else {
1435  $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct';
1436  }
1437  } else {
1438  $name = $this->CreateTypeName($this->currentElement);
1439  $this->xdebug('processing unnamed complexType for element ' . $this->currentElement . ' named ' . $name);
1440  $this->currentComplexType = $name;
1441  //$this->currentElement = false;
1442  $this->complexTypes[$this->currentComplexType] = $attrs;
1443  $this->complexTypes[$this->currentComplexType]['typeClass'] = 'complexType';
1444  // This is for constructs like
1445  // <complexType name="ListOfString" base="soap:Array">
1446  // <sequence>
1447  // <element name="string" type="xsd:string"
1448  // minOccurs="0" maxOccurs="unbounded" />
1449  // </sequence>
1450  // </complexType>
1451  if (isset($attrs['base']) && preg_match('/:Array$/', $attrs['base'])) {
1452  $this->xdebug('complexType is unusual array');
1453  $this->complexTypes[$this->currentComplexType]['phpType'] = 'array';
1454  } else {
1455  $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct';
1456  }
1457  }
1458  break;
1459  case 'element':
1460  array_push($this->elementStack, $this->currentElement);
1461  if (!isset($attrs['form'])) {
1462  $attrs['form'] = $this->schemaInfo['elementFormDefault'];
1463  }
1464  if (isset($attrs['type'])) {
1465  $this->xdebug("processing typed element " . $attrs['name'] . " of type " . $attrs['type']);
1466  if (! $this->getPrefix($attrs['type'])) {
1467  if ($this->defaultNamespace[$pos]) {
1468  $attrs['type'] = $this->defaultNamespace[$pos] . ':' . $attrs['type'];
1469  $this->xdebug('used default namespace to make type ' . $attrs['type']);
1470  }
1471  }
1472  // This is for constructs like
1473  // <complexType name="ListOfString" base="soap:Array">
1474  // <sequence>
1475  // <element name="string" type="xsd:string"
1476  // minOccurs="0" maxOccurs="unbounded" />
1477  // </sequence>
1478  // </complexType>
1479  if ($this->currentComplexType && $this->complexTypes[$this->currentComplexType]['phpType'] == 'array') {
1480  $this->xdebug('arrayType for unusual array is ' . $attrs['type']);
1481  $this->complexTypes[$this->currentComplexType]['arrayType'] = $attrs['type'];
1482  }
1483  $this->currentElement = $attrs['name'];
1484  $ename = $attrs['name'];
1485  } elseif (isset($attrs['ref'])) {
1486  $this->xdebug("processing element as ref to " . $attrs['ref']);
1487  $this->currentElement = "ref to " . $attrs['ref'];
1488  $ename = $this->getLocalPart($attrs['ref']);
1489  } else {
1490  $type = $this->CreateTypeName($this->currentComplexType . '_' . $attrs['name']);
1491  $this->xdebug("processing untyped element " . $attrs['name'] . ' type ' . $type);
1492  $this->currentElement = $attrs['name'];
1493  $attrs['type'] = $this->schemaTargetNamespace . ':' . $type;
1494  $ename = $attrs['name'];
1495  }
1496  if (isset($ename) && $this->currentComplexType) {
1497  $this->xdebug("add element $ename to complexType $this->currentComplexType");
1498  $this->complexTypes[$this->currentComplexType]['elements'][$ename] = $attrs;
1499  } elseif (!isset($attrs['ref'])) {
1500  $this->xdebug("add element $ename to elements array");
1501  $this->elements[ $attrs['name'] ] = $attrs;
1502  $this->elements[ $attrs['name'] ]['typeClass'] = 'element';
1503  }
1504  break;
1505  case 'enumeration': // restriction value list member
1506  $this->xdebug('enumeration ' . $attrs['value']);
1507  if ($this->currentSimpleType) {
1508  $this->simpleTypes[$this->currentSimpleType]['enumeration'][] = $attrs['value'];
1509  } elseif ($this->currentComplexType) {
1510  $this->complexTypes[$this->currentComplexType]['enumeration'][] = $attrs['value'];
1511  }
1512  break;
1513  case 'extension': // simpleContent or complexContent type extension
1514  $this->xdebug('extension ' . $attrs['base']);
1515  if ($this->currentComplexType) {
1516  $this->complexTypes[$this->currentComplexType]['extensionBase'] = $attrs['base'];
1517  }
1518  break;
1519  case 'import':
1520  if (isset($attrs['schemaLocation'])) {
1521  //$this->xdebug('import namespace ' . $attrs['namespace'] . ' from ' . $attrs['schemaLocation']);
1522  $this->imports[$attrs['namespace']][] = array('location' => $attrs['schemaLocation'], 'loaded' => false);
1523  } else {
1524  //$this->xdebug('import namespace ' . $attrs['namespace']);
1525  $this->imports[$attrs['namespace']][] = array('location' => '', 'loaded' => true);
1526  if (! $this->getPrefixFromNamespace($attrs['namespace'])) {
1527  $this->namespaces['ns' . (count($this->namespaces)+1)] = $attrs['namespace'];
1528  }
1529  }
1530  break;
1531  case 'list': // simpleType value list
1532  break;
1533  case 'restriction': // simpleType, simpleContent or complexContent value restriction
1534  $this->xdebug('restriction ' . $attrs['base']);
1535  if ($this->currentSimpleType) {
1536  $this->simpleTypes[$this->currentSimpleType]['type'] = $attrs['base'];
1537  } elseif ($this->currentComplexType) {
1538  $this->complexTypes[$this->currentComplexType]['restrictionBase'] = $attrs['base'];
1539  if (strstr($attrs['base'], ':') == ':Array') {
1540  $this->complexTypes[$this->currentComplexType]['phpType'] = 'array';
1541  }
1542  }
1543  break;
1544  case 'schema':
1545  $this->schemaInfo = $attrs;
1546  $this->schemaInfo['schemaVersion'] = $this->getNamespaceFromPrefix($prefix);
1547  if (isset($attrs['targetNamespace'])) {
1548  $this->schemaTargetNamespace = $attrs['targetNamespace'];
1549  }
1550  if (!isset($attrs['elementFormDefault'])) {
1551  $this->schemaInfo['elementFormDefault'] = 'unqualified';
1552  }
1553  if (!isset($attrs['attributeFormDefault'])) {
1554  $this->schemaInfo['attributeFormDefault'] = 'unqualified';
1555  }
1556  break;
1557  case 'simpleContent': // (optional) content for a complexType
1558  break;
1559  case 'simpleType':
1560  array_push($this->simpleTypeStack, $this->currentSimpleType);
1561  if (isset($attrs['name'])) {
1562  $this->xdebug("processing simpleType for name " . $attrs['name']);
1563  $this->currentSimpleType = $attrs['name'];
1564  $this->simpleTypes[ $attrs['name'] ] = $attrs;
1565  $this->simpleTypes[ $attrs['name'] ]['typeClass'] = 'simpleType';
1566  $this->simpleTypes[ $attrs['name'] ]['phpType'] = 'scalar';
1567  } else {
1568  $name = $this->CreateTypeName($this->currentComplexType . '_' . $this->currentElement);
1569  $this->xdebug('processing unnamed simpleType for element ' . $this->currentElement . ' named ' . $name);
1570  $this->currentSimpleType = $name;
1571  //$this->currentElement = false;
1572  $this->simpleTypes[$this->currentSimpleType] = $attrs;
1573  $this->simpleTypes[$this->currentSimpleType]['phpType'] = 'scalar';
1574  }
1575  break;
1576  case 'union': // simpleType type list
1577  break;
1578  default:
1579  //$this->xdebug("do not have anything to do for element $name");
1580  }
1581  }
appendDebug($string)
adds debug data to the instance debug string without formatting
Definition: nusoap.php:305
$type
getLocalPart($str)
returns the local part of a prefixed string returns the original string, if not prefixed ...
Definition: nusoap.php:821
xdebug($string)
adds debug data to the clas level debug string
Definition: nusoap.php:1757
if($format !==null) $name
Definition: metadata.php:247
getPrefixFromNamespace($ns)
returns the prefix for a given namespace (or prefix) or false if no prefixes registered for the given...
Definition: nusoap.php:872
expandQname($qname)
expands (changes prefix to namespace) a qualified name
Definition: nusoap.php:795
varDump($data)
Returns a string with the output of var_dump.
Definition: nusoap.php:909
getPrefix($str)
returns the prefix part of a prefixed string returns false, if not prefixed
Definition: nusoap.php:839
CreateTypeName($ename)
gets a type name for an unnamed type
Definition: nusoap.php:1275
getNamespaceFromPrefix($prefix)
pass it a prefix, it returns a namespace
Definition: nusoap.php:855
+ Here is the call graph for this function:

◆ serializeSchema()

nusoap_xmlschema::serializeSchema ( )

serialize the schema

public

Definition at line 1639 of file nusoap.php.

References Vendor\Package\$a, Vendor\Package\$e, $xml, and nusoap_base\getPrefixFromNamespace().

1640  {
1641  $schemaPrefix = $this->getPrefixFromNamespace($this->XMLSchemaVersion);
1642  $xml = '';
1643  // imports
1644  if (sizeof($this->imports) > 0) {
1645  foreach ($this->imports as $ns => $list) {
1646  foreach ($list as $ii) {
1647  if ($ii['location'] != '') {
1648  $xml .= " <$schemaPrefix:import location=\"" . $ii['location'] . '" namespace="' . $ns . "\" />\n";
1649  } else {
1650  $xml .= " <$schemaPrefix:import namespace=\"" . $ns . "\" />\n";
1651  }
1652  }
1653  }
1654  }
1655  // complex types
1656  foreach ($this->complexTypes as $typeName => $attrs) {
1657  $contentStr = '';
1658  // serialize child elements
1659  if (isset($attrs['elements']) && (count($attrs['elements']) > 0)) {
1660  foreach ($attrs['elements'] as $element => $eParts) {
1661  if (isset($eParts['ref'])) {
1662  $contentStr .= " <$schemaPrefix:element ref=\"$element\"/>\n";
1663  } else {
1664  $contentStr .= " <$schemaPrefix:element name=\"$element\" type=\"" . $this->contractQName($eParts['type']) . "\"";
1665  foreach ($eParts as $aName => $aValue) {
1666  // handle, e.g., abstract, default, form, minOccurs, maxOccurs, nillable
1667  if ($aName != 'name' && $aName != 'type') {
1668  $contentStr .= " $aName=\"$aValue\"";
1669  }
1670  }
1671  $contentStr .= "/>\n";
1672  }
1673  }
1674  // compositor wraps elements
1675  if (isset($attrs['compositor']) && ($attrs['compositor'] != '')) {
1676  $contentStr = " <$schemaPrefix:$attrs[compositor]>\n" . $contentStr . " </$schemaPrefix:$attrs[compositor]>\n";
1677  }
1678  }
1679  // attributes
1680  if (isset($attrs['attrs']) && (count($attrs['attrs']) >= 1)) {
1681  foreach ($attrs['attrs'] as $attr => $aParts) {
1682  $contentStr .= " <$schemaPrefix:attribute";
1683  foreach ($aParts as $a => $v) {
1684  if ($a == 'ref' || $a == 'type') {
1685  $contentStr .= " $a=\"" . $this->contractQName($v) . '"';
1686  } elseif ($a == 'http://schemas.xmlsoap.org/wsdl/:arrayType') {
1687  $this->usedNamespaces['wsdl'] = $this->namespaces['wsdl'];
1688  $contentStr .= ' wsdl:arrayType="' . $this->contractQName($v) . '"';
1689  } else {
1690  $contentStr .= " $a=\"$v\"";
1691  }
1692  }
1693  $contentStr .= "/>\n";
1694  }
1695  }
1696  // if restriction
1697  if (isset($attrs['restrictionBase']) && $attrs['restrictionBase'] != '') {
1698  $contentStr = " <$schemaPrefix:restriction base=\"" . $this->contractQName($attrs['restrictionBase']) . "\">\n" . $contentStr . " </$schemaPrefix:restriction>\n";
1699  // complex or simple content
1700  if ((isset($attrs['elements']) && count($attrs['elements']) > 0) || (isset($attrs['attrs']) && count($attrs['attrs']) > 0)) {
1701  $contentStr = " <$schemaPrefix:complexContent>\n" . $contentStr . " </$schemaPrefix:complexContent>\n";
1702  }
1703  }
1704  // finalize complex type
1705  if ($contentStr != '') {
1706  $contentStr = " <$schemaPrefix:complexType name=\"$typeName\">\n" . $contentStr . " </$schemaPrefix:complexType>\n";
1707  } else {
1708  $contentStr = " <$schemaPrefix:complexType name=\"$typeName\"/>\n";
1709  }
1710  $xml .= $contentStr;
1711  }
1712  // simple types
1713  if (isset($this->simpleTypes) && count($this->simpleTypes) > 0) {
1714  foreach ($this->simpleTypes as $typeName => $eParts) {
1715  $xml .= " <$schemaPrefix:simpleType name=\"$typeName\">\n <$schemaPrefix:restriction base=\"" . $this->contractQName($eParts['type']) . "\">\n";
1716  if (isset($eParts['enumeration'])) {
1717  foreach ($eParts['enumeration'] as $e) {
1718  $xml .= " <$schemaPrefix:enumeration value=\"$e\"/>\n";
1719  }
1720  }
1721  $xml .= " </$schemaPrefix:restriction>\n </$schemaPrefix:simpleType>";
1722  }
1723  }
1724  // elements
1725  if (isset($this->elements) && count($this->elements) > 0) {
1726  foreach ($this->elements as $element => $eParts) {
1727  $xml .= " <$schemaPrefix:element name=\"$element\" type=\"" . $this->contractQName($eParts['type']) . "\"/>\n";
1728  }
1729  }
1730  // attributes
1731  if (isset($this->attributes) && count($this->attributes) > 0) {
1732  foreach ($this->attributes as $attr => $aParts) {
1733  $xml .= " <$schemaPrefix:attribute name=\"$attr\" type=\"" . $this->contractQName($aParts['type']) . "\"\n/>";
1734  }
1735  }
1736  // finish 'er up
1737  $attr = '';
1738  foreach ($this->schemaInfo as $k => $v) {
1739  if ($k == 'elementFormDefault' || $k == 'attributeFormDefault') {
1740  $attr .= " $k=\"$v\"";
1741  }
1742  }
1743  $el = "<$schemaPrefix:schema$attr targetNamespace=\"$this->schemaTargetNamespace\"\n";
1744  foreach (array_diff($this->usedNamespaces, $this->enclosingNamespaces) as $nsp => $ns) {
1745  $el .= " xmlns:$nsp=\"$ns\"";
1746  }
1747  $xml = $el . ">\n" . $xml . "</$schemaPrefix:schema>\n";
1748  return $xml;
1749  }
getPrefixFromNamespace($ns)
returns the prefix for a given namespace (or prefix) or false if no prefixes registered for the given...
Definition: nusoap.php:872
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
+ Here is the call graph for this function:

◆ serializeTypeDef()

nusoap_xmlschema::serializeTypeDef (   $type)

returns a sample serialization of a given type, or false if no type by the given name

Parameters
string$typename of type
Returns
mixed public
Deprecated:

Definition at line 1885 of file nusoap.php.

References $data, and $type.

1886  {
1887  //print "in sTD() for type $type<br>";
1888  if ($typeDef = $this->getTypeDef($type)) {
1889  $str .= '<' . $type;
1890  if (is_array($typeDef['attrs'])) {
1891  foreach ($typeDef['attrs'] as $attName => $data) {
1892  $str .= " $attName=\"{type = " . $data['type'] . "}\"";
1893  }
1894  }
1895  $str .= " xmlns=\"" . $this->schema['targetNamespace'] . "\"";
1896  if (count($typeDef['elements']) > 0) {
1897  $str .= ">";
1898  foreach ($typeDef['elements'] as $element => $eData) {
1899  $str .= $this->serializeTypeDef($element);
1900  }
1901  $str .= "</$type>";
1902  } elseif ($typeDef['typeClass'] == 'element') {
1903  $str .= "></$type>";
1904  } else {
1905  $str .= "/>";
1906  }
1907  return $str;
1908  }
1909  return false;
1910  }
$type
getTypeDef($type)
returns an associative array of information about a given type returns false if no type exists by the...
Definition: nusoap.php:1808
serializeTypeDef($type)
returns a sample serialization of a given type, or false if no type by the given name ...
Definition: nusoap.php:1885

◆ typeToForm()

nusoap_xmlschema::typeToForm (   $name,
  $type 
)

returns HTML form elements that allow a user to enter values for creating an instance of the given type.

Parameters
string$namename for type instance
string$typename of type
Returns
string public
Deprecated:

Definition at line 1922 of file nusoap.php.

References $i, $name, $type, and nusoap_base\getLocalPart().

1923  {
1924  // get typedef
1925  if ($typeDef = $this->getTypeDef($type)) {
1926  // if struct
1927  if ($typeDef['phpType'] == 'struct') {
1928  $buffer .= '<table>';
1929  foreach ($typeDef['elements'] as $child => $childDef) {
1930  $buffer .= "
1931  <tr><td align='right'>$childDef[name] (type: " . $this->getLocalPart($childDef['type']) . "):</td>
1932  <td><input type='text' name='parameters[" . $name . "][$childDef[name]]'></td></tr>";
1933  }
1934  $buffer .= '</table>';
1935  // if array
1936  } elseif ($typeDef['phpType'] == 'array') {
1937  $buffer .= '<table>';
1938  for ($i=0;$i < 3; $i++) {
1939  $buffer .= "
1940  <tr><td align='right'>array item (type: $typeDef[arrayType]):</td>
1941  <td><input type='text' name='parameters[" . $name . "][]'></td></tr>";
1942  }
1943  $buffer .= '</table>';
1944  // if scalar
1945  } else {
1946  $buffer .= "<input type='text' name='parameters[$name]'>";
1947  }
1948  } else {
1949  $buffer .= "<input type='text' name='parameters[$name]'>";
1950  }
1951  return $buffer;
1952  }
$type
getLocalPart($str)
returns the local part of a prefixed string returns the original string, if not prefixed ...
Definition: nusoap.php:821
getTypeDef($type)
returns an associative array of information about a given type returns false if no type exists by the...
Definition: nusoap.php:1808
if($format !==null) $name
Definition: metadata.php:247
$i
Definition: metadata.php:41
+ Here is the call graph for this function:

◆ xdebug()

nusoap_xmlschema::xdebug (   $string)

adds debug data to the clas level debug string

Parameters
string$stringdebug data private

Definition at line 1757 of file nusoap.php.

References nusoap_base\debug().

1758  {
1759  $this->debug('<' . $this->schemaTargetNamespace . '> ' . $string);
1760  }
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
+ Here is the call graph for this function:

Field Documentation

◆ $attributes

nusoap_xmlschema::$attributes = array()

Definition at line 1138 of file nusoap.php.

◆ $complexTypes

nusoap_xmlschema::$complexTypes = array()

Definition at line 1139 of file nusoap.php.

◆ $complexTypeStack

nusoap_xmlschema::$complexTypeStack = array()

Definition at line 1140 of file nusoap.php.

◆ $currentComplexType

nusoap_xmlschema::$currentComplexType = null

Definition at line 1141 of file nusoap.php.

◆ $currentElement

nusoap_xmlschema::$currentElement = null

Definition at line 1144 of file nusoap.php.

◆ $currentSimpleType

nusoap_xmlschema::$currentSimpleType = null

Definition at line 1147 of file nusoap.php.

◆ $defaultNamespace

nusoap_xmlschema::$defaultNamespace = array()

Definition at line 1156 of file nusoap.php.

◆ $depth

nusoap_xmlschema::$depth = 0

Definition at line 1153 of file nusoap.php.

◆ $depth_array

nusoap_xmlschema::$depth_array = array()

Definition at line 1154 of file nusoap.php.

◆ $elements

nusoap_xmlschema::$elements = array()

Definition at line 1142 of file nusoap.php.

◆ $elementStack

nusoap_xmlschema::$elementStack = array()

Definition at line 1143 of file nusoap.php.

◆ $enclosingNamespaces

nusoap_xmlschema::$enclosingNamespaces

Definition at line 1133 of file nusoap.php.

◆ $imports

nusoap_xmlschema::$imports = array()

Definition at line 1149 of file nusoap.php.

◆ $message

nusoap_xmlschema::$message = array()

Definition at line 1155 of file nusoap.php.

◆ $parser

nusoap_xmlschema::$parser

Definition at line 1151 of file nusoap.php.

◆ $position

nusoap_xmlschema::$position = 0

Definition at line 1152 of file nusoap.php.

◆ $schema

nusoap_xmlschema::$schema = ''

Definition at line 1130 of file nusoap.php.

◆ $schemaInfo

nusoap_xmlschema::$schemaInfo = array()

Definition at line 1135 of file nusoap.php.

◆ $schemaTargetNamespace

nusoap_xmlschema::$schemaTargetNamespace = ''

Definition at line 1136 of file nusoap.php.

◆ $simpleTypes

nusoap_xmlschema::$simpleTypes = array()

Definition at line 1145 of file nusoap.php.

◆ $simpleTypeStack

nusoap_xmlschema::$simpleTypeStack = array()

Definition at line 1146 of file nusoap.php.

◆ $xml

nusoap_xmlschema::$xml = ''

Definition at line 1131 of file nusoap.php.


The documentation for this class was generated from the following file: