Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Gdata/Media/Extension/MediaRating.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_MediaRating extends Zend_Gdata_Extension
00039 {
00040 
00041     protected $_rootElement = 'rating';
00042     protected $_rootNamespace = 'media';
00043 
00047     protected $_scheme = null;
00048 
00055     public function __construct($text = null, $scheme = null)
00056     {
00057         $this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
00058         parent::__construct();
00059         $this->_scheme = $scheme;
00060         $this->_text = $text;
00061     }
00062 
00073     public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
00074     {
00075         $element = parent::getDOM($doc, $majorVersion, $minorVersion);
00076         if ($this->_scheme !== null) {
00077             $element->setAttribute('scheme', $this->_scheme);
00078         }
00079         return $element;
00080     }
00081 
00089     protected function takeAttributeFromDOM($attribute)
00090     {
00091         switch ($attribute->localName) {
00092         case 'scheme':
00093             $this->_scheme = $attribute->nodeValue;
00094             break;
00095         default:
00096             parent::takeAttributeFromDOM($attribute);
00097         }
00098     }
00099 
00103     public function getScheme()
00104     {
00105         return $this->_scheme;
00106     }
00107 
00112     public function setScheme($value)
00113     {
00114         $this->_scheme = $value;
00115         return $this;
00116     }
00117 
00118 }
 All Data Structures Namespaces Files Functions Variables Enumerations