From 06f945f27840b53e57795dadbc38e76f7e11ab1c Mon Sep 17 00:00:00 2001 From: Horus3 Date: Mon, 24 Feb 2014 16:42:14 +0100 Subject: init --- zend/library/Zend/Gdata/App/Extension/Text.php | 90 ++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 zend/library/Zend/Gdata/App/Extension/Text.php (limited to 'zend/library/Zend/Gdata/App/Extension/Text.php') diff --git a/zend/library/Zend/Gdata/App/Extension/Text.php b/zend/library/Zend/Gdata/App/Extension/Text.php new file mode 100644 index 0000000..9fc0c5d --- /dev/null +++ b/zend/library/Zend/Gdata/App/Extension/Text.php @@ -0,0 +1,90 @@ +_text = $text; + $this->_type = $type; + } + + public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) + { + $element = parent::getDOM($doc, $majorVersion, $minorVersion); + if ($this->_type !== null) { + $element->setAttribute('type', $this->_type); + } + return $element; + } + + protected function takeAttributeFromDOM($attribute) + { + switch ($attribute->localName) { + case 'type': + $this->_type = $attribute->nodeValue; + break; + default: + parent::takeAttributeFromDOM($attribute); + } + } + + /* + * @return Zend_Gdata_App_Extension_Type + */ + public function getType() + { + return $this->_type; + } + + /* + * @param string $value + * @return Zend_Gdata_App_Extension_Text Provides a fluent interface + */ + public function setType($value) + { + $this->_type = $value; + return $this; + } + +} -- cgit v1.2.3