Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Gdata/Gbase/Extension/BaseAttribute.php
Go to the documentation of this file.
00001 <?php
00026 require_once 'Zend/Gdata/App/Extension/Element.php';
00027 
00037 class Zend_Gdata_Gbase_Extension_BaseAttribute extends Zend_Gdata_App_Extension_Element
00038 {
00039 
00045     protected $_rootNamespace = 'g';
00046 
00054     public function __construct($name = null, $text = null, $type = null)
00055     {
00056         $this->registerAllNamespaces(Zend_Gdata_Gbase::$namespaces);
00057         if ($type !== null) {
00058           $attr = array('name' => 'type', 'value' => $type);
00059           $typeAttr = array('type' => $attr);
00060           $this->setExtensionAttributes($typeAttr);
00061         }
00062         parent::__construct($name,
00063                             $this->_rootNamespace,
00064                             $this->lookupNamespace($this->_rootNamespace),
00065                             $text);
00066     }
00067 
00073     public function getName() {
00074       return $this->_rootElement;
00075     }
00076 
00082     public function getType() {
00083       $typeAttr = $this->getExtensionAttributes();
00084       return $typeAttr['type']['value'];
00085     }
00086 
00095     public function setName($name) {
00096       $this->_rootElement = $name;
00097       return $this;
00098     }
00099 
00108     public function setType($type) {
00109       $attr = array('name' => 'type', 'value' => $type);
00110       $typeAttr = array('type' => $attr);
00111       $this->setExtensionAttributes($typeAttr);
00112       return $this;
00113     }
00114 
00115 }
 All Data Structures Namespaces Files Functions Variables Enumerations