Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Gdata/App/Extension/Content.php
Go to the documentation of this file.
00001 <?php
00002 
00027 require_once 'Zend/Gdata/App/Extension/Text.php';
00028 
00038 class Zend_Gdata_App_Extension_Content extends Zend_Gdata_App_Extension_Text
00039 {
00040 
00041     protected $_rootElement = 'content';
00042     protected $_src = null;
00043 
00044     public function __construct($text = null, $type = 'text', $src = null)
00045     {
00046         parent::__construct($text, $type);
00047         $this->_src = $src;
00048     }
00049 
00050     public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
00051     {
00052         $element = parent::getDOM($doc, $majorVersion, $minorVersion);
00053         if ($this->_src !== null) {
00054             $element->setAttribute('src', $this->_src);
00055         }
00056         return $element;
00057     }
00058 
00059     protected function takeAttributeFromDOM($attribute)
00060     {
00061         switch ($attribute->localName) {
00062         case 'src':
00063             $this->_src = $attribute->nodeValue;
00064             break;
00065         default:
00066             parent::takeAttributeFromDOM($attribute);
00067         }
00068     }
00069 
00073     public function getSrc()
00074     {
00075         return $this->_src;
00076     }
00077 
00082     public function setSrc($value)
00083     {
00084         $this->_src = $value;
00085         return $this;
00086     }
00087 
00088 }
 All Data Structures Namespaces Files Functions Variables Enumerations