00001 <?php 00002 00012 class FormsMailer extends Mailer { 00022 public function setFormMessage($xml = "") { 00023 $result = $this->recurseForm($xml); 00024 $this->message = $result; 00025 } 00026 00035 private function recurseForm($xml) { 00036 $xmlObject = simplexml_load_string($xml); 00037 return $this->recurseFormHelper($xmlObject->model); 00038 } 00039 00051 private function recurseFormHelper($xmlObject) { 00052 $message = ""; 00053 foreach($xmlObject->children() as $tag=>$child) { 00054 $message .= $tag . ": " . XFormsFunctions::contentFromXML($child) . "\n\n"; 00055 if(count($child->children()) > 0) { 00056 $message .= $this->recurseFormHelper($child); 00057 } 00058 } 00059 return $message; 00060 } 00061 } 00062 ?>
1.5.6