Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Gdata/Media/Extension/MediaCopyright.php
Go to the documentation of this file.
00001 <?php
00002 
00027 require_once 'Zend/Gdata/App/Extension.php';
00028 
00038 class Zend_Gdata_Media_Extension_MediaCopyright extends Zend_Gdata_Extension
00039 {
00040 
00041     protected $_rootElement = 'copyright';
00042     protected $_rootNamespace = 'media';
00043 
00047     protected $_url = null;
00048 
00053     public function __construct($text = null, $url = null)
00054     {
00055         $this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
00056         parent::__construct();
00057         $this->_text = $text;
00058         $this->_url = $url;
00059     }
00060 
00071     public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
00072     {
00073         $element = parent::getDOM($doc, $majorVersion, $minorVersion);
00074         if ($this->_url !== null) {
00075             $element->setAttribute('url', $this->_url);
00076         }
00077         return $element;
00078     }
00079 
00087     protected function takeAttributeFromDOM($attribute)
00088     {
00089         switch ($attribute->localName) {
00090         case 'url':
00091             $this->_url = $attribute->nodeValue;
00092             break;
00093         default:
00094             parent::takeAttributeFromDOM($attribute);
00095         }
00096     }
00097 
00101     public function getUrl()
00102     {
00103         return $this->_url;
00104     }
00105 
00110     public function setUrl($value)
00111     {
00112         $this->_url = $value;
00113         return $this;
00114     }
00115 
00116 }
 All Data Structures Namespaces Files Functions Variables Enumerations