XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
nusoap_xmlschema Class Reference
Inheritance diagram for nusoap_xmlschema:
nusoap_base XMLSchema

Public Member Functions

 __construct ($schema='', $xml='', $namespaces=[])
 
 parseFile ($xml, $type)
 
 parseString ($xml, $type)
 
 CreateTypeName ($ename)
 
 schemaStartElement ($parser, $name, $attrs)
 
 schemaEndElement ($parser, $name)
 
 schemaCharacterData ($parser, $data)
 
 serializeSchema ()
 
 xdebug ($string)
 
 getPHPType ($type, $ns)
 
 getTypeDef ($type)
 
 serializeTypeDef ($type)
 
 typeToForm ($name, $type)
 
 addComplexType ($name, $typeClass='complexType', $phpType='array', $compositor='', $restrictionBase='', $elements=[], $attrs=[], $arrayType='')
 
 addSimpleType ($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=[])
 
 addElement ($attrs)
 
- Public Member Functions inherited from nusoap_base
 __construct ()
 
 getGlobalDebugLevel ()
 
 setGlobalDebugLevel ($level)
 
 getDebugLevel ()
 
 setDebugLevel ($level)
 
 debug ($string)
 
 appendDebug ($string)
 
 clearDebug ()
 
getDebug ()
 
getDebugAsXMLComment ()
 
 expandEntities ($val)
 
 getError ()
 
 setError ($str)
 
 isArraySimpleOrStruct ($val)
 
 serialize_val ($val, $name=false, $type=false, $name_ns=false, $type_ns=false, $attributes=false, $use='encoded', $soapval=false)
 
 serializeEnvelope ($body, $headers=false, $namespaces=[], $style='rpc', $use='encoded', $encodingStyle='https://schemas.xmlsoap.org/soap/encoding/')
 
 formatDump ($str)
 
 contractQname ($qname)
 
 expandQname ($qname)
 
 getLocalPart ($str)
 
 getPrefix ($str)
 
 getNamespaceFromPrefix ($prefix)
 
 getPrefixFromNamespace ($ns)
 
 getmicrotime ()
 
 varDump ($data)
 
 __toString ()
 

Data Fields

 $schema = ''
 
 $xml = ''
 
 $enclosingNamespaces
 
 $schemaInfo = []
 
 $schemaTargetNamespace = ''
 
 $attributes = []
 
 $complexTypes = []
 
 $complexTypeStack = []
 
 $currentComplexType = null
 
 $elements = []
 
 $elementStack = []
 
 $currentElement = null
 
 $simpleTypes = []
 
 $simpleTypeStack = []
 
 $currentSimpleType = null
 
 $imports = []
 
 $parser
 
 $position = 0
 
 $depth = 0
 
 $depth_array = []
 
 $message = []
 
 $defaultNamespace = []
 
- Data Fields inherited from nusoap_base
 $title = 'NuSOAP'
 
 $version = '0.9.5'
 
 $revision = '$Revision: 1.123 $'
 
 $error_str = ''
 
 $debug_str = ''
 
 $charencoding = true
 
 $debugLevel
 
 $XMLSchemaVersion = 'https://www.w3.org/2001/XMLSchema'
 
 $soap_defencoding = 'UTF-8'
 
 $namespaces
 
 $usedNamespaces = []
 
 $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
nusoap.php,v 1.123 2010/04/26 20:15:08 snichol Exp

@access public

Definition at line 1131 of file nusoap.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( $schema = '',
$xml = '',
$namespaces = [] )

constructor

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

Definition at line 1171 of file nusoap.php.

Member Function Documentation

◆ addComplexType()

addComplexType ( $name,
$typeClass = 'complexType',
$phpType = 'array',
$compositor = '',
$restrictionBase = '',
$elements = [],
$attrs = [],
$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
string$typeClass
string$phpType
string$compositor
string$restrictionBase
array$elements
array$attrs
string$arrayType@access public
See also
getTypeDef

Definition at line 2033 of file nusoap.php.

◆ addElement()

addElement ( $attrs)

adds an element to the schema

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

Definition at line 2083 of file nusoap.php.

◆ addSimpleType()

addSimpleType ( $name,
$restrictionBase = '',
$typeClass = 'simpleType',
$phpType = 'scalar',
$enumeration = [] )

adds a simple type to the schema

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

Definition at line 2062 of file nusoap.php.

◆ CreateTypeName()

CreateTypeName ( $ename)

gets a type name for an unnamed type

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

Definition at line 1279 of file nusoap.php.

◆ getPHPType()

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 @access public
Deprecated

Definition at line 1811 of file nusoap.php.

◆ getTypeDef()

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 @access public
See also
addComplexType
addSimpleType
addElement

Definition at line 1845 of file nusoap.php.

◆ parseFile()

parseFile ( $xml,
$type )

parse an XML file

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

Definition at line 1204 of file nusoap.php.

◆ parseString()

parseString ( $xml,
$type )

parse an XML string

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

Definition at line 1231 of file nusoap.php.

◆ schemaCharacterData()

schemaCharacterData ( $parser,
$data )

element content handler

Parameters
string$parserXML parser object
string$dataelement content @access private

Definition at line 1665 of file nusoap.php.

◆ schemaEndElement()

schemaEndElement ( $parser,
$name )

end-element handler

Parameters
string$parserXML parser object
string$nameelement name @access private

Definition at line 1625 of file nusoap.php.

◆ schemaStartElement()

schemaStartElement ( $parser,
$name,
$attrs )

start-element handler

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

Definition at line 1296 of file nusoap.php.

◆ serializeSchema()

serializeSchema ( )

serialize the schema

@access public

Definition at line 1676 of file nusoap.php.

◆ serializeTypeDef()

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 @access public
Deprecated

Definition at line 1926 of file nusoap.php.

◆ typeToForm()

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 @access public
Deprecated

Definition at line 1964 of file nusoap.php.

◆ xdebug()

xdebug ( $string)

adds debug data to the clas level debug string

Parameters
string$stringdebug data @access private

Definition at line 1794 of file nusoap.php.

Field Documentation

◆ $attributes

$attributes = []

Definition at line 1143 of file nusoap.php.

◆ $complexTypes

$complexTypes = []

Definition at line 1144 of file nusoap.php.

◆ $complexTypeStack

$complexTypeStack = []

Definition at line 1145 of file nusoap.php.

◆ $currentComplexType

$currentComplexType = null

Definition at line 1146 of file nusoap.php.

◆ $currentElement

$currentElement = null

Definition at line 1149 of file nusoap.php.

◆ $currentSimpleType

$currentSimpleType = null

Definition at line 1152 of file nusoap.php.

◆ $defaultNamespace

$defaultNamespace = []

Definition at line 1161 of file nusoap.php.

◆ $depth

$depth = 0

Definition at line 1158 of file nusoap.php.

◆ $depth_array

$depth_array = []

Definition at line 1159 of file nusoap.php.

◆ $elements

$elements = []

Definition at line 1147 of file nusoap.php.

◆ $elementStack

$elementStack = []

Definition at line 1148 of file nusoap.php.

◆ $enclosingNamespaces

$enclosingNamespaces

Definition at line 1138 of file nusoap.php.

◆ $imports

$imports = []

Definition at line 1154 of file nusoap.php.

◆ $message

$message = []

Definition at line 1160 of file nusoap.php.

◆ $parser

$parser

Definition at line 1156 of file nusoap.php.

◆ $position

$position = 0

Definition at line 1157 of file nusoap.php.

◆ $schema

$schema = ''

Definition at line 1135 of file nusoap.php.

◆ $schemaInfo

$schemaInfo = []

Definition at line 1140 of file nusoap.php.

◆ $schemaTargetNamespace

$schemaTargetNamespace = ''

Definition at line 1141 of file nusoap.php.

◆ $simpleTypes

$simpleTypes = []

Definition at line 1150 of file nusoap.php.

◆ $simpleTypeStack

$simpleTypeStack = []

Definition at line 1151 of file nusoap.php.

◆ $xml

$xml = ''

Definition at line 1136 of file nusoap.php.


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