Documentation TYPO3 par Ameos |
Public Member Functions | |
XMLSchema ($schema='', $xml='', $namespaces=array()) | |
parseFile ($xml, $type) | |
parseString ($xml, $type) | |
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=array(), $attrs=array(), $arrayType='') | |
addSimpleType ($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()) | |
addElement ($attrs) | |
Public Attributes | |
$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() |
Definition at line 993 of file class.nusoap.php.
XMLSchema::XMLSchema | ( | $ | schema = '' , |
|
$ | xml = '' , |
|||
$ | namespaces = array() | |||
) |
constructor
string | $schema schema document URI | |
string | $xml xml document URI | |
string | $namespaces namespaces defined in enclosing XML public |
Definition at line 1032 of file class.nusoap.php.
References nusoap_base::$namespaces, $schema, $xml, nusoap_base::debug(), and parseFile().
XMLSchema::parseFile | ( | $ | xml, | |
$ | type | |||
) |
parse an XML file
string | $xml, path/URL to XML file | |
string | $type, (schema | xml) |
Definition at line 1065 of file class.nusoap.php.
References $xml, nusoap_base::debug(), parseString(), and nusoap_base::setError().
Referenced by XMLSchema().
XMLSchema::parseString | ( | $ | xml, | |
$ | type | |||
) |
parse an XML string
string | $xml path or URL | |
string | $type, (schema|xml) private |
Definition at line 1091 of file class.nusoap.php.
References $xml, nusoap_base::debug(), schemaCharacterData(), schemaEndElement(), schemaStartElement(), and nusoap_base::setError().
Referenced by parseFile().
XMLSchema::schemaStartElement | ( | $ | parser, | |
$ | name, | |||
$ | attrs | |||
) |
start-element handler
string | $parser XML parser object | |
string | $name element name | |
string | $attrs associative array of attributes private |
Definition at line 1139 of file class.nusoap.php.
References $depth, nusoap_base::expandQname(), nusoap_base::getLocalPart(), nusoap_base::getPrefix(), and nusoap_base::getPrefixFromNamespace().
Referenced by parseString().
XMLSchema::schemaEndElement | ( | $ | parser, | |
$ | name | |||
) |
end-element handler
string | $parser XML parser object | |
string | $name element name private |
Definition at line 1434 of file class.nusoap.php.
Referenced by parseString().
XMLSchema::schemaCharacterData | ( | $ | parser, | |
$ | data | |||
) |
element content handler
string | $parser XML parser object | |
string | $data element content private |
Definition at line 1471 of file class.nusoap.php.
Referenced by parseString().
XMLSchema::serializeSchema | ( | ) |
XMLSchema::xdebug | ( | $ | string | ) |
adds debug data to the clas level debug string
string | $string debug data private |
Definition at line 1593 of file class.nusoap.php.
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 |
Definition at line 1609 of file class.nusoap.php.
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.
string |
Definition at line 1642 of file class.nusoap.php.
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 |
Definition at line 1711 of file class.nusoap.php.
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 |
Definition at line 1747 of file class.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) public |
Definition at line 1819 of file class.nusoap.php.
XMLSchema::addSimpleType | ( | $ | name, | |
$ | restrictionBase = '' , |
|||
$ | typeClass = 'simpleType' , |
|||
$ | phpType = 'scalar' , |
|||
$ | enumeration = array() | |||
) |
adds a simple type to the schema
string | $name | |
string | $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) | |
string | $typeClass (should always be simpleType) | |
string | $phpType (should always be scalar) | |
array | $enumeration array of values public |
Definition at line 1847 of file class.nusoap.php.
XMLSchema::addElement | ( | $ | attrs | ) |
adds an element to the schema
array | $attrs attributes that must include name and type |
Definition at line 1867 of file class.nusoap.php.