SnapContentXml Class Reference
[Content Modules]

XML Content Module. More...

Inheritance diagram for SnapContentXml:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 checkMedia ()
 Checks whether on-disk media is available and correct.
 getXML ()
 Retrieve raw XML from content module.
 setXML ($xml)
 Set the XML content.

Static Public Member Functions

static initialValue ()
 Returns initial value for new versions of this type.

Protected Member Functions

 doGetHTML ($params)
 validate ()


Detailed Description

XML Content Module.

This content module contains schema-validated Shodor Standard XML 3.0. Invalid XML is not allowed to be stored in this content module, to prevent invalid data from being stored in Snap2.

Definition at line 11 of file SnapContentXml.php5.


Member Function Documentation

SnapContentXml::checkMedia (  ) 

Checks whether on-disk media is available and correct.

For internal use only.

For non-media-based content, this method should always return true. Otherwise, it should check to make sure all files it is responsible for are on disk and readable by the webserver.

Returns:
[boolean]: whether on-disk media is correct

Reimplemented from SnapContent.

Definition at line 57 of file SnapContentXml.php5.

SnapContentXml::doGetHTML ( params  )  [protected]

For internal use only.

Reimplemented from SnapContent.

Definition at line 53 of file SnapContentXml.php5.

References SnapContent::getAll().

SnapContentXml::getXML (  ) 

Retrieve raw XML from content module.

Calling getHTML(), which is the normal method to extract content from a content module, will return translated XML => HTML. To get the raw XML, use this method.

Returns:
[string]: XML contained in this content module

Definition at line 43 of file SnapContentXml.php5.

References SnapContent::getAll().

static SnapContentXml::initialValue (  )  [static]

Returns initial value for new versions of this type.

For internal use only.

Definition at line 69 of file SnapContentXml.php5.

SnapContentXml::setXML ( xml  ) 

Set the XML content.

If the XML is invalid, an internal array is used to store the errors. The errors can be retrieved with getXMLError().

Parameters:
$xml [string]: valid XML string to put into this content module
Returns:
[boolean/array]: true if successful, array of errors otherwise

Definition at line 24 of file SnapContentXml.php5.

References SXMLHelper::formatXML(), SnapContent::setAll(), SObject::setWarning(), and SXMLHelper::validateXML().

SnapContentXml::validate (  )  [protected]

For internal use only.

Reimplemented from SnapContent.

Definition at line 48 of file SnapContentXml.php5.


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

Generated on Wed Nov 24 02:06:25 2010 for Common by  doxygen 1.5.6