Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Gdata/Extension/Visibility.php
Go to the documentation of this file.
00001 <?php
00002 
00027 require_once 'Zend/Gdata/Extension.php';
00028 
00038 class Zend_Gdata_Extension_Visibility extends Zend_Gdata_Extension
00039 {
00040 
00041     protected $_rootElement = 'visibility';
00042     protected $_value = null;
00043 
00048     public function __construct($value = null)
00049     {
00050         parent::__construct();
00051         $this->_value = $value;
00052     }
00053 
00064     public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
00065     {
00066         $element = parent::getDOM($doc, $majorVersion, $minorVersion);
00067         if ($this->_value !== null) {
00068             $element->setAttribute('value', $this->_value);
00069         }
00070         return $element;
00071     }
00072 
00080     protected function takeAttributeFromDOM($attribute)
00081     {
00082         switch ($attribute->localName) {
00083         case 'value':
00084             $this->_value = $attribute->nodeValue;
00085             break;
00086         default:
00087             parent::takeAttributeFromDOM($attribute);
00088         }
00089     }
00090 
00096     public function getValue()
00097     {
00098         return $this->_value;
00099     }
00100 
00107     public function setValue($value)
00108     {
00109         $this->_value = $value;
00110         return $this;
00111     }
00112 
00117     public function __toString()
00118     {
00119         return $this->getValue();
00120     }
00121 
00122 }
00123 
 All Data Structures Namespaces Files Functions Variables Enumerations