|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00026 require_once 'Zend/Gdata/App/Extension/Link.php'; 00027 00031 require_once 'Zend/Gdata/Calendar/Extension/WebContent.php'; 00032 00033 00043 class Zend_Gdata_Calendar_Extension_Link extends Zend_Gdata_App_Extension_Link 00044 { 00045 00046 protected $_webContent = null; 00047 00053 public function __construct($href = null, $rel = null, $type = null, 00054 $hrefLang = null, $title = null, $length = null, $webContent = null) 00055 { 00056 $this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces); 00057 parent::__construct($href, $rel, $type, $hrefLang, $title, $length); 00058 $this->_webContent = $webContent; 00059 } 00060 00071 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) 00072 { 00073 $element = parent::getDOM($doc, $majorVersion, $minorVersion); 00074 if ($this->_webContent != null) { 00075 $element->appendChild($this->_webContent->getDOM($element->ownerDocument)); 00076 } 00077 return $element; 00078 } 00079 00086 protected function takeChildFromDOM($child) 00087 { 00088 $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; 00089 switch ($absoluteNodeName) { 00090 case $this->lookupNamespace('gCal') . ':' . 'webContent': 00091 $webContent = new Zend_Gdata_Calendar_Extension_WebContent(); 00092 $webContent->transferFromDOM($child); 00093 $this->_webContent = $webContent; 00094 break; 00095 default: 00096 parent::takeChildFromDOM($child); 00097 break; 00098 } 00099 } 00100 00106 public function getWebContent() 00107 { 00108 return $this->_webContent; 00109 } 00110 00117 public function setWebContent($value) 00118 { 00119 $this->_webContent = $value; 00120 return $this; 00121 } 00122 00123 00124 } 00125