Example #1
0
 /**
  * Constructs a new MediaKeywords element
  */
 public function __construct()
 {
     foreach (Zend_Gdata_Media::$namespaces as $nsPrefix => $nsUri) {
         $this->registerNamespace($nsPrefix, $nsUri);
     }
     parent::__construct();
 }
Example #2
0
 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
 {
     $element = parent::getDOM($doc, $majorVersion, $minorVersion);
     if ($this->_distance !== null) {
         $element->appendChild($this->_distance->getDOM($element->ownerDocument));
     }
     if ($this->_exposure !== null) {
         $element->appendChild($this->_exposure->getDOM($element->ownerDocument));
     }
     if ($this->_flash !== null) {
         $element->appendChild($this->_flash->getDOM($element->ownerDocument));
     }
     if ($this->_focalLength !== null) {
         $element->appendChild($this->_focalLength->getDOM($element->ownerDocument));
     }
     if ($this->_fStop !== null) {
         $element->appendChild($this->_fStop->getDOM($element->ownerDocument));
     }
     if ($this->_imageUniqueId !== null) {
         $element->appendChild($this->_imageUniqueId->getDOM($element->ownerDocument));
     }
     if ($this->_iso !== null) {
         $element->appendChild($this->_iso->getDOM($element->ownerDocument));
     }
     if ($this->_make !== null) {
         $element->appendChild($this->_make->getDOM($element->ownerDocument));
     }
     if ($this->_model !== null) {
         $element->appendChild($this->_model->getDOM($element->ownerDocument));
     }
     if ($this->_time !== null) {
         $element->appendChild($this->_time->getDOM($element->ownerDocument));
     }
     return $element;
 }
Example #3
0
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'countHint':
             $this->_countHint = $attribute->nodeValue;
             break;
         case 'href':
             $this->_href = $attribute->nodeValue;
             break;
         case 'readOnly':
             if ($attribute->nodeValue == "true") {
                 $this->_readOnly = true;
             } else {
                 if ($attribute->nodeValue == "false") {
                     $this->_readOnly = false;
                 } else {
                     throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value.");
                 }
             }
             break;
         case 'rel':
             $this->_rel = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
Example #4
0
 /**
  * Constructs a new Zend_Gdata_YouTube_Extension_VideoShare object.
  * @param bool $enabled(optional) The enabled value of the element.
  */
 public function __construct($enabled = null)
 {
     foreach (Zend_Gdata_YouTube::$namespaces as $nsPrefix => $nsUri) {
         $this->registerNamespace($nsPrefix, $nsUri);
     }
     parent::__construct();
 }
Example #5
0
 /**
  * Constructs a new Zend_Gdata_Spreadsheets_Extension_ColCount element.
  * @param string $text (optional) Text contents of the element.
  */
 public function __construct($text = null)
 {
     parent::__construct();
     $this->_text = $text;
     foreach (Zend_Gdata_Spreadsheets::$namespaces as $nsPrefix => $nsUri) {
         $this->registerNamespace($nsPrefix, $nsUri);
     }
 }
Example #6
0
 /**
  * Retrieves a DOMElement which corresponds to this element and all
  * child properties.  This is used to build an entry back into a DOM
  * and eventually XML text for application storage/persistence.
  *
  * @param DOMDocument $doc The DOMDocument used to construct DOMElements
  * @return DOMElement The DOMElement representing this element and all
  *          child properties.
  */
 public function getDOM($doc = null)
 {
     $element = parent::getDOM($doc);
     if ($this->_pos !== null) {
         $element->appendChild($this->_pos->getDOM($element->ownerDocument));
     }
     return $element;
 }
Example #7
0
 public function __toString()
 {
     if ($this->_valueString != null) {
         return $this->_valueString;
     } else {
         return parent::__toString();
     }
 }
Example #8
0
 /**
  * Constructor for Zend_Gdata_DublinCore_Extension_Creator which
  * Entity primarily responsible for making the resource
  *
  * @param DOMElement $element (optional) DOMElement from which this
  *          object should be constructed.
  */
 public function __construct($value = null)
 {
     foreach (Zend_Gdata_DublinCore::$namespaces as $nsPrefix => $nsUri) {
         $this->registerNamespace($nsPrefix, $nsUri);
     }
     parent::__construct();
     $this->_text = $value;
 }
 /**
  * Retrieves a DOMElement which corresponds to this element and all
  * child properties.  This is used to build an entry back into a DOM
  * and eventually XML text for application storage/persistence.
  *
  * @param DOMDocument $doc The DOMDocument used to construct DOMElements
  * @return DOMElement The DOMElement representing this element and all
  *          child properties.
  */
 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
 {
     $element = parent::getDOM($doc, $majorVersion, $minorVersion);
     if ($this->_point !== null) {
         $element->appendChild($this->_point->getDOM($element->ownerDocument));
     }
     return $element;
 }
Example #10
0
 /**
  * Retrieves a DOMElement which corresponds to this element and all
  * child properties.  This is used to build an entry back into a DOM
  * and eventually XML text for sending to the server upon updates, or
  * for application storage/persistence.
  *
  * @param DOMDocument $doc The DOMDocument used to construct DOMElements
  * @return DOMElement The DOMElement representing this element and all
  * child properties.
  */
 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
 {
     $element = parent::getDOM($doc, $majorVersion, $minorVersion);
     if ($this->_value != null) {
         $element->setAttribute('value', $this->_value);
     }
     return $element;
 }
Example #11
0
 /**
  * Constructs a new Zend_Gdata_Photos_Extension_Nickname object.
  * 
  * @param string $text (optional) The value being represented.
  */
 public function __construct($text = null)
 {
     foreach (Zend_Gdata_Photos::$namespaces as $nsPrefix => $nsUri) {
         $this->registerNamespace($nsPrefix, $nsUri);
     }
     parent::__construct();
     $this->setText($text);
 }
Example #12
0
 /**
  * Given a DOMNode representing an attribute, tries to map the data into
  * instance members.  If no mapping is defined, the name and value are
  * stored in an array.
  *
  * @param DOMNode $attribute The DOMNode attribute needed to be handled
  */
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'value':
             $this->_value = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
 /**
  * Given a DOMNode representing an attribute, tries to map the data into
  * instance members.  If no mapping is defined, the name and value are 
  * stored in an array.
  *
  * @param DOMNode $attribute The DOMNode attribute needed to be handled
  */
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'specialized':
             $this->_specialzied = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'id':
             $this->_id = $attribute->nodeValue;
             break;
         case 'href':
             $this->_href = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
Example #15
0
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'familyName':
             $this->_familyName = $attribute->nodeValue;
             break;
         case 'givenName':
             $this->_givenName = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
Example #16
0
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'relationship':
             $this->_relationship = $attribute->nodeValue;
             break;
         case 'type':
             $this->_type = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
Example #17
0
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'scheme':
             $this->_scheme = $attribute->nodeValue;
             break;
         case 'label':
             $this->_label = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
Example #18
0
 /**
  * Given a DOMNode representing an attribute, tries to map the data into
  * instance members.  If no mapping is defined, the name and value are
  * stored in an array.
  *
  * @param DOMNode $attribute The DOMNode attribute needed to be handled
  */
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'name':
             $name = explode(':', $attribute->nodeValue);
             $this->_name = end($name);
             break;
         case 'value':
             $this->_value = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
Example #19
0
 protected function takeChildFromDOM($child)
 {
     $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
     switch ($absoluteNodeName) {
         case $this->lookupNamespace('gd') . ':' . 'when':
             $when = new Zend_Gdata_Extension_When();
             $when->transferFromDOM($child);
             $this->_when = $when;
             break;
         default:
             parent::takeChildFromDOM($child);
             break;
     }
 }
Example #20
0
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'startTime':
             $this->_startTime = $attribute->nodeValue;
             break;
         case 'endTime':
             $this->_endTime = $attribute->nodeValue;
             break;
         case 'valueString':
             $this->_valueString = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
Example #21
0
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'name':
             $this->_name = $attribute->nodeValue;
             break;
         case 'reasonCode':
             $this->_reasonCode = $attribute->nodeValue;
             break;
         case 'helpUrl':
             $this->_helpUrl = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
Example #22
0
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'url':
             $this->_url = $attribute->nodeValue;
             break;
         case 'width':
             $this->_width = $attribute->nodeValue;
             break;
         case 'height':
             $this->_height = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
Example #23
0
 /**
  * Extracts XML attributes from the DOM and converts them to the
  * appropriate object members.
  *
  * @param DOMNode $attribute The DOMNode attribute to be handled.
  */
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'primary':
             if (strtolower($attribute->nodeValue) == 'true') {
                 $this->_isPrimary = true;
             } else {
                 $this->_isPrimary = false;
             }
             break;
         case 'rel':
             $this->_addressType = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
Example #24
0
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'value':
             if ($attribute->nodeValue == "true") {
                 $this->_value = true;
             } else {
                 if ($attribute->nodeValue == "false") {
                     $this->_value = false;
                 } else {
                     throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value.");
                 }
             }
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
Example #25
0
 protected function takeChildFromDOM($child)
 {
     $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
     switch ($absoluteNodeName) {
         case $this->lookupNamespace('gd') . ':' . 'entryLink':
             $entryLink = new Zend_Gdata_Extension_EntryLink();
             $entryLink->transferFromDOM($child);
             $this->_entryLink = $entryLink;
             break;
         case $this->lookupNamespace('gd') . ':' . 'originalEvent':
             $originalEvent = new Zend_Gdata_Extension_OriginalEvent();
             $originalEvent->transferFromDOM($child);
             $this->_originalEvent = $originalEvent;
             break;
         default:
             parent::takeChildFromDOM($child);
             break;
     }
 }
Example #26
0
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'min':
             $this->_min = $attribute->nodeValue;
             break;
         case 'max':
             $this->_max = $attribute->nodeValue;
             break;
         case 'numRaters':
             $this->_numRaters = $attribute->nodeValue;
             break;
         case 'average':
             $this->_average = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
Example #27
0
 protected function takeChildFromDOM($child)
 {
     $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
     switch ($absoluteNodeName) {
         case $this->lookupNamespace('gd') . ':' . 'orgName':
             $entry = new Zend_Gdata_Entry();
             $entry->transferFromDOM($child);
             $this->_orgName = $entry;
             break;
         case $this->lookupNamespace('gd') . ':' . 'orgTitle':
             $entry = new Zend_Gdata_Entry();
             $entry->transferFromDOM($child);
             $this->_orgTitle = $entry;
             break;
         default:
             parent::takeChildFromDOM($child);
             break;
     }
 }
Example #28
0
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'row':
             $this->_row = $attribute->nodeValue;
             break;
         case 'col':
             $this->_col = $attribute->nodeValue;
             break;
         case 'inputValue':
             $this->_inputValue = $attribute->nodeValue;
             break;
         case 'numericValue':
             $this->_numericValue = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
Example #29
0
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'type':
             $this->_type = $attribute->nodeValue;
             break;
         case 'lang':
             $this->_lang = $attribute->nodeValue;
             break;
         case 'start':
             $this->_start = $attribute->nodeValue;
             break;
         case 'end':
             $this->_end = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
Example #30
0
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'videoWatchCount':
             $this->_videoWatchCount = $attribute->nodeValue;
             break;
         case 'viewCount':
             $this->_viewCount = $attribute->nodeValue;
             break;
         case 'subscriberCount':
             $this->_subscriberCount = $attribute->nodeValue;
             break;
         case 'lastWebAccess':
             $this->_lastWebAccess = $attribute->nodeValue;
             break;
         case 'favoriteCount':
             $this->_favoriteCount = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }