Open Journal Systems  3.3.0
XMLTypeDescription Class Reference
Inheritance diagram for XMLTypeDescription:
TypeDescription

Public Member Functions

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

Data Fields

 $_validationSource
 
 $_validationStrategy = XML_TYPE_DESCRIPTION_VALIDATE_SCHEMA
 
- Data Fields 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.

Constructor & Destructor Documentation

◆ __construct()

XMLTypeDescription::__construct (   $typeName)

Constructor

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

Reimplemented from TypeDescription.

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

Member Function Documentation

◆ checkType()

XMLTypeDescription::checkType ( $object)

Validates an object against the internal type description.

Parameters
$objectmixed
Returns
boolean

Reimplemented from TypeDescription.

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

◆ getNamespace()

XMLTypeDescription::getNamespace ( )
See also
TypeDescription::getNamespace()

Reimplemented from TypeDescription.

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

◆ parseTypeName()

XMLTypeDescription::parseTypeName (   $typeName)

Parse a type name

Parameters
$typeNamestring
Returns
boolean true if success, otherwise false

Reimplemented from TypeDescription.

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

◆ setValidationStrategy()

XMLTypeDescription::setValidationStrategy (   $validationStrategy)

Set the validation strategy

Parameters
$validationStrategystring XML_TYPE_DESCRIPTION_VALIDATE_...

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

Field Documentation

◆ $_validationSource

string XMLTypeDescription::$_validationSource

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

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

◆ $_validationStrategy

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: