Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Gdata/Calendar/Extension/AccessLevel.php
Go to the documentation of this file.
00001 <?php
00002 
00027 require_once 'Zend/Gdata/Extension.php';
00028 
00038 class Zend_Gdata_Calendar_Extension_AccessLevel extends Zend_Gdata_Extension
00039 {
00040 
00041     protected $_rootNamespace = 'gCal';
00042     protected $_rootElement = 'accesslevel';
00043     protected $_value = null;
00044 
00049     public function __construct($value = null)
00050     {
00051         $this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces);
00052         parent::__construct();
00053         $this->_value = $value;
00054     }
00055 
00066     public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
00067     {
00068         $element = parent::getDOM($doc, $majorVersion, $minorVersion);
00069         if ($this->_value != null) {
00070             $element->setAttribute('value', $this->_value);
00071         }
00072         return $element;
00073     }
00074 
00082     protected function takeAttributeFromDOM($attribute)
00083     {
00084         switch ($attribute->localName) {
00085         case 'value':
00086             $this->_value = $attribute->nodeValue;
00087             break;
00088         default:
00089             parent::takeAttributeFromDOM($attribute);
00090         }
00091     }
00092 
00098     public function getValue()
00099     {
00100         return $this->_value;
00101     }
00102 
00103 
00110     public function setValue($value)
00111     {
00112         $this->_value = $value;
00113         return $this;
00114     }
00115 
00120     public function __toString()
00121     {
00122         return $this->getValue();
00123     }
00124 
00125 }
 All Data Structures Namespaces Files Functions Variables Enumerations