registerAllNamespaces(Zend_Gdata_Exif::$namespaces); parent::__construct(); $this->setDistance($distance); $this->setExposure($exposure); $this->setFlash($flash); $this->setFocalLength($focalLength); $this->setFStop($fStop); $this->setImageUniqueId($imageUniqueId); $this->setIso($iso); $this->setMake($make); $this->setModel($model); $this->setTime($time); } /** * 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->_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; } /** * Creates individual Entry objects of the appropriate type and * stores them as members of this entry based upon DOM data. * * @param DOMNode $child The DOMNode to process */ protected function takeChildFromDOM($child) { $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; switch ($absoluteNodeName) { case $this->lookupNamespace('exif') . ':' . 'distance'; $distance = new Zend_Gdata_Exif_Extension_Distance(); $distance->transferFromDOM($child); $this->_distance = $distance; break; case $this->lookupNamespace('exif') . ':' . 'exposure'; $exposure = new Zend_Gdata_Exif_Extension_Exposure(); $exposure->transferFromDOM($child); $this->_exposure = $exposure; break; case $this->lookupNamespace('exif') . ':' . 'flash'; $flash = new Zend_Gdata_Exif_Extension_Flash(); $flash->transferFromDOM($child); $this->_flash = $flash; break; case $this->lookupNamespace('exif') . ':' . 'focallength'; $focalLength = new Zend_Gdata_Exif_Extension_FocalLength(); $focalLength->transferFromDOM($child); $this->_focalLength = $focalLength; break; case $this->lookupNamespace('exif') . ':' . 'fstop'; $fStop = new Zend_Gdata_Exif_Extension_FStop(); $fStop->transferFromDOM($child); $this->_fStop = $fStop; break; case $this->lookupNamespace('exif') . ':' . 'imageUniqueID'; $imageUniqueId = new Zend_Gdata_Exif_Extension_ImageUniqueId(); $imageUniqueId->transferFromDOM($child); $this->_imageUniqueId = $imageUniqueId; break; case $this->lookupNamespace('exif') . ':' . 'iso'; $iso = new Zend_Gdata_Exif_Extension_Iso(); $iso->transferFromDOM($child); $this->_iso = $iso; break; case $this->lookupNamespace('exif') . ':' . 'make'; $make = new Zend_Gdata_Exif_Extension_Make(); $make->transferFromDOM($child); $this->_make = $make; break; case $this->lookupNamespace('exif') . ':' . 'model'; $model = new Zend_Gdata_Exif_Extension_Model(); $model->transferFromDOM($child); $this->_model = $model; break; case $this->lookupNamespace('exif') . ':' . 'time'; $time = new Zend_Gdata_Exif_Extension_Time(); $time->transferFromDOM($child); $this->_time = $time; break; } } /** * Get the value for this element's distance attribute. * * @see setDistance * @return Zend_Gdata_Exif_Extension_Distance The requested attribute. */ public function getDistance() { return $this->_distance; } /** * Set the value for this element's distance attribute. * * @param Zend_Gdata_Exif_Extension_Distance $value The desired value for this attribute. * @return Zend_Gdata_Exif_Extension_Tags Provides a fluent interface */ public function setDistance($value) { $this->_distance = $value; return $this; } /** * Get the value for this element's exposure attribute. * * @see setExposure * @return Zend_Gdata_Exif_Extension_Exposure The requested attribute. */ public function getExposure() { return $this->_exposure; } /** * Set the value for this element's exposure attribute. * * @param Zend_Gdata_Exif_Extension_Exposure $value The desired value for this attribute. * @return Zend_Gdata_Exif_Extension_Tags Provides a fluent interface */ public function setExposure($value) { $this->_exposure = $value; return $this; } /** * Get the value for this element's flash attribute. * * @see setFlash * @return Zend_Gdata_Exif_Extension_Flash The requested attribute. */ public function getFlash() { return $this->_flash; } /** * Set the value for this element's flash attribute. * * @param Zend_Gdata_Exif_Extension_Flash $value The desired value for this attribute. * @return Zend_Gdata_Exif_Extension_Tags Provides a fluent interface */ public function setFlash($value) { $this->_flash = $value; return $this; } /** * Get the value for this element's name attribute. * * @see setFocalLength * @return Zend_Gdata_Exif_Extension_FocalLength The requested attribute. */ public function getFocalLength() { return $this->_focalLength; } /** * Set the value for this element's focalLength attribute. * * @param Zend_Gdata_Exif_Extension_FocalLength $value The desired value for this attribute. * @return Zend_Gdata_Exif_Extension_Tags Provides a fluent interface */ public function setFocalLength($value) { $this->_focalLength = $value; return $this; } /** * Get the value for this element's fStop attribute. * * @see setFStop * @return Zend_Gdata_Exif_Extension_FStop The requested attribute. */ public function getFStop() { return $this->_fStop; } /** * Set the value for this element's fStop attribute. * * @param Zend_Gdata_Exif_Extension_FStop $value The desired value for this attribute. * @return Zend_Gdata_Exif_Extension_Tags Provides a fluent interface */ public function setFStop($value) { $this->_fStop = $value; return $this; } /** * Get the value for this element's imageUniqueId attribute. * * @see setImageUniqueId * @return Zend_Gdata_Exif_Extension_ImageUniqueId The requested attribute. */ public function getImageUniqueId() { return $this->_imageUniqueId; } /** * Set the value for this element's imageUniqueId attribute. * * @param Zend_Gdata_Exif_Extension_ImageUniqueId $value The desired value for this attribute. * @return Zend_Gdata_Exif_Extension_Tags Provides a fluent interface */ public function setImageUniqueId($value) { $this->_imageUniqueId = $value; return $this; } /** * Get the value for this element's iso attribute. * * @see setIso * @return Zend_Gdata_Exif_Extension_Iso The requested attribute. */ public function getIso() { return $this->_iso; } /** * Set the value for this element's iso attribute. * * @param Zend_Gdata_Exif_Extension_Iso $value The desired value for this attribute. * @return Zend_Gdata_Exif_Extension_Tags Provides a fluent interface */ public function setIso($value) { $this->_iso = $value; return $this; } /** * Get the value for this element's make attribute. * * @see setMake * @return Zend_Gdata_Exif_Extension_Make The requested attribute. */ public function getMake() { return $this->_make; } /** * Set the value for this element's make attribute. * * @param Zend_Gdata_Exif_Extension_Make $value The desired value for this attribute. * @return Zend_Gdata_Exif_Extension_Tags Provides a fluent interface */ public function setMake($value) { $this->_make = $value; return $this; } /** * Get the value for this element's model attribute. * * @see setModel * @return Zend_Gdata_Exif_Extension_Model The requested attribute. */ public function getModel() { return $this->_model; } /** * Set the value for this element's model attribute. * * @param Zend_Gdata_Exif_Extension_Model $value The desired value for this attribute. * @return Zend_Gdata_Exif_Extension_Tags Provides a fluent interface */ public function setModel($value) { $this->_model = $value; return $this; } /** * Get the value for this element's time attribute. * * @see setTime * @return Zend_Gdata_Exif_Extension_Time The requested attribute. */ public function getTime() { return $this->_time; } /** * Set the value for this element's time attribute. * * @param Zend_Gdata_Exif_Extension_Time $value The desired value for this attribute. * @return Zend_Gdata_Exif_Extension_Tags Provides a fluent interface */ public function setTime($value) { $this->_time = $value; return $this; } }