Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Gdata/Media/Extension/MediaContent.php
Go to the documentation of this file.
00001 <?php
00002 
00027 require_once 'Zend/Gdata/Extension.php';
00028 
00041 class Zend_Gdata_Media_Extension_MediaContent extends Zend_Gdata_Extension
00042 {
00043     protected $_rootElement = 'content';
00044     protected $_rootNamespace = 'media';
00045 
00049     protected $_url = null;
00050 
00054     protected $_fileSize = null;
00055 
00059     protected $_type = null;
00060 
00064     protected $_medium = null;
00065 
00069     protected $_isDefault = null;
00070 
00074     protected $_expression = null;
00075 
00079     protected $_bitrate = null;
00080 
00084     protected $_framerate = null;
00085 
00089     protected $_samplingrate = null;
00090 
00094     protected $_channels = null;
00095 
00099     protected $_duration = null;
00100 
00104     protected $_height = null;
00105 
00109     protected $_width = null;
00110 
00114     protected $_lang = null;
00115 
00119     public function __construct($url = null, $fileSize = null, $type = null,
00120             $medium = null, $isDefault = null, $expression = null,
00121             $bitrate = null, $framerate = null, $samplingrate = null,
00122             $channels = null, $duration = null, $height = null, $width = null,
00123             $lang = null)
00124     {
00125         $this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
00126         parent::__construct();
00127         $this->_url = $url;
00128         $this->_fileSize = $fileSize;
00129         $this->_type = $type;
00130         $this->_medium = $medium;
00131         $this->_isDefault = $isDefault;
00132         $this->_expression = $expression;
00133         $this->_bitrate = $bitrate;
00134         $this->_framerate = $framerate;
00135         $this->_samplingrate = $samplingrate;
00136         $this->_channels = $channels;
00137         $this->_duration = $duration;
00138         $this->_height = $height;
00139         $this->_width = $width;
00140         $this->_lang = $lang;
00141     }
00142 
00143 
00154     public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
00155     {
00156         $element = parent::getDOM($doc, $majorVersion, $minorVersion);
00157         if ($this->_url !== null) {
00158             $element->setAttribute('url', $this->_url);
00159         }
00160         if ($this->_fileSize !== null) {
00161             $element->setAttribute('fileSize', $this->_fileSize);
00162         }
00163         if ($this->_type !== null) {
00164             $element->setAttribute('type', $this->_type);
00165         }
00166         if ($this->_medium !== null) {
00167             $element->setAttribute('medium', $this->_medium);
00168         }
00169         if ($this->_isDefault !== null) {
00170             $element->setAttribute('isDefault', $this->_isDefault);
00171         }
00172         if ($this->_expression !== null) {
00173             $element->setAttribute('expression', $this->_expression);
00174         }
00175         if ($this->_bitrate !== null) {
00176             $element->setAttribute('bitrate', $this->_bitrate);
00177         }
00178         if ($this->_framerate !== null) {
00179             $element->setAttribute('framerate', $this->_framerate);
00180         }
00181         if ($this->_samplingrate !== null) {
00182             $element->setAttribute('samplingrate', $this->_samplingrate);
00183         }
00184         if ($this->_channels !== null) {
00185             $element->setAttribute('channels', $this->_channels);
00186         }
00187         if ($this->_duration !== null) {
00188             $element->setAttribute('duration', $this->_duration);
00189         }
00190         if ($this->_height !== null) {
00191             $element->setAttribute('height', $this->_height);
00192         }
00193         if ($this->_width !== null) {
00194             $element->setAttribute('width', $this->_width);
00195         }
00196         if ($this->_lang !== null) {
00197             $element->setAttribute('lang', $this->_lang);
00198         }
00199         return $element;
00200     }
00201 
00209     protected function takeAttributeFromDOM($attribute)
00210     {
00211         switch ($attribute->localName) {
00212             case 'url':
00213                 $this->_url = $attribute->nodeValue;
00214                 break;
00215             case 'fileSize':
00216                 $this->_fileSize = $attribute->nodeValue;
00217                 break;
00218             case 'type':
00219                 $this->_type = $attribute->nodeValue;
00220                 break;
00221             case 'medium':
00222                 $this->_medium = $attribute->nodeValue;
00223                 break;
00224             case 'isDefault':
00225                 $this->_isDefault = $attribute->nodeValue;
00226                 break;
00227             case 'expression':
00228                 $this->_expression = $attribute->nodeValue;
00229                 break;
00230             case 'bitrate':
00231                 $this->_bitrate = $attribute->nodeValue;
00232                 break;
00233             case 'framerate':
00234                 $this->_framerate = $attribute->nodeValue;
00235                 break;
00236             case 'samplingrate':
00237                 $this->_samplingrate = $attribute->nodeValue;
00238                 break;
00239             case 'channels':
00240                 $this->_channels = $attribute->nodeValue;
00241                 break;
00242             case 'duration':
00243                 $this->_duration = $attribute->nodeValue;
00244                 break;
00245             case 'height':
00246                 $this->_height = $attribute->nodeValue;
00247                 break;
00248             case 'width':
00249                 $this->_width = $attribute->nodeValue;
00250                 break;
00251             case 'lang':
00252                 $this->_lang = $attribute->nodeValue;
00253                 break;
00254             default:
00255                 parent::takeAttributeFromDOM($attribute);
00256         }
00257     }
00258 
00264     public function __toString()
00265     {
00266         return $this->getUrl();
00267     }
00268 
00272     public function getUrl()
00273     {
00274         return $this->_url;
00275     }
00276 
00281     public function setUrl($value)
00282     {
00283         $this->_url = $value;
00284         return $this;
00285     }
00286 
00290     public function getFileSize()
00291     {
00292         return $this->_fileSize;
00293     }
00294 
00299     public function setFileSize($value)
00300     {
00301         $this->_fileSize = $value;
00302         return $this;
00303     }
00304 
00308     public function getType()
00309     {
00310         return $this->_type;
00311     }
00312 
00317     public function setType($value)
00318     {
00319         $this->_type = $value;
00320         return $this;
00321     }
00322 
00326     public function getMedium()
00327     {
00328         return $this->_medium;
00329     }
00330 
00335     public function setMedium($value)
00336     {
00337         $this->_medium = $value;
00338         return $this;
00339     }
00340 
00344     public function getIsDefault()
00345     {
00346         return $this->_isDefault;
00347     }
00348 
00353     public function setIsDefault($value)
00354     {
00355         $this->_isDefault = $value;
00356         return $this;
00357     }
00358 
00362     public function getExpression()
00363     {
00364         return $this->_expression;
00365     }
00366 
00371     public function setExpression($value)
00372     {
00373         $this->_expression = $value;
00374         return $this;
00375     }
00376 
00380     public function getBitrate()
00381     {
00382         return $this->_bitrate;
00383     }
00384 
00389     public function setBitrate($value)
00390     {
00391         $this->_bitrate = $value;
00392         return $this;
00393     }
00394 
00398     public function getFramerate()
00399     {
00400         return $this->_framerate;
00401     }
00402 
00407     public function setFramerate($value)
00408     {
00409         $this->_framerate = $value;
00410         return $this;
00411     }
00412 
00416     public function getSamplingrate()
00417     {
00418         return $this->_samplingrate;
00419     }
00420 
00425     public function setSamplingrate($value)
00426     {
00427         $this->_samplingrate = $value;
00428         return $this;
00429     }
00430 
00434     public function getChannels()
00435     {
00436         return $this->_channels;
00437     }
00438 
00443     public function setChannels($value)
00444     {
00445         $this->_channels = $value;
00446         return $this;
00447     }
00448 
00452     public function getDuration()
00453     {
00454         return $this->_duration;
00455     }
00456 
00462     public function setDuration($value)
00463     {
00464         $this->_duration = $value;
00465         return $this;
00466     }
00467 
00471     public function getHeight()
00472     {
00473         return $this->_height;
00474     }
00475 
00480     public function setHeight($value)
00481     {
00482         $this->_height = $value;
00483         return $this;
00484     }
00485 
00489     public function getWidth()
00490     {
00491         return $this->_width;
00492     }
00493 
00498     public function setWidth($value)
00499     {
00500         $this->_width = $value;
00501         return $this;
00502     }
00503 
00507     public function getLang()
00508     {
00509         return $this->_lang;
00510     }
00511 
00516     public function setLang($value)
00517     {
00518         $this->_lang = $value;
00519         return $this;
00520     }
00521 
00522 }
 All Data Structures Namespaces Files Functions Variables Enumerations