|
|
XMLSchema
nusoap_base | +-- XMLSchema
|
public class XMLSchema extends nusoap_base
parses an XML Schema, allows access to it's data, other utility methods
no validation... yet.
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 :)
|
|
Direct known subclasses: wsdl
|
|
Methods inherited from nusoap_base |
nusoap_base, debug, geterror, seterror, serialize_val, serializeenvelope, soapclient, call, getoperationdata, send, parseresponse, setheaders, getheaders, sethttpproxy, setcredentials, getproxy, soapval, serialize, decode, soap_parser, start_element, end_element, character_data, get_response, decode_entities, buildval, buildsoapval, soap_transport_http, setsoapaction, setproxy, sendhttps, soap_server, service, parse_request, verify_method, add_to_map, register, fault, webdescription, configurewsdl, wsdl, parsewsdl, getoperations, serializerpcparameters, serializetype, soap_fault, timestamp_to_iso8601, iso8601_to_timestamp, formatdump, lib_bwcheck, makeobj, b_writeit, popup, popout, getbindingdata, getmessagedata |
|
|
|
Fields inherited from nusoap_base |
$soap_defencoding, $namespaces, $typemap, $xmlentities, $fault, $title, $version, $error_str, $username, $password, $requestheaders, $responseheaders, $endpoint, $portname, $url, $operations, $headers, $request, $xml_encoding, $result, $faultcode, $faultactor, $faultstring, $faultdetail |
|
|
Public Method Details |
XMLSchema |
public void XMLSchema([ string $schema, string $xml ])
|
|
constructor
Warning: documentation is missing.
|
Parameter |
|
string |
$schema |
= >>""<< |
|
schema document URI |
|
|
string |
$xml |
= >>""<< |
|
xml document URI |
|
Returns |
void |
|
parseFile |
public boolean parseFile(string $xml, string $type)
|
|
parse an XML file
Warning: documentation is missing.
|
Parameter |
|
string |
$xml |
|
|
, path/URL to XML file |
|
|
string |
$type |
|
|
, (schema | xml) |
|
Returns |
boolean |
|
serializeSchema |
public void serializeSchema()
|
|
serialize the schema
Warning: documentation is missing.
|
Returns |
void |
|
getPHPType |
public mixed getPHPType(string $type, string $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'
Warning: documentation is missing.
|
Parameter |
|
string |
$type |
|
|
, name of defined type |
|
|
string |
$ns |
|
|
, namespace of type |
|
Returns |
mixed |
|
getLocalPart |
public string getLocalPart(string $str)
|
|
returns the local part of a prefixed string
returns the original string, if not prefixed
Warning: documentation is missing.
|
Parameter |
|
|
Returns |
string |
|
getPrefix |
public mixed getPrefix(string $str)
|
|
returns the prefix part of a prefixed string
returns false, if not prefixed
Warning: documentation is missing.
|
Parameter |
|
|
Returns |
mixed |
|
getNamespaceFromPrefix |
public mixed getNamespaceFromPrefix(string $prefix)
|
|
pass it a prefix, it returns a namespace
or false if no prefixes registered for the given namespace
Warning: documentation is missing.
|
Parameter |
|
|
Returns |
mixed |
|
getPrefixFromNamespace |
public mixed getPrefixFromNamespace(string $ns)
|
|
returns the prefix for a given namespace
returns false if no namespace registered with the given prefix
Warning: documentation is missing.
|
Parameter |
|
|
Returns |
mixed |
|
getTypeDef |
public mixed getTypeDef(string $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
)
Warning: documentation is missing.
|
Parameter |
|
|
Returns |
mixed |
|
serializeTypeDef |
public mixed serializeTypeDef(string $type)
|
|
returns a sample serialization of a given type, or false if no type by the given name
Warning: documentation is missing.
|
Parameter |
|
string |
$type |
|
|
, name of type |
|
Returns |
mixed |
|
typeToForm |
public string typeToForm(string $name, string $type)
|
|
returns HTML form elements that allow a user
to enter values for creating an instance of the given type.
Warning: documentation is missing.
|
Parameter |
|
string |
$name |
|
|
, name for type instance |
|
|
string |
$type |
|
|
, name of type |
|
Returns |
string |
|
|
Private Method Details |
parseString |
private void parseString(string $xml, string $type)
|
|
parse an XML string
Warning: documentation is missing.
|
Parameter |
|
|
|
string |
$type |
|
|
, (schema|xml) |
|
Returns |
void |
|
schemaStartElement |
private void schemaStartElement(string $parser, string $name, string $attrs)
|
|
start-element handler
Warning: documentation is missing.
|
Parameter |
|
string |
$parser |
|
|
XML parser object |
|
|
string |
$name |
|
|
element name |
|
|
string |
$attrs |
|
|
associative array of attributes |
|
Returns |
void |
|
schemaEndElement |
private void schemaEndElement(string $parser, string $name)
|
|
end-element handler
Warning: documentation is missing.
|
Parameter |
|
string |
$parser |
|
|
XML parser object |
|
|
string |
$name |
|
|
element name |
|
Returns |
void |
|
schemaCharacterData |
private void schemaCharacterData(string $parser, string $data)
|
|
element content handler
Warning: documentation is missing.
|
Parameter |
|
string |
$parser |
|
|
XML parser object |
|
|
string |
$data |
|
|
element content |
|
Returns |
void |
|
expandQname |
private string expandQname(string $qname)
|
|
expands a qualified name
Warning: documentation is missing.
|
Parameter |
|
|
Returns |
string expanded qname |
|
xdebug |
private void xdebug(string $string)
|
|
adds debug data to the clas level debug string
Warning: documentation is missing.
|
Parameter |
|
string |
$string |
|
|
debug data |
|
Returns |
void |
|
|
|
|
PHPDoc 1.0beta |