|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00027 require_once 'Zend/Gdata/Entry.php'; 00028 00032 require_once 'Zend/Gdata/Health/Extension/Ccr.php'; 00033 00045 class Zend_Gdata_Health_ProfileEntry extends Zend_Gdata_Entry 00046 { 00052 protected $_entryClassName = 'Zend_Gdata_Health_ProfileEntry'; 00053 00059 protected $_ccrData = null; 00060 00065 public function __construct($element = null) 00066 { 00067 foreach (Zend_Gdata_Health::$namespaces as $nsPrefix => $nsUri) { 00068 $this->registerNamespace($nsPrefix, $nsUri); 00069 } 00070 parent::__construct($element); 00071 } 00072 00082 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) 00083 { 00084 $element = parent::getDOM($doc, $majorVersion, $minorVersion); 00085 if ($this->_ccrData !== null) { 00086 $element->appendChild($this->_ccrData->getDOM($element->ownerDocument)); 00087 } 00088 00089 return $element; 00090 } 00091 00098 protected function takeChildFromDOM($child) 00099 { 00100 $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; 00101 00102 if (strstr($absoluteNodeName, $this->lookupNamespace('ccr') . ':')) { 00103 $ccrElement = new Zend_Gdata_Health_Extension_Ccr(); 00104 $ccrElement->transferFromDOM($child); 00105 $this->_ccrData = $ccrElement; 00106 } else { 00107 parent::takeChildFromDOM($child); 00108 00109 } 00110 } 00111 00117 public function setCcr($ccrXMLStr) { 00118 $ccrElement = null; 00119 if ($ccrXMLStr != null) { 00120 $ccrElement = new Zend_Gdata_Health_Extension_Ccr(); 00121 $ccrElement->transferFromXML($ccrXMLStr); 00122 $this->_ccrData = $ccrElement; 00123 } 00124 return $ccrElement; 00125 } 00126 00127 00132 public function getCcr() { 00133 return $this->_ccrData; 00134 } 00135 }