Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
XMLTypeDescription Class Reference
Inheritance diagram for XMLTypeDescription:
TypeDescription

Public Member Functions

 checkType (&$object)
 
 getNamespace ()
 
 parseTypeName ($typeName)
 
 XMLTypeDescription ($typeName)
 
- Public Member Functions inherited from TypeDescription
 _parseTypeNameInternally ($typeName)
 
 checkType (&$object)
 
 getNamespace ()
 
 getTypeDescription ()
 
 getTypeName ()
 
 isCompatible ($object)
 
 parseTypeName ($typeName)
 
 TypeDescription ($typeName)
 

Public Attributes

 $_validationSource
 
 $_validationStrategy = XML_TYPE_DESCRIPTION_VALIDATE_SCHEMA
 
- Public Attributes inherited from TypeDescription
 $_cardinality
 
 $_typeName
 

Detailed Description

Class that describes an XML input/output type.

Type descriptors follow the syntax: xml::validation-schema(http://url.to.the/file.{xsd|dtd|rng})

Example: xml::schema(http://www.crossref.org/schema/queryResultSchema/crossref_query_output2.0.xsd)

XML input/output can be either represented as a string or as a DOMDocument object.

NB: XML validation currently requires PHP5

Definition at line 34 of file XMLTypeDescription.inc.php.

Member Function Documentation

XMLTypeDescription::checkType ( $object)

Validates an object against the internal type description.

Parameters
$objectmixed
Returns
boolean

Definition at line 109 of file XMLTypeDescription.inc.php.

XMLTypeDescription::getNamespace ( )
See Also
TypeDescription::getNamespace()

Definition at line 65 of file XMLTypeDescription.inc.php.

XMLTypeDescription::parseTypeName (   $typeName)

Parse a type name

Parameters
$typeNamestring
Returns
boolean true if success, otherwise false

Definition at line 76 of file XMLTypeDescription.inc.php.

XMLTypeDescription::XMLTypeDescription (   $typeName)

Constructor

Parameters
$typeNamestring Allowed primitive types are 'integer', 'string', 'float' and 'boolean'.

Definition at line 54 of file XMLTypeDescription.inc.php.

Member Data Documentation

string XMLTypeDescription::$_validationSource

a validation document as string or filename pointer (xsd or rng only)

Definition at line 45 of file XMLTypeDescription.inc.php.

string XMLTypeDescription::$_validationStrategy = XML_TYPE_DESCRIPTION_VALIDATE_SCHEMA

a validation strategy, see the XML_TYPE_DESCRIPTION_VALIDATE_* constants

Definition at line 39 of file XMLTypeDescription.inc.php.


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