|
ILIAS
release_5-0 Revision 5.0.0-1144-gc4397b1f870
|
parses an XML Schema, allows access to it's data, other utility methods no validation... yet. More...
Inheritance diagram for XMLSchema:
Collaboration diagram for XMLSchema:Public Member Functions | |
| XMLSchema ($schema='', $xml='', $namespaces=array()) | |
| constructor More... | |
| parseFile ($xml, $type) | |
| parse an XML file More... | |
| parseString ($xml, $type) | |
| 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 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') | |
| adds a simple type to the schema More... | |
Public Member Functions inherited from nusoap_base | |
| debug ($string) | |
| adds debug data to the class level debug string 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') | |
| serializeEnvelope ($body, $headers=false, $namespaces=array(), $style='rpc', $use='encoded') | |
| serialize message More... | |
| formatDump ($str) | |
| contractQname ($qname) | |
| contracts a qualified name More... | |
| expandQname ($qname) | |
| expands 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 returns false if no namespace registered with the given prefix More... | |
| getPrefixFromNamespace ($ns) | |
| returns the prefix for a given namespace (or prefix) or false if no prefixes registered for the given namespace More... | |
| varDump ($data) | |
| nusoap_base () | |
| 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) | |
| 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... | |
Public Member Functions inherited from nusoap_xmlschema | |
| nusoap_xmlschema ($schema='', $xml='', $namespaces=array()) | |
| constructor More... | |
| parseFile ($xml, $type) | |
| parse an XML file More... | |
| parseString ($xml, $type) | |
| 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... | |
parses an XML Schema, allows access to it's data, other utility methods no validation... yet.
Backward compatibility.
very experimental and limited. As is discussed on XML-DEV, I'm one of the people that just doesn't have time to read the spec(s) thoroughly, and just have a couple of trusty tutorials I refer to :)
Definition at line 734 of file nusoap.php.
| 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') );
| name | |
| typeClass | (complexType|simpleType|attribute) |
| phpType | currently supported are array and struct (php assoc array) |
| compositor | (all|sequence|choice) |
| restrictionBase | namespace: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[]" ) ) |
| arrayType | namespace:name (http://www.w3.org/2001/XMLSchema:string) |
Reimplemented from nusoap_xmlschema.
Definition at line 1444 of file nusoap.php.
References $elements, nusoap_base\varDump(), and xdebug().
Here is the call graph for this function:| XMLSchema::addSimpleType | ( | $name, | |
$restrictionBase = '', |
|||
$typeClass = 'simpleType', |
|||
$phpType = 'scalar' |
|||
| ) |
adds a simple type to the schema
| name | |
| restrictionBase | namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) |
| typeClass | (simpleType) |
| phpType | (scalar) |
Definition at line 1469 of file nusoap.php.
References nusoap_base\varDump(), and xdebug().
Here is the call graph for this function:| 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'
| string | $type,name | of defined type |
| string | $ns,namespace | of type |
Reimplemented from nusoap_xmlschema.
Definition at line 1254 of file nusoap.php.
| XMLSchema::getTypeDef | ( | $type | ) |
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
)
| string |
Reimplemented from nusoap_xmlschema.
Definition at line 1281 of file nusoap.php.
References getTypeDef(), and xdebug().
Referenced by getTypeDef(), serializeTypeDef(), and typeToForm().
Here is the call graph for this function:
Here is the caller graph for this function:| XMLSchema::parseFile | ( | $xml, | |
| $type | |||
| ) |
parse an XML file
| string | $xml,path/URL | to XML file |
| string | $type,(schema | | xml) |
Reimplemented from nusoap_xmlschema.
Definition at line 803 of file nusoap.php.
References $xml, nusoap_base\debug(), parseString(), and nusoap_base\setError().
Referenced by XMLSchema().
Here is the call graph for this function:
Here is the caller graph for this function:| XMLSchema::parseString | ( | $xml, | |
| $type | |||
| ) |
parse an XML string @param string $xml path or URL
| string | $type,(schema|xml) | @access private |
Reimplemented from nusoap_xmlschema.
Definition at line 829 of file nusoap.php.
References $xml, nusoap_base\debug(), and nusoap_base\setError().
Referenced by parseFile().
Here is the call graph for this function:
Here is the caller graph for this function:| XMLSchema::schemaCharacterData | ( | $parser, | |
| $data | |||
| ) |
element content handler
| string | $parser | XML parser object |
| string | $data | element content @access private |
Reimplemented from nusoap_xmlschema.
Definition at line 1136 of file nusoap.php.
References $data.
| XMLSchema::schemaEndElement | ( | $parser, | |
| $name | |||
| ) |
end-element handler
| string | $parser | XML parser object |
| string | $name | element name @access private |
Reimplemented from nusoap_xmlschema.
Definition at line 1109 of file nusoap.php.
References $depth.
| XMLSchema::schemaStartElement | ( | $parser, | |
| $name, | |||
| $attrs | |||
| ) |
start-element handler
| string | $parser | XML parser object |
| string | $name | element name |
| string | $attrs | associative array of attributes @access private |
Reimplemented from nusoap_xmlschema.
Definition at line 877 of file nusoap.php.
References $currentComplexType, $currentElement, $currentSimpleType, $depth, nusoap_base\expandQname(), nusoap_base\getLocalPart(), nusoap_base\getNamespaceFromPrefix(), nusoap_base\getPrefix(), nusoap_base\getPrefixFromNamespace(), nusoap_base\varDump(), and xdebug().
Here is the call graph for this function:| XMLSchema::serializeSchema | ( | ) |
serialize the schema
@access public
Reimplemented from nusoap_xmlschema.
Definition at line 1146 of file nusoap.php.
References $xml, and nusoap_base\getPrefixFromNamespace().
Here is the call graph for this function:| XMLSchema::serializeTypeDef | ( | $type | ) |
returns a sample serialization of a given type, or false if no type by the given name
| string | $type,name | of type |
Reimplemented from nusoap_xmlschema.
Definition at line 1338 of file nusoap.php.
References $data, getTypeDef(), and serializeTypeDef().
Referenced by serializeTypeDef().
Here is the call graph for this function:
Here is the caller graph for this function:| XMLSchema::typeToForm | ( | $name, | |
| $type | |||
| ) |
returns HTML form elements that allow a user to enter values for creating an instance of the given type.
| string | $name,name | for type instance |
| string | $type,name | of type |
Reimplemented from nusoap_xmlschema.
Definition at line 1373 of file nusoap.php.
References getTypeDef().
Here is the call graph for this function:| XMLSchema::xdebug | ( | $string | ) |
adds debug data to the clas level debug string
| string | $string | debug data @access private |
Reimplemented from nusoap_xmlschema.
Definition at line 1239 of file nusoap.php.
References nusoap_base\debug().
Referenced by addComplexType(), addSimpleType(), getTypeDef(), and schemaStartElement().
Here is the call graph for this function:
Here is the caller graph for this function:| XMLSchema::XMLSchema | ( | $schema = '', |
|
$xml = '', |
|||
$namespaces = array() |
|||
| ) |
constructor
| string | $schema | schema document URI |
| string | $xml | xml document URI |
| string | $namespaces | namespaces defined in enclosing XML @access public |
Definition at line 770 of file nusoap.php.
References nusoap_base\$namespaces, $schema, $xml, nusoap_base\debug(), and parseFile().
Here is the call graph for this function:| XMLSchema::$attributes = array() |
Definition at line 745 of file nusoap.php.
| XMLSchema::$complexTypes = array() |
Definition at line 746 of file nusoap.php.
| XMLSchema::$currentComplexType = false |
Definition at line 747 of file nusoap.php.
Referenced by schemaStartElement().
| XMLSchema::$currentElement = false |
Definition at line 749 of file nusoap.php.
Referenced by schemaStartElement().
| XMLSchema::$currentSimpleType = false |
Definition at line 751 of file nusoap.php.
Referenced by schemaStartElement().
| XMLSchema::$defaultNamespace = array() |
Definition at line 760 of file nusoap.php.
| XMLSchema::$depth = 0 |
Definition at line 757 of file nusoap.php.
Referenced by schemaEndElement(), and schemaStartElement().
| XMLSchema::$depth_array = array() |
Definition at line 758 of file nusoap.php.
| XMLSchema::$elements = array() |
Definition at line 748 of file nusoap.php.
Referenced by addComplexType().
| XMLSchema::$enclosingNamespaces |
Definition at line 740 of file nusoap.php.
| XMLSchema::$imports = array() |
Definition at line 753 of file nusoap.php.
| XMLSchema::$message = array() |
Definition at line 759 of file nusoap.php.
| XMLSchema::$parser |
Definition at line 755 of file nusoap.php.
| XMLSchema::$position = 0 |
Definition at line 756 of file nusoap.php.
| XMLSchema::$schema = '' |
Definition at line 737 of file nusoap.php.
Referenced by XMLSchema().
| XMLSchema::$schemaInfo = array() |
Definition at line 742 of file nusoap.php.
| XMLSchema::$schemaTargetNamespace = '' |
Definition at line 743 of file nusoap.php.
| XMLSchema::$simpleTypes = array() |
Definition at line 750 of file nusoap.php.
| XMLSchema::$xml = '' |
Definition at line 738 of file nusoap.php.
Referenced by parseFile(), parseString(), serializeSchema(), and XMLSchema().