Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Gdata/YouTube/Extension/MediaRating.php
Go to the documentation of this file.
00001 <?php
00002 
00027 require_once 'Zend/Gdata/Extension.php';
00028 
00038 class Zend_Gdata_YouTube_Extension_MediaRating extends Zend_Gdata_Extension
00039 {
00040 
00041     protected $_rootElement = 'rating';
00042     protected $_rootNamespace = 'media';
00043 
00047     protected $_scheme = null;
00048 
00052     protected $_country = null;
00053 
00061     public function __construct($text = null, $scheme = null, $country = null)
00062     {
00063         $this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
00064         parent::__construct();
00065         $this->_scheme = $scheme;
00066         $this->_country = $country;
00067         $this->_text = $text;
00068     }
00069 
00080     public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
00081     {
00082         $element = parent::getDOM($doc, $majorVersion, $minorVersion);
00083         if ($this->_scheme !== null) {
00084             $element->setAttribute('scheme', $this->_scheme);
00085         }
00086         if ($this->_country != null) {
00087             $element->setAttribute('country', $this->_country);
00088         }
00089         return $element;
00090     }
00091 
00099     protected function takeAttributeFromDOM($attribute)
00100     {
00101         switch ($attribute->localName) {
00102         case 'scheme':
00103             $this->_scheme = $attribute->nodeValue;
00104             break;
00105         case 'country':
00106             $this->_country = $attribute->nodeValue;
00107             break;
00108         default:
00109             parent::takeAttributeFromDOM($attribute);
00110         }
00111     }
00112 
00116     public function getScheme()
00117     {
00118         return $this->_scheme;
00119     }
00120 
00125     public function setScheme($value)
00126     {
00127         $this->_scheme = $value;
00128         return $this;
00129     }
00130 
00134     public function getCountry()
00135     {
00136         return $this->_country;
00137     }
00138 
00143     public function setCountry($value)
00144     {
00145         $this->_country = $value;
00146         return $this;
00147     }
00148 
00149 
00150 }
 All Data Structures Namespaces Files Functions Variables Enumerations