FormsMailer Class Reference

Send XForms output via email. More...

Inheritance diagram for FormsMailer:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 setFormMessage ($xml="")
 Set the form message to be the output XML from an XForm.

Private Member Functions

 recurseForm ($xml)
 Recursively parse the XForms XML, adding each value as a line of text.
 recurseFormHelper ($xmlObject)
 Do the recursive work of parsing our XForms XML and converting it to text.


Detailed Description

Send XForms output via email.

An extension of the Mailer class that parses the output XML of an XForm and adds it to an outgoing email.

Author:
Ismael Torres <itorres@shodor.org> (2007)

Definition at line 12 of file FormsMailer.php5.


Member Function Documentation

FormsMailer::recurseForm ( xml  )  [private]

Recursively parse the XForms XML, adding each value as a line of text.

For internal use only.

Call recurseFormHelper() to do the recursive traverse of the XForms XML

Parameters:
$xml [string]: The XForms XML
Returns:
[string]: The output text for our email message

Definition at line 35 of file FormsMailer.php5.

References recurseFormHelper().

Referenced by setFormMessage().

FormsMailer::recurseFormHelper ( xmlObject  )  [private]

Do the recursive work of parsing our XForms XML and converting it to text.

For internal use only.

For each tag in our XForms XML, look at the name and value of the tag. Add a line of text to our output in the following format: Name: Value

If a node has children, recursively parse those as well.

Parameters:
$xmlObject [simplexml_object]: A node of the XForms XML as a simplexml_object
Returns:
[string]: The string representing this node of XML

Definition at line 51 of file FormsMailer.php5.

References XFormsFunctions::contentFromXML().

Referenced by recurseForm().

FormsMailer::setFormMessage ( xml = ""  ) 

Set the form message to be the output XML from an XForm.

This function accepts an XML string that is the output XML from an XForm. It then parses through the XML string, formatting the name and value of each node as pretty output for email. Finally, it sets the message content to be the formatted XML output.

Parameters:
$xml [string]: Output XML from XForms

Definition at line 22 of file FormsMailer.php5.

References recurseForm().


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

Generated on Wed Nov 24 02:05:52 2010 for Common by  doxygen 1.5.6