CC-2166: Packaging Improvements. Moved the Zend app into airtime_mvc. It is now installed to /var/www/airtime. Storage is now set to /srv/airtime/stor. Utils are now installed to /usr/lib/airtime/utils/. Added install/airtime-dircheck.php as a simple test to see if everything is install/uninstalled correctly.

This commit is contained in:
Paul Baranowski 2011-04-14 18:55:04 -04:00
parent 514777e8d2
commit b11cbd8159
4546 changed files with 138 additions and 51 deletions

View file

@ -0,0 +1,610 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: AlbumEntry.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Entry
*/
require_once 'Zend/Gdata/Entry.php';
/**
* @see Zend_Gdata_Photos_Extension_Access
*/
require_once 'Zend/Gdata/Photos/Extension/Access.php';
/**
* @see Zend_Gdata_Photos_Extension_BytesUsed
*/
require_once 'Zend/Gdata/Photos/Extension/BytesUsed.php';
/**
* @see Zend_Gdata_Photos_Extension_Location
*/
require_once 'Zend/Gdata/Photos/Extension/Location.php';
/**
* @see Zend_Gdata_Photos_Extension_Name
*/
require_once 'Zend/Gdata/Photos/Extension/Name.php';
/**
* @see Zend_Gdata_Photos_Extension_NumPhotos
*/
require_once 'Zend/Gdata/Photos/Extension/NumPhotos.php';
/**
* @see Zend_Gdata_Photos_Extension_NumPhotosRemaining
*/
require_once 'Zend/Gdata/Photos/Extension/NumPhotosRemaining.php';
/**
* @see Zend_Gdata_Photos_Extension_CommentCount
*/
require_once 'Zend/Gdata/Photos/Extension/CommentCount.php';
/**
* @see Zend_Gdata_Photos_Extension_CommentingEnabled
*/
require_once 'Zend/Gdata/Photos/Extension/CommentingEnabled.php';
/**
* @see Zend_Gdata_Photos_Extension_Id
*/
require_once 'Zend/Gdata/Photos/Extension/Id.php';
/**
* @see Zend_Gdata_Geo_Extension_GeoRssWhere
*/
require_once 'Zend/Gdata/Geo/Extension/GeoRssWhere.php';
/**
* @see Zend_Gdata_Media_Extension_MediaGroup
*/
require_once 'Zend/Gdata/Media/Extension/MediaGroup.php';
/**
* @see Zend_Gdata_App_Extension_Category
*/
require_once 'Zend/Gdata/App/Extension/Category.php';
/**
* Data model class for a Photo Album Entry.
*
* To transfer user entries to and from the servers, including
* creating new entries, refer to the service class,
* Zend_Gdata_Photos.
*
* This class represents <atom:entry> in the Google Data protocol.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_AlbumEntry extends Zend_Gdata_Entry
{
protected $_entryClassName = 'Zend_Gdata_Photos_AlbumEntry';
/**
* gphoto:id element
*
* @var Zend_Gdata_Photos_Extension_Id
*/
protected $_gphotoId = null;
/**
* gphoto:access element
*
* @var Zend_Gdata_Photos_Extension_Access
*/
protected $_gphotoAccess = null;
/**
* gphoto:location element
*
* @var Zend_Gdata_Photos_Extension_Location
*/
protected $_gphotoLocation = null;
/**
* gphoto:user element
*
* @var Zend_Gdata_Photos_Extension_User
*/
protected $_gphotoUser = null;
/**
* gphoto:nickname element
*
* @var Zend_Gdata_Photos_Extension_Nickname
*/
protected $_gphotoNickname = null;
/**
* gphoto:timestamp element
*
* @var Zend_Gdata_Photos_Extension_Timestamp
*/
protected $_gphotoTimestamp = null;
/**
* gphoto:name element
*
* @var Zend_Gdata_Photos_Extension_Name
*/
protected $_gphotoName = null;
/**
* gphoto:numphotos element
*
* @var Zend_Gdata_Photos_Extension_NumPhotos
*/
protected $_gphotoNumPhotos = null;
/**
* gphoto:commentCount element
*
* @var Zend_Gdata_Photos_Extension_CommentCount
*/
protected $_gphotoCommentCount = null;
/**
* gphoto:commentingEnabled element
*
* @var Zend_Gdata_Photos_Extension_CommentingEnabled
*/
protected $_gphotoCommentingEnabled = null;
/**
* media:group element
*
* @var Zend_Gdata_Media_MediaGroup
*/
protected $_mediaGroup = null;
/**
* georss:where element
*
* @var Zend_Gdata_Geo_Extension_GeoRssWhere
*/
protected $_geoRssWhere = null;
/**
* Create a new instance.
*
* @param DOMElement $element (optional) DOMElement from which this
* object should be constructed.
*/
public function __construct($element = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct($element);
$category = new Zend_Gdata_App_Extension_Category(
'http://schemas.google.com/photos/2007#album',
'http://schemas.google.com/g/2005#kind');
$this->setCategory(array($category));
}
/**
* 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->_gphotoTimestamp !== null) {
$element->appendChild($this->_gphotoTimestamp->getDOM($element->ownerDocument));
}
if ($this->_gphotoUser !== null) {
$element->appendChild($this->_gphotoUser->getDOM($element->ownerDocument));
}
if ($this->_gphotoNickname !== null) {
$element->appendChild($this->_gphotoNickname->getDOM($element->ownerDocument));
}
if ($this->_gphotoAccess !== null) {
$element->appendChild($this->_gphotoAccess->getDOM($element->ownerDocument));
}
if ($this->_gphotoLocation !== null) {
$element->appendChild($this->_gphotoLocation->getDOM($element->ownerDocument));
}
if ($this->_gphotoName !== null) {
$element->appendChild($this->_gphotoName->getDOM($element->ownerDocument));
}
if ($this->_gphotoNumPhotos !== null) {
$element->appendChild($this->_gphotoNumPhotos->getDOM($element->ownerDocument));
}
if ($this->_gphotoCommentCount !== null) {
$element->appendChild($this->_gphotoCommentCount->getDOM($element->ownerDocument));
}
if ($this->_gphotoCommentingEnabled !== null) {
$element->appendChild($this->_gphotoCommentingEnabled->getDOM($element->ownerDocument));
}
if ($this->_gphotoId !== null) {
$element->appendChild($this->_gphotoId->getDOM($element->ownerDocument));
}
if ($this->_mediaGroup !== null) {
$element->appendChild($this->_mediaGroup->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('gphoto') . ':' . 'access';
$access = new Zend_Gdata_Photos_Extension_Access();
$access->transferFromDOM($child);
$this->_gphotoAccess = $access;
break;
case $this->lookupNamespace('gphoto') . ':' . 'location';
$location = new Zend_Gdata_Photos_Extension_Location();
$location->transferFromDOM($child);
$this->_gphotoLocation = $location;
break;
case $this->lookupNamespace('gphoto') . ':' . 'name';
$name = new Zend_Gdata_Photos_Extension_Name();
$name->transferFromDOM($child);
$this->_gphotoName = $name;
break;
case $this->lookupNamespace('gphoto') . ':' . 'numphotos';
$numPhotos = new Zend_Gdata_Photos_Extension_NumPhotos();
$numPhotos->transferFromDOM($child);
$this->_gphotoNumPhotos = $numPhotos;
break;
case $this->lookupNamespace('gphoto') . ':' . 'commentCount';
$commentCount = new Zend_Gdata_Photos_Extension_CommentCount();
$commentCount->transferFromDOM($child);
$this->_gphotoCommentCount = $commentCount;
break;
case $this->lookupNamespace('gphoto') . ':' . 'commentingEnabled';
$commentingEnabled = new Zend_Gdata_Photos_Extension_CommentingEnabled();
$commentingEnabled->transferFromDOM($child);
$this->_gphotoCommentingEnabled = $commentingEnabled;
break;
case $this->lookupNamespace('gphoto') . ':' . 'id';
$id = new Zend_Gdata_Photos_Extension_Id();
$id->transferFromDOM($child);
$this->_gphotoId = $id;
break;
case $this->lookupNamespace('gphoto') . ':' . 'user';
$user = new Zend_Gdata_Photos_Extension_User();
$user->transferFromDOM($child);
$this->_gphotoUser = $user;
break;
case $this->lookupNamespace('gphoto') . ':' . 'timestamp';
$timestamp = new Zend_Gdata_Photos_Extension_Timestamp();
$timestamp->transferFromDOM($child);
$this->_gphotoTimestamp = $timestamp;
break;
case $this->lookupNamespace('gphoto') . ':' . 'nickname';
$nickname = new Zend_Gdata_Photos_Extension_Nickname();
$nickname->transferFromDOM($child);
$this->_gphotoNickname = $nickname;
break;
case $this->lookupNamespace('georss') . ':' . 'where';
$geoRssWhere = new Zend_Gdata_Geo_Extension_GeoRssWhere();
$geoRssWhere->transferFromDOM($child);
$this->_geoRssWhere = $geoRssWhere;
break;
case $this->lookupNamespace('media') . ':' . 'group';
$mediaGroup = new Zend_Gdata_Media_Extension_MediaGroup();
$mediaGroup->transferFromDOM($child);
$this->_mediaGroup = $mediaGroup;
break;
default:
parent::takeChildFromDOM($child);
break;
}
}
/**
* Get the value for this element's gphoto:access attribute.
*
* @see setGphotoAccess
* @return string The requested attribute.
*/
public function getGphotoAccess()
{
return $this->_gphotoAccess;
}
/**
* Set the value for this element's gphoto:access attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Access The element being modified.
*/
public function setGphotoAccess($value)
{
$this->_gphotoAccess = $value;
return $this;
}
/**
* Get the value for this element's gphoto:location attribute.
*
* @see setGphotoLocation
* @return string The requested attribute.
*/
public function getGphotoLocation()
{
return $this->_gphotoLocation;
}
/**
* Set the value for this element's gphoto:location attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Location The element being modified.
*/
public function setGphotoLocation($value)
{
$this->_location = $value;
return $this;
}
/**
* Get the value for this element's gphoto:name attribute.
*
* @see setGphotoName
* @return string The requested attribute.
*/
public function getGphotoName()
{
return $this->_gphotoName;
}
/**
* Set the value for this element's gphoto:name attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Name The element being modified.
*/
public function setGphotoName($value)
{
$this->_gphotoName = $value;
return $this;
}
/**
* Get the value for this element's gphoto:numphotos attribute.
*
* @see setGphotoNumPhotos
* @return string The requested attribute.
*/
public function getGphotoNumPhotos()
{
return $this->_gphotoNumPhotos;
}
/**
* Set the value for this element's gphoto:numphotos attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_NumPhotos The element being modified.
*/
public function setGphotoNumPhotos($value)
{
$this->_gphotoNumPhotos = $value;
return $this;
}
/**
* Get the value for this element's gphoto:commentCount attribute.
*
* @see setGphotoCommentCount
* @return string The requested attribute.
*/
public function getGphotoCommentCount()
{
return $this->_gphotoCommentCount;
}
/**
* Set the value for this element's gphoto:commentCount attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_CommentCount The element being modified.
*/
public function setGphotoCommentCount($value)
{
$this->_gphotoCommentCount = $value;
return $this;
}
/**
* Get the value for this element's gphoto:commentingEnabled attribute.
*
* @see setGphotoCommentingEnabled
* @return string The requested attribute.
*/
public function getGphotoCommentingEnabled()
{
return $this->_gphotoCommentingEnabled;
}
/**
* Set the value for this element's gphoto:commentingEnabled attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_CommentingEnabled The element being modified.
*/
public function setGphotoCommentingEnabled($value)
{
$this->_gphotoCommentingEnabled = $value;
return $this;
}
/**
* Get the value for this element's gphoto:id attribute.
*
* @see setGphotoId
* @return string The requested attribute.
*/
public function getGphotoId()
{
return $this->_gphotoId;
}
/**
* Set the value for this element's gphoto:id attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Id The element being modified.
*/
public function setGphotoId($value)
{
$this->_gphotoId = $value;
return $this;
}
/**
* Get the value for this element's georss:where attribute.
*
* @see setGeoRssWhere
* @return string The requested attribute.
*/
public function getGeoRssWhere()
{
return $this->_geoRssWhere;
}
/**
* Set the value for this element's georss:where attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Geo_Extension_GeoRssWhere The element being modified.
*/
public function setGeoRssWhere($value)
{
$this->_geoRssWhere = $value;
return $this;
}
/**
* Get the value for this element's media:group attribute.
*
* @see setMediaGroup
* @return string The requested attribute.
*/
public function getMediaGroup()
{
return $this->_mediaGroup;
}
/**
* Set the value for this element's media:group attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Media_Extension_MediaGroup The element being modified.
*/
public function setMediaGroup($value)
{
$this->_mediaGroup = $value;
return $this;
}
/**
* Get the value for this element's gphoto:user attribute.
*
* @see setGphotoUser
* @return string The requested attribute.
*/
public function getGphotoUser()
{
return $this->_gphotoUser;
}
/**
* Set the value for this element's gphoto:user attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_User The element being modified.
*/
public function setGphotoUser($value)
{
$this->_gphotoUser = $value;
return $this;
}
/**
* Get the value for this element's gphoto:nickname attribute.
*
* @see setGphotoNickname
* @return string The requested attribute.
*/
public function getGphotoNickname()
{
return $this->_gphotoNickname;
}
/**
* Set the value for this element's gphoto:nickname attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Nickname The element being modified.
*/
public function setGphotoNickname($value)
{
$this->_gphotoNickname = $value;
return $this;
}
/**
* Get the value for this element's gphoto:timestamp attribute.
*
* @see setGphotoTimestamp
* @return string The requested attribute.
*/
public function getGphotoTimestamp()
{
return $this->_gphotoTimestamp;
}
/**
* Set the value for this element's gphoto:timestamp attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Timestamp The element being modified.
*/
public function setGphotoTimestamp($value)
{
$this->_gphotoTimestamp = $value;
return $this;
}
}

View file

@ -0,0 +1,509 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: AlbumFeed.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* @see Zend_Gdata_Feed
*/
require_once 'Zend/Gdata/Feed.php';
/**
* @see Zend_Gdata_Photos_AlbumEntry
*/
require_once 'Zend/Gdata/Photos/AlbumEntry.php';
/**
* Data model for a collection of album entries, usually
* provided by the servers.
*
* For information on requesting this feed from a server, see the
* service class, Zend_Gdata_Photos.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_AlbumFeed extends Zend_Gdata_Feed
{
protected $_entryClassName = 'Zend_Gdata_Photos_AlbumEntry';
protected $_feedClassName = 'Zend_Gdata_Photos_AlbumFeed';
/**
* gphoto:id element
*
* @var Zend_Gdata_Photos_Extension_Id
*/
protected $_gphotoId = null;
/**
* gphoto:user element
*
* @var Zend_Gdata_Photos_Extension_User
*/
protected $_gphotoUser = null;
/**
* gphoto:access element
*
* @var Zend_Gdata_Photos_Extension_Access
*/
protected $_gphotoAccess = null;
/**
* gphoto:location element
*
* @var Zend_Gdata_Photos_Extension_Location
*/
protected $_gphotoLocation = null;
/**
* gphoto:nickname element
*
* @var Zend_Gdata_Photos_Extension_Nickname
*/
protected $_gphotoNickname = null;
/**
* gphoto:timestamp element
*
* @var Zend_Gdata_Photos_Extension_Timestamp
*/
protected $_gphotoTimestamp = null;
/**
* gphoto:name element
*
* @var Zend_Gdata_Photos_Extension_Name
*/
protected $_gphotoName = null;
/**
* gphoto:numphotos element
*
* @var Zend_Gdata_Photos_Extension_NumPhotos
*/
protected $_gphotoNumPhotos = null;
/**
* gphoto:commentCount element
*
* @var Zend_Gdata_Photos_Extension_CommentCount
*/
protected $_gphotoCommentCount = null;
/**
* gphoto:commentingEnabled element
*
* @var Zend_Gdata_Photos_Extension_CommentingEnabled
*/
protected $_gphotoCommentingEnabled = null;
protected $_entryKindClassMapping = array(
'http://schemas.google.com/photos/2007#photo' => 'Zend_Gdata_Photos_PhotoEntry',
'http://schemas.google.com/photos/2007#comment' => 'Zend_Gdata_Photos_CommentEntry',
'http://schemas.google.com/photos/2007#tag' => 'Zend_Gdata_Photos_TagEntry'
);
public function __construct($element = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct($element);
}
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_gphotoId != null) {
$element->appendChild($this->_gphotoId->getDOM($element->ownerDocument));
}
if ($this->_gphotoUser != null) {
$element->appendChild($this->_gphotoUser->getDOM($element->ownerDocument));
}
if ($this->_gphotoNickname != null) {
$element->appendChild($this->_gphotoNickname->getDOM($element->ownerDocument));
}
if ($this->_gphotoName != null) {
$element->appendChild($this->_gphotoName->getDOM($element->ownerDocument));
}
if ($this->_gphotoLocation != null) {
$element->appendChild($this->_gphotoLocation->getDOM($element->ownerDocument));
}
if ($this->_gphotoAccess != null) {
$element->appendChild($this->_gphotoAccess->getDOM($element->ownerDocument));
}
if ($this->_gphotoTimestamp != null) {
$element->appendChild($this->_gphotoTimestamp->getDOM($element->ownerDocument));
}
if ($this->_gphotoNumPhotos != null) {
$element->appendChild($this->_gphotoNumPhotos->getDOM($element->ownerDocument));
}
if ($this->_gphotoCommentingEnabled != null) {
$element->appendChild($this->_gphotoCommentingEnabled->getDOM($element->ownerDocument));
}
if ($this->_gphotoCommentCount != null) {
$element->appendChild($this->_gphotoCommentCount->getDOM($element->ownerDocument));
}
return $element;
}
protected function takeChildFromDOM($child)
{
$absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
switch ($absoluteNodeName) {
case $this->lookupNamespace('gphoto') . ':' . 'id';
$id = new Zend_Gdata_Photos_Extension_Id();
$id->transferFromDOM($child);
$this->_gphotoId = $id;
break;
case $this->lookupNamespace('gphoto') . ':' . 'user';
$user = new Zend_Gdata_Photos_Extension_User();
$user->transferFromDOM($child);
$this->_gphotoUser = $user;
break;
case $this->lookupNamespace('gphoto') . ':' . 'nickname';
$nickname = new Zend_Gdata_Photos_Extension_Nickname();
$nickname->transferFromDOM($child);
$this->_gphotoNickname = $nickname;
break;
case $this->lookupNamespace('gphoto') . ':' . 'name';
$name = new Zend_Gdata_Photos_Extension_Name();
$name->transferFromDOM($child);
$this->_gphotoName = $name;
break;
case $this->lookupNamespace('gphoto') . ':' . 'location';
$location = new Zend_Gdata_Photos_Extension_Location();
$location->transferFromDOM($child);
$this->_gphotoLocation = $location;
break;
case $this->lookupNamespace('gphoto') . ':' . 'access';
$access = new Zend_Gdata_Photos_Extension_Access();
$access->transferFromDOM($child);
$this->_gphotoAccess = $access;
break;
case $this->lookupNamespace('gphoto') . ':' . 'timestamp';
$timestamp = new Zend_Gdata_Photos_Extension_Timestamp();
$timestamp->transferFromDOM($child);
$this->_gphotoTimestamp = $timestamp;
break;
case $this->lookupNamespace('gphoto') . ':' . 'numphotos';
$numphotos = new Zend_Gdata_Photos_Extension_NumPhotos();
$numphotos->transferFromDOM($child);
$this->_gphotoNumPhotos = $numphotos;
break;
case $this->lookupNamespace('gphoto') . ':' . 'commentingEnabled';
$commentingEnabled = new Zend_Gdata_Photos_Extension_CommentingEnabled();
$commentingEnabled->transferFromDOM($child);
$this->_gphotoCommentingEnabled = $commentingEnabled;
break;
case $this->lookupNamespace('gphoto') . ':' . 'commentCount';
$commentCount = new Zend_Gdata_Photos_Extension_CommentCount();
$commentCount->transferFromDOM($child);
$this->_gphotoCommentCount = $commentCount;
break;
case $this->lookupNamespace('atom') . ':' . 'entry':
$entryClassName = $this->_entryClassName;
$tmpEntry = new Zend_Gdata_App_Entry($child);
$categories = $tmpEntry->getCategory();
foreach ($categories as $category) {
if ($category->scheme == Zend_Gdata_Photos::KIND_PATH &&
$this->_entryKindClassMapping[$category->term] != "") {
$entryClassName = $this->_entryKindClassMapping[$category->term];
break;
} else {
require_once 'Zend/Gdata/App/Exception.php';
throw new Zend_Gdata_App_Exception('Entry is missing kind declaration.');
}
}
$newEntry = new $entryClassName($child);
$newEntry->setHttpClient($this->getHttpClient());
$this->_entry[] = $newEntry;
break;
default:
parent::takeChildFromDOM($child);
break;
}
}
/**
* Get the value for this element's gphoto:user attribute.
*
* @see setGphotoUser
* @return string The requested attribute.
*/
public function getGphotoUser()
{
return $this->_gphotoUser;
}
/**
* Set the value for this element's gphoto:user attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_User The element being modified.
*/
public function setGphotoUser($value)
{
$this->_gphotoUser = $value;
return $this;
}
/**
* Get the value for this element's gphoto:access attribute.
*
* @see setGphotoAccess
* @return string The requested attribute.
*/
public function getGphotoAccess()
{
return $this->_gphotoAccess;
}
/**
* Set the value for this element's gphoto:access attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Access The element being modified.
*/
public function setGphotoAccess($value)
{
$this->_gphotoAccess = $value;
return $this;
}
/**
* Get the value for this element's gphoto:location attribute.
*
* @see setGphotoLocation
* @return string The requested attribute.
*/
public function getGphotoLocation()
{
return $this->_gphotoLocation;
}
/**
* Set the value for this element's gphoto:location attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Location The element being modified.
*/
public function setGphotoLocation($value)
{
$this->_gphotoLocation = $value;
return $this;
}
/**
* Get the value for this element's gphoto:name attribute.
*
* @see setGphotoName
* @return string The requested attribute.
*/
public function getGphotoName()
{
return $this->_gphotoName;
}
/**
* Set the value for this element's gphoto:name attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Name The element being modified.
*/
public function setGphotoName($value)
{
$this->_gphotoName = $value;
return $this;
}
/**
* Get the value for this element's gphoto:numphotos attribute.
*
* @see setGphotoNumPhotos
* @return string The requested attribute.
*/
public function getGphotoNumPhotos()
{
return $this->_gphotoNumPhotos;
}
/**
* Set the value for this element's gphoto:numphotos attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_NumPhotos The element being modified.
*/
public function setGphotoNumPhotos($value)
{
$this->_gphotoNumPhotos = $value;
return $this;
}
/**
* Get the value for this element's gphoto:commentCount attribute.
*
* @see setGphotoCommentCount
* @return string The requested attribute.
*/
public function getGphotoCommentCount()
{
return $this->_gphotoCommentCount;
}
/**
* Set the value for this element's gphoto:commentCount attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_CommentCount The element being modified.
*/
public function setGphotoCommentCount($value)
{
$this->_gphotoCommentCount = $value;
return $this;
}
/**
* Get the value for this element's gphoto:commentingEnabled attribute.
*
* @see setGphotoCommentingEnabled
* @return string The requested attribute.
*/
public function getGphotoCommentingEnabled()
{
return $this->_gphotoCommentingEnabled;
}
/**
* Set the value for this element's gphoto:commentingEnabled attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_CommentingEnabled The element being modified.
*/
public function setGphotoCommentingEnabled($value)
{
$this->_gphotoCommentingEnabled = $value;
return $this;
}
/**
* Get the value for this element's gphoto:id attribute.
*
* @see setGphotoId
* @return string The requested attribute.
*/
public function getGphotoId()
{
return $this->_gphotoId;
}
/**
* Set the value for this element's gphoto:id attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Id The element being modified.
*/
public function setGphotoId($value)
{
$this->_gphotoId = $value;
return $this;
}
/**
* Get the value for this element's georss:where attribute.
*
* @see setGeoRssWhere
* @return string The requested attribute.
*/
public function getGeoRssWhere()
{
return $this->_geoRssWhere;
}
/**
* Set the value for this element's georss:where attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Geo_Extension_GeoRssWhere The element being modified.
*/
public function setGeoRssWhere($value)
{
$this->_geoRssWhere = $value;
return $this;
}
/**
* Get the value for this element's gphoto:nickname attribute.
*
* @see setGphotoNickname
* @return string The requested attribute.
*/
public function getGphotoNickname()
{
return $this->_gphotoNickname;
}
/**
* Set the value for this element's gphoto:nickname attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Nickname The element being modified.
*/
public function setGphotoNickname($value)
{
$this->_gphotoNickname = $value;
return $this;
}
/**
* Get the value for this element's gphoto:timestamp attribute.
*
* @see setGphotoTimestamp
* @return string The requested attribute.
*/
public function getGphotoTimestamp()
{
return $this->_gphotoTimestamp;
}
/**
* Set the value for this element's gphoto:timestamp attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Timestamp The element being modified.
*/
public function setGphotoTimestamp($value)
{
$this->_gphotoTimestamp = $value;
return $this;
}
}

View file

@ -0,0 +1,149 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: AlbumQuery.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Photos_UserQuery
*/
require_once('Zend/Gdata/Photos/UserQuery.php');
/**
* Assists in constructing album queries for various entries.
* Instances of this class can be provided in many places where a URL is
* required.
*
* For information on submitting queries to a server, see the service
* class, Zend_Gdata_Photos.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_AlbumQuery extends Zend_Gdata_Photos_UserQuery
{
/**
* The name of the album to query for. Mutually exclusive with AlbumId.
*
* @var string
*/
protected $_albumName = null;
/**
* The ID of the album to query for. Mutually exclusive with AlbumName.
*
* @var string
*/
protected $_albumId = null;
/**
* Set the album name to query for. When set, this album's photographs
* be returned. If not set or null, the default user's feed will be
* returned instead.
*
* NOTE: AlbumName and AlbumId are mutually exclusive. Setting one will
* automatically set the other to null.
*
* @param string $value The name of the album to retrieve, or null to
* clear.
* @return Zend_Gdata_Photos_AlbumQuery The query object.
*/
public function setAlbumName($value)
{
$this->_albumId = null;
$this->_albumName = $value;
return $this;
}
/**
* Get the album name which is to be returned.
*
* @see setAlbumName
* @return string The name of the album to retrieve.
*/
public function getAlbumName()
{
return $this->_albumName;
}
/**
* Set the album ID to query for. When set, this album's photographs
* be returned. If not set or null, the default user's feed will be
* returned instead.
*
* NOTE: Album and AlbumId are mutually exclusive. Setting one will
* automatically set the other to null.
*
* @param string $value The ID of the album to retrieve, or null to
* clear.
* @return Zend_Gdata_Photos_AlbumQuery The query object.
*/
public function setAlbumId($value)
{
$this->_albumName = null;
$this->_albumId = $value;
return $this;
}
/**
* Get the album ID which is to be returned.
*
* @see setAlbum
* @return string The ID of the album to retrieve.
*/
public function getAlbumId()
{
return $this->_albumId;
}
/**
* Returns the URL generated for this query, based on it's current
* parameters.
*
* @return string A URL generated based on the state of this query.
* @throws Zend_Gdata_App_InvalidArgumentException
*/
public function getQueryUrl($incomingUri = '')
{
$uri = '';
if ($this->getAlbumName() !== null && $this->getAlbumId() === null) {
$uri .= '/album/' . $this->getAlbumName();
} elseif ($this->getAlbumName() === null && $this->getAlbumId() !== null) {
$uri .= '/albumid/' . $this->getAlbumId();
} elseif ($this->getAlbumName() !== null && $this->getAlbumId() !== null) {
require_once 'Zend/Gdata/App/InvalidArgumentException.php';
throw new Zend_Gdata_App_InvalidArgumentException(
'AlbumName and AlbumId cannot both be non-null');
} else {
require_once 'Zend/Gdata/App/InvalidArgumentException.php';
throw new Zend_Gdata_App_InvalidArgumentException(
'AlbumName and AlbumId cannot both be null');
}
$uri .= $incomingUri;
return parent::getQueryUrl($uri);
}
}

View file

@ -0,0 +1,195 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: CommentEntry.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Entry
*/
require_once 'Zend/Gdata/Entry.php';
/**
* @see Zend_Gdata_Photos_Extension_Id
*/
require_once 'Zend/Gdata/Photos/Extension/Id.php';
/**
* @see Zend_Gdata_Photos_Extension_PhotoId
*/
require_once 'Zend/Gdata/Photos/Extension/PhotoId.php';
/**
* @see Zend_Gdata_Photos_Extension_Weight
*/
require_once 'Zend/Gdata/Photos/Extension/Weight.php';
/**
* @see Zend_Gdata_App_Extension_Category
*/
require_once 'Zend/Gdata/App/Extension/Category.php';
/**
* Data model class for a Comment Entry.
*
* To transfer user entries to and from the servers, including
* creating new entries, refer to the service class,
* Zend_Gdata_Photos.
*
* This class represents <atom:entry> in the Google Data protocol.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_CommentEntry extends Zend_Gdata_Entry
{
protected $_entryClassName = 'Zend_Gdata_Photos_CommentEntry';
/**
* gphoto:id element
*
* @var Zend_Gdata_Photos_Extension_Id
*/
protected $_gphotoId = null;
/**
* gphoto:photoid element, differs from gphoto:id as this is an
* actual identification number unique exclusively to photo entries,
* whereas gphoto:id can refer to all gphoto objects
*
* @var Zend_Gdata_Photos_Extension_PhotoId
*/
protected $_gphotoPhotoId = null;
/**
* Create a new instance.
*
* @param DOMElement $element (optional) DOMElement from which this
* object should be constructed.
*/
public function __construct($element = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct($element);
$category = new Zend_Gdata_App_Extension_Category(
'http://schemas.google.com/photos/2007#comment',
'http://schemas.google.com/g/2005#kind');
$this->setCategory(array($category));
}
/**
* 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->_gphotoId !== null) {
$element->appendChild($this->_gphotoId->getDOM($element->ownerDocument));
}
if ($this->_gphotoPhotoId !== null) {
$element->appendChild($this->_gphotoPhotoId->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('gphoto') . ':' . 'id';
$id = new Zend_Gdata_Photos_Extension_Id();
$id->transferFromDOM($child);
$this->_gphotoId = $id;
break;
case $this->lookupNamespace('gphoto') . ':' . 'photoid';
$photoid = new Zend_Gdata_Photos_Extension_PhotoId();
$photoid->transferFromDOM($child);
$this->_gphotoPhotoId = $photoid;
break;
default:
parent::takeChildFromDOM($child);
break;
}
}
/**
* Get the value for this element's gphoto:photoid attribute.
*
* @see setGphotoPhotoId
* @return string The requested attribute.
*/
public function getGphotoPhotoId()
{
return $this->_gphotoPhotoId;
}
/**
* Set the value for this element's gphoto:photoid attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_PhotoId The element being modified.
*/
public function setGphotoPhotoId($value)
{
$this->_gphotoPhotoId = $value;
return $this;
}
/**
* Get the value for this element's gphoto:id attribute.
*
* @see setGphotoId
* @return string The requested attribute.
*/
public function getGphotoId()
{
return $this->_gphotoId;
}
/**
* Set the value for this element's gphoto:id attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Id The element being modified.
*/
public function setGphotoId($value)
{
$this->_gphotoId = $value;
return $this;
}
}

View file

@ -0,0 +1,63 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Access.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:access element used by the API.
* This determines the visibility for an album, and can be either
* the strings 'private' or 'public'.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_Access extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'access';
/**
* Constructs a new Zend_Gdata_Photos_Extension_Access object.
*
* @param string $text (optional) The value to represent.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,63 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: AlbumId.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:albumid element used by the API. This
* class represents the ID of an album and is usually contained
* within an instance of Zend_Gdata_Photos_AlbumEntry or CommentEntry.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_AlbumId extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'albumid';
/**
* Constructs a new Zend_Gdata_Photos_Extension_AlbumId object.
*
* @param string $text (optional) The value to use for the Album ID.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,62 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: BytesUsed.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:bytesUsed element used by the API.
* This indicates the number of bytes of storage used by an album.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_BytesUsed extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'bytesUsed';
/**
* Constructs a new Zend_Gdata_Photos_Extension_BytesUsed object.
*
* @param string $text (optional) The value to represent.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,63 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Checksum.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:checksum element used by the API.
* This is an optional field that can be used to store a photo's
* checksum to ease duplicate checking.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_Checksum extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'checksum';
/**
* Constructs a new Zend_Gdata_Photos_Extension_Checksum object.
*
* @param string $text (optional) The value to represent.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,63 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Client.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:client element used by the API.
* This is an optional field that can be used to indicate the
* client which created a photo.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_Client extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'client';
/**
* Constructs a new Zend_Gdata_Photos_Extension_Client object.
*
* @param string $text (optional) The value to represent.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,63 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: CommentCount.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:commentCount element used by the API. This
* class represents the number of comments attached to an entry and is usually contained
* within an instance of Zend_Gdata_Photos_PhotoEntry or AlbumEntry.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_CommentCount extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'commentCount';
/**
* Constructs a new Zend_Gdata_Photos_Extension_CommentCount object.
*
* @param string $text (optional) The value to use for the count.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,64 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: CommentingEnabled.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:commentingEnabled element used by the API.
* This class represents whether commenting is enabled for a given
* entry.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_CommentingEnabled extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'commentingEnabled';
/**
* Constructs a new Zend_Gdata_Photos_Extension_CommentingEnabled object.
*
* @param string $text (optional) Whether commenting should be enabled
* or not.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,62 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Height.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:height element used by the API.
* The height of a photo in pixels.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_Height extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'height';
/**
* Constructs a new Zend_Gdata_Photos_Extension_Height object.
*
* @param string $text (optional) The value to represent.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,62 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Id.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:id element used by the API. This class
* represents the unique ID assigned to an element by the servers.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_Id extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'id';
/**
* Constructs a new Zend_Gdata_Photos_Extension_Id object.
*
* @param string $text (optional) The ID being represented.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,62 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Location.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:location element used by the API.
* This indicates the number of bytes of storage used by an album.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_Location extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'location';
/**
* Constructs a new Zend_Gdata_Photos_Extension_Location object.
*
* @param string $text (optional) The value to represent.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,63 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: MaxPhotosPerAlbum.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:maxPhotosPerAlbum element used by the API.
* This class represents the maximum number of photos allowed in an
* album.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_MaxPhotosPerAlbum extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'maxPhotosPerAlbum';
/**
* Constructs a new Zend_Gdata_Photos_Extension_MaxPhotosPerAlbum object.
*
* @param string $text (optional) The value being represented.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,62 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Name.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:name element used by the API.
* This indicates the URL-usable name for an album.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_Name extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'name';
/**
* Constructs a new Zend_Gdata_Photos_Extension_Name object.
*
* @param string $text (optional) The value to represent.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,62 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Nickname.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:nickname element used by the API.
* This class represents the nickname for a user.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_Nickname extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'nickname';
/**
* Constructs a new Zend_Gdata_Photos_Extension_Nickname object.
*
* @param string $text (optional) The value being represented.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,62 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: NumPhotos.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:numphotos element used by the API.
* This indicates the number of photos in an album.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_NumPhotos extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'numphotos';
/**
* Constructs a new Zend_Gdata_Photos_Extension_NumPhotos object.
*
* @param string $text (optional) The value to represent.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,62 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: NumPhotosRemaining.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:numphotosremaining element used by the API.
* This indicates the number of photos remaining in an album.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_NumPhotosRemaining extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'numphotosremaining';
/**
* Constructs a new Zend_Gdata_Photos_Extension_NumPhotosRemaining object.
*
* @param string $text (optional) The value to represent.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,61 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: PhotoId.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:id element used by the Picasa API.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_PhotoId extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'id';
/**
* Constructs a new Zend_Gdata_Photos_Extension_PhotoId object.
*
* @param string $text (optional) The value to represent.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,62 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Position.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:position element used by the API.
* The ordinal position of a photo within an album.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_Position extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'position';
/**
* Constructs a new Zend_Gdata_Photos_Extension_Position object.
*
* @param string $text (optional) The value to represent.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,62 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: QuotaCurrent.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:quotaCurrent element used by the API.
* This class represents the number of bytes of storage used by a user.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_QuotaCurrent extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'quotaCurrent';
/**
* Constructs a new Zend_Gdata_Photos_Extension_QuotaCurrent object.
*
* @param string $text (optional) The value being represented.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,63 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: QuotaLimit.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:quotaLimit element used by the API.
* This class represents the number of bytes of storage available for
* a user.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_QuotaLimit extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'quotaLimit';
/**
* Constructs a new Zend_Gdata_Photos_Extension_QuotaLimit object.
*
* @param string $text (optional) The value being represented.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,63 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Rotation.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:rotation element used by the API.
* The rotation of a photo in degrees. Will only be shown if the
* rotation has not already been applied to the image.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_Rotation extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'rotation';
/**
* Constructs a new Zend_Gdata_Photos_Extension_Rotation object.
*
* @param string $text (optional) The value to represent.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,62 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Size.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:size element used by the API.
* The size of a photo in bytes.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_Size extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'size';
/**
* Constructs a new Zend_Gdata_Photos_Extension_Size object.
*
* @param string $text (optional) The value to represent.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,62 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Thumbnail.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:thumbnail element used by the API.
* This class represents the URI for a thumbnail image.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_Thumbnail extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'thumbnail';
/**
* Constructs a new Zend_Gdata_Photos_Extension_Thumbnail object.
*
* @param string $text (optional) The thumbnail URI to represent.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,63 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Timestamp.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:timestamp element used by the API.
* The timestamp of a photo in milliseconds since January 1, 1970.
* This date is either set externally or based on EXIF data.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_Timestamp extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'timestamp';
/**
* Constructs a new Zend_Gdata_Photos_Extension_Timestamp object.
*
* @param string $text (optional) The value to represent.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,62 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: User.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:user element used by the API.
* This class represents the username for a user.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_User extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'user';
/**
* Constructs a new Zend_Gdata_Photos_Extension_User object.
*
* @param string $text (optional) The username to represent.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,63 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Version.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:version element used by the API.
* This number is used for optimistic concurrency, and does not
* increase linearly.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_Version extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'version';
/**
* Constructs a new Zend_Gdata_Photos_Extension_Version object.
*
* @param string $text (optional) The value to represent.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,63 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Weight.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:weight element used by the API.
* This indicates the weight of a tag, based on the number of times
* it appears in photos under the current element.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_Weight extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'weight';
/**
* Constructs a new Zend_Gdata_Photos_Extension_Weight object.
*
* @param string $text (optional) The value to represent.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,62 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Width.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* Represents the gphoto:width element used by the API.
* This indicates the width of a photo in pixels.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_Extension_Width extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gphoto';
protected $_rootElement = 'width';
/**
* Constructs a new Zend_Gdata_Photos_Extension_Width object.
*
* @param string $text (optional) The value to represent.
*/
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct();
$this->setText($text);
}
}

View file

@ -0,0 +1,691 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: PhotoEntry.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_MediaEntry
*/
require_once 'Zend/Gdata/Media/Entry.php';
/**
* @see Zend_Gdata_Photos_Extension_PhotoId
*/
require_once 'Zend/Gdata/Photos/Extension/PhotoId.php';
/**
* @see Zend_Gdata_Photos_Extension_Version
*/
require_once 'Zend/Gdata/Photos/Extension/Version.php';
/**
* @see Zend_Gdata_Photos_Extension_AlbumId
*/
require_once 'Zend/Gdata/Photos/Extension/AlbumId.php';
/**
* @see Zend_Gdata_Photos_Extension_Id
*/
require_once 'Zend/Gdata/Photos/Extension/Id.php';
/**
* @see Zend_Gdata_Photos_Extension_Width
*/
require_once 'Zend/Gdata/Photos/Extension/Width.php';
/**
* @see Zend_Gdata_Photos_Extension_Height
*/
require_once 'Zend/Gdata/Photos/Extension/Height.php';
/**
* @see Zend_Gdata_Photos_Extension_Size
*/
require_once 'Zend/Gdata/Photos/Extension/Size.php';
/**
* @see Zend_Gdata_Photos_Extension_Client
*/
require_once 'Zend/Gdata/Photos/Extension/Client.php';
/**
* @see Zend_Gdata_Photos_Extension_Checksum
*/
require_once 'Zend/Gdata/Photos/Extension/Checksum.php';
/**
* @see Zend_Gdata_Photos_Extension_Timestamp
*/
require_once 'Zend/Gdata/Photos/Extension/Timestamp.php';
/**
* @see Zend_Gdata_Photos_Extension_CommentingEnabled
*/
require_once 'Zend/Gdata/Photos/Extension/CommentingEnabled.php';
/**
* @see Zend_Gdata_Photos_Extension_CommentCount
*/
require_once 'Zend/Gdata/Photos/Extension/CommentCount.php';
/**
* @see Zend_Gdata_Exif_Extension_Tags
*/
require_once 'Zend/Gdata/Exif/Extension/Tags.php';
/**
* @see Zend_Gdata_Geo_Extension_GeoRssWhere
*/
require_once 'Zend/Gdata/Geo/Extension/GeoRssWhere.php';
/**
* @see Zend_Gdata_App_Extension_Category
*/
require_once 'Zend/Gdata/App/Extension/Category.php';
/**
* Data model class for a Comment Entry.
*
* To transfer user entries to and from the servers, including
* creating new entries, refer to the service class,
* Zend_Gdata_Photos.
*
* This class represents <atom:entry> in the Google Data protocol.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_PhotoEntry extends Zend_Gdata_Media_Entry
{
protected $_entryClassName = 'Zend_Gdata_Photos_PhotoEntry';
/**
* gphoto:id element
*
* @var Zend_Gdata_Photos_Extension_Id
*/
protected $_gphotoId = null;
/**
* gphoto:albumid element
*
* @var Zend_Gdata_Photos_Extension_AlbumId
*/
protected $_gphotoAlbumId = null;
/**
* gphoto:version element
*
* @var Zend_Gdata_Photos_Extension_Version
*/
protected $_gphotoVersion = null;
/**
* gphoto:width element
*
* @var Zend_Gdata_Photos_Extension_Width
*/
protected $_gphotoWidth = null;
/**
* gphoto:height element
*
* @var Zend_Gdata_Photos_Extension_Height
*/
protected $_gphotoHeight = null;
/**
* gphoto:size element
*
* @var Zend_Gdata_Photos_Extension_Size
*/
protected $_gphotoSize = null;
/**
* gphoto:client element
*
* @var Zend_Gdata_Photos_Extension_Client
*/
protected $_gphotoClient = null;
/**
* gphoto:checksum element
*
* @var Zend_Gdata_Photos_Extension_Checksum
*/
protected $_gphotoChecksum = null;
/**
* gphoto:timestamp element
*
* @var Zend_Gdata_Photos_Extension_Timestamp
*/
protected $_gphotoTimestamp = null;
/**
* gphoto:commentCount element
*
* @var Zend_Gdata_Photos_Extension_CommentCount
*/
protected $_gphotoCommentCount = null;
/**
* gphoto:commentingEnabled element
*
* @var Zend_Gdata_Photos_Extension_CommentingEnabled
*/
protected $_gphotoCommentingEnabled = null;
/**
* exif:tags element
*
* @var Zend_Gdata_Exif_Extension_Tags
*/
protected $_exifTags = null;
/**
* georss:where element
*
* @var Zend_Gdata_Geo_Extension_GeoRssWhere
*/
protected $_geoRssWhere = null;
/**
* Create a new instance.
*
* @param DOMElement $element (optional) DOMElement from which this
* object should be constructed.
*/
public function __construct($element = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct($element);
$category = new Zend_Gdata_App_Extension_Category(
'http://schemas.google.com/photos/2007#photo',
'http://schemas.google.com/g/2005#kind');
$this->setCategory(array($category));
}
/**
* 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->_gphotoAlbumId !== null) {
$element->appendChild($this->_gphotoAlbumId->getDOM($element->ownerDocument));
}
if ($this->_gphotoId !== null) {
$element->appendChild($this->_gphotoId->getDOM($element->ownerDocument));
}
if ($this->_gphotoVersion !== null) {
$element->appendChild($this->_gphotoVersion->getDOM($element->ownerDocument));
}
if ($this->_gphotoWidth !== null) {
$element->appendChild($this->_gphotoWidth->getDOM($element->ownerDocument));
}
if ($this->_gphotoHeight !== null) {
$element->appendChild($this->_gphotoHeight->getDOM($element->ownerDocument));
}
if ($this->_gphotoSize !== null) {
$element->appendChild($this->_gphotoSize->getDOM($element->ownerDocument));
}
if ($this->_gphotoClient !== null) {
$element->appendChild($this->_gphotoClient->getDOM($element->ownerDocument));
}
if ($this->_gphotoChecksum !== null) {
$element->appendChild($this->_gphotoChecksum->getDOM($element->ownerDocument));
}
if ($this->_gphotoTimestamp !== null) {
$element->appendChild($this->_gphotoTimestamp->getDOM($element->ownerDocument));
}
if ($this->_gphotoCommentingEnabled !== null) {
$element->appendChild($this->_gphotoCommentingEnabled->getDOM($element->ownerDocument));
}
if ($this->_gphotoCommentCount !== null) {
$element->appendChild($this->_gphotoCommentCount->getDOM($element->ownerDocument));
}
if ($this->_exifTags !== null) {
$element->appendChild($this->_exifTags->getDOM($element->ownerDocument));
}
if ($this->_geoRssWhere !== null) {
$element->appendChild($this->_geoRssWhere->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('gphoto') . ':' . 'albumid';
$albumId = new Zend_Gdata_Photos_Extension_AlbumId();
$albumId->transferFromDOM($child);
$this->_gphotoAlbumId = $albumId;
break;
case $this->lookupNamespace('gphoto') . ':' . 'id';
$id = new Zend_Gdata_Photos_Extension_Id();
$id->transferFromDOM($child);
$this->_gphotoId = $id;
break;
case $this->lookupNamespace('gphoto') . ':' . 'version';
$version = new Zend_Gdata_Photos_Extension_Version();
$version->transferFromDOM($child);
$this->_gphotoVersion = $version;
break;
case $this->lookupNamespace('gphoto') . ':' . 'width';
$width = new Zend_Gdata_Photos_Extension_Width();
$width->transferFromDOM($child);
$this->_gphotoWidth = $width;
break;
case $this->lookupNamespace('gphoto') . ':' . 'height';
$height = new Zend_Gdata_Photos_Extension_Height();
$height->transferFromDOM($child);
$this->_gphotoHeight = $height;
break;
case $this->lookupNamespace('gphoto') . ':' . 'size';
$size = new Zend_Gdata_Photos_Extension_Size();
$size->transferFromDOM($child);
$this->_gphotoSize = $size;
break;
case $this->lookupNamespace('gphoto') . ':' . 'client';
$client = new Zend_Gdata_Photos_Extension_Client();
$client->transferFromDOM($child);
$this->_gphotoClient = $client;
break;
case $this->lookupNamespace('gphoto') . ':' . 'checksum';
$checksum = new Zend_Gdata_Photos_Extension_Checksum();
$checksum->transferFromDOM($child);
$this->_gphotoChecksum = $checksum;
break;
case $this->lookupNamespace('gphoto') . ':' . 'timestamp';
$timestamp = new Zend_Gdata_Photos_Extension_Timestamp();
$timestamp->transferFromDOM($child);
$this->_gphotoTimestamp = $timestamp;
break;
case $this->lookupNamespace('gphoto') . ':' . 'commentingEnabled';
$commentingEnabled = new Zend_Gdata_Photos_Extension_CommentingEnabled();
$commentingEnabled->transferFromDOM($child);
$this->_gphotoCommentingEnabled = $commentingEnabled;
break;
case $this->lookupNamespace('gphoto') . ':' . 'commentCount';
$commentCount = new Zend_Gdata_Photos_Extension_CommentCount();
$commentCount->transferFromDOM($child);
$this->_gphotoCommentCount = $commentCount;
break;
case $this->lookupNamespace('exif') . ':' . 'tags';
$exifTags = new Zend_Gdata_Exif_Extension_Tags();
$exifTags->transferFromDOM($child);
$this->_exifTags = $exifTags;
break;
case $this->lookupNamespace('georss') . ':' . 'where';
$geoRssWhere = new Zend_Gdata_Geo_Extension_GeoRssWhere();
$geoRssWhere->transferFromDOM($child);
$this->_geoRssWhere = $geoRssWhere;
break;
default:
parent::takeChildFromDOM($child);
break;
}
}
/**
* Get the value for this element's gphoto:albumid attribute.
*
* @see setGphotoAlbumId
* @return string The requested attribute.
*/
public function getGphotoAlbumId()
{
return $this->_gphotoAlbumId;
}
/**
* Set the value for this element's gphoto:albumid attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_AlbumId The element being modified.
*/
public function setGphotoAlbumId($value)
{
$this->_gphotoAlbumId = $value;
return $this;
}
/**
* Get the value for this element's gphoto:id attribute.
*
* @see setGphotoId
* @return string The requested attribute.
*/
public function getGphotoId()
{
return $this->_gphotoId;
}
/**
* Set the value for this element's gphoto:id attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Id The element being modified.
*/
public function setGphotoId($value)
{
$this->_gphotoId = $value;
return $this;
}
/**
* Get the value for this element's gphoto:version attribute.
*
* @see setGphotoVersion
* @return string The requested attribute.
*/
public function getGphotoVersion()
{
return $this->_gphotoVersion;
}
/**
* Set the value for this element's gphoto:version attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Version The element being modified.
*/
public function setGphotoVersion($value)
{
$this->_gphotoVersion = $value;
return $this;
}
/**
* Get the value for this element's gphoto:width attribute.
*
* @see setGphotoWidth
* @return string The requested attribute.
*/
public function getGphotoWidth()
{
return $this->_gphotoWidth;
}
/**
* Set the value for this element's gphoto:width attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Width The element being modified.
*/
public function setGphotoWidth($value)
{
$this->_gphotoWidth = $value;
return $this;
}
/**
* Get the value for this element's gphoto:height attribute.
*
* @see setGphotoHeight
* @return string The requested attribute.
*/
public function getGphotoHeight()
{
return $this->_gphotoHeight;
}
/**
* Set the value for this element's gphoto:height attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Height The element being modified.
*/
public function setGphotoHeight($value)
{
$this->_gphotoHeight = $value;
return $this;
}
/**
* Get the value for this element's gphoto:size attribute.
*
* @see setGphotoSize
* @return string The requested attribute.
*/
public function getGphotoSize()
{
return $this->_gphotoSize;
}
/**
* Set the value for this element's gphoto:size attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Size The element being modified.
*/
public function setGphotoSize($value)
{
$this->_gphotoSize = $value;
return $this;
}
/**
* Get the value for this element's gphoto:client attribute.
*
* @see setGphotoClient
* @return string The requested attribute.
*/
public function getGphotoClient()
{
return $this->_gphotoClient;
}
/**
* Set the value for this element's gphoto:client attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Client The element being modified.
*/
public function setGphotoClient($value)
{
$this->_gphotoClient = $value;
return $this;
}
/**
* Get the value for this element's gphoto:checksum attribute.
*
* @see setGphotoChecksum
* @return string The requested attribute.
*/
public function getGphotoChecksum()
{
return $this->_gphotoChecksum;
}
/**
* Set the value for this element's gphoto:checksum attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Checksum The element being modified.
*/
public function setGphotoChecksum($value)
{
$this->_gphotoChecksum = $value;
return $this;
}
/**
* Get the value for this element's gphoto:timestamp attribute.
*
* @see setGphotoTimestamp
* @return string The requested attribute.
*/
public function getGphotoTimestamp()
{
return $this->_gphotoTimestamp;
}
/**
* Set the value for this element's gphoto:timestamp attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Timestamp The element being modified.
*/
public function setGphotoTimestamp($value)
{
$this->_gphotoTimestamp = $value;
return $this;
}
/**
* Get the value for this element's gphoto:commentCount attribute.
*
* @see setGphotoCommentCount
* @return string The requested attribute.
*/
public function getGphotoCommentCount()
{
return $this->_gphotoCommentCount;
}
/**
* Set the value for this element's gphoto:commentCount attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_CommentCount The element being modified.
*/
public function setGphotoCommentCount($value)
{
$this->_gphotoCommentCount = $value;
return $this;
}
/**
* Get the value for this element's gphoto:commentingEnabled attribute.
*
* @see setGphotoCommentingEnabled
* @return string The requested attribute.
*/
public function getGphotoCommentingEnabled()
{
return $this->_gphotoCommentingEnabled;
}
/**
* Set the value for this element's gphoto:commentingEnabled attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_CommentingEnabled The element being modified.
*/
public function setGphotoCommentingEnabled($value)
{
$this->_gphotoCommentingEnabled = $value;
return $this;
}
/**
* Get the value for this element's exif:tags attribute.
*
* @see setExifTags
* @return string The requested attribute.
*/
public function getExifTags()
{
return $this->_exifTags;
}
/**
* Set the value for this element's exif:tags attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Exif_Extension_Tags The element being modified.
*/
public function setExifTags($value)
{
$this->_exifTags = $value;
return $this;
}
/**
* Get the value for this element's georss:where attribute.
*
* @see setGeoRssWhere
* @return string The requested attribute.
*/
public function getGeoRssWhere()
{
return $this->_geoRssWhere;
}
/**
* Set the value for this element's georss:where attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Geo_Extension_GeoRssWhere The element being modified.
*/
public function setGeoRssWhere($value)
{
$this->_geoRssWhere = $value;
return $this;
}
/**
* Get the value for this element's media:group attribute.
*
* @see setMediaGroup
* @return string The requested attribute.
*/
public function getMediaGroup()
{
return $this->_mediaGroup;
}
/**
* Set the value for this element's media:group attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Media_Extension_MediaGroup The element being modified.
*/
public function setMediaGroup($value)
{
$this->_mediaGroup = $value;
return $this;
}
}

View file

@ -0,0 +1,559 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: PhotoFeed.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* @see Zend_Gdata_Feed
*/
require_once 'Zend/Gdata/Feed.php';
/**
* @see Zend_Gdata_Photos_PhotoEntry
*/
require_once 'Zend/Gdata/Photos/PhotoEntry.php';
/**
* Data model for a collection of photo entries, usually
* provided by the Picasa servers.
*
* For information on requesting this feed from a server, see the
* service class, Zend_Gdata_Photos.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_PhotoFeed extends Zend_Gdata_Feed
{
/**
* gphoto:id element
*
* @var Zend_Gdata_Photos_Extension_Id
*/
protected $_gphotoId = null;
/**
* gphoto:albumid element
*
* @var Zend_Gdata_Photos_Extension_AlbumId
*/
protected $_gphotoAlbumId = null;
/**
* gphoto:version element
*
* @var Zend_Gdata_Photos_Extension_Version
*/
protected $_gphotoVersion = null;
/**
* gphoto:width element
*
* @var Zend_Gdata_Photos_Extension_Width
*/
protected $_gphotoWidth = null;
/**
* gphoto:height element
*
* @var Zend_Gdata_Photos_Extension_Height
*/
protected $_gphotoHeight = null;
/**
* gphoto:size element
*
* @var Zend_Gdata_Photos_Extension_Size
*/
protected $_gphotoSize = null;
/**
* gphoto:client element
*
* @var Zend_Gdata_Photos_Extension_Client
*/
protected $_gphotoClient = null;
/**
* gphoto:checksum element
*
* @var Zend_Gdata_Photos_Extension_Checksum
*/
protected $_gphotoChecksum = null;
/**
* gphoto:timestamp element
*
* @var Zend_Gdata_Photos_Extension_Timestamp
*/
protected $_gphotoTimestamp = null;
/**
* gphoto:commentCount element
*
* @var Zend_Gdata_Photos_Extension_CommentCount
*/
protected $_gphotoCommentCount = null;
/**
* gphoto:commentingEnabled element
*
* @var Zend_Gdata_Photos_Extension_CommentingEnabled
*/
protected $_gphotoCommentingEnabled = null;
/**
* media:group element
*
* @var Zend_Gdata_Media_Extension_MediaGroup
*/
protected $_mediaGroup = null;
protected $_entryClassName = 'Zend_Gdata_Photos_PhotoEntry';
protected $_feedClassName = 'Zend_Gdata_Photos_PhotoFeed';
protected $_entryKindClassMapping = array(
'http://schemas.google.com/photos/2007#comment' => 'Zend_Gdata_Photos_CommentEntry',
'http://schemas.google.com/photos/2007#tag' => 'Zend_Gdata_Photos_TagEntry'
);
public function __construct($element = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct($element);
}
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_gphotoId != null) {
$element->appendChild($this->_gphotoId->getDOM($element->ownerDocument));
}
if ($this->_gphotoVersion != null) {
$element->appendChild($this->_gphotoVersion->getDOM($element->ownerDocument));
}
if ($this->_gphotoWidth != null) {
$element->appendChild($this->_gphotoWidth->getDOM($element->ownerDocument));
}
if ($this->_gphotoHeight != null) {
$element->appendChild($this->_gphotoHeight->getDOM($element->ownerDocument));
}
if ($this->_gphotoSize != null) {
$element->appendChild($this->_gphotoSize->getDOM($element->ownerDocument));
}
if ($this->_gphotoClient != null) {
$element->appendChild($this->_gphotoClient->getDOM($element->ownerDocument));
}
if ($this->_gphotoChecksum != null) {
$element->appendChild($this->_gphotoChecksum->getDOM($element->ownerDocument));
}
if ($this->_gphotoTimestamp != null) {
$element->appendChild($this->_gphotoTimestamp->getDOM($element->ownerDocument));
}
if ($this->_gphotoCommentingEnabled != null) {
$element->appendChild($this->_gphotoCommentingEnabled->getDOM($element->ownerDocument));
}
if ($this->_gphotoCommentCount != null) {
$element->appendChild($this->_gphotoCommentCount->getDOM($element->ownerDocument));
}
if ($this->_mediaGroup != null) {
$element->appendChild($this->_mediaGroup->getDOM($element->ownerDocument));
}
return $element;
}
protected function takeChildFromDOM($child)
{
$absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
switch ($absoluteNodeName) {
case $this->lookupNamespace('gphoto') . ':' . 'id';
$id = new Zend_Gdata_Photos_Extension_Id();
$id->transferFromDOM($child);
$this->_gphotoId = $id;
break;
case $this->lookupNamespace('gphoto') . ':' . 'version';
$version = new Zend_Gdata_Photos_Extension_Version();
$version->transferFromDOM($child);
$this->_gphotoVersion = $version;
break;
case $this->lookupNamespace('gphoto') . ':' . 'albumid';
$albumid = new Zend_Gdata_Photos_Extension_AlbumId();
$albumid->transferFromDOM($child);
$this->_gphotoAlbumId = $albumid;
break;
case $this->lookupNamespace('gphoto') . ':' . 'width';
$width = new Zend_Gdata_Photos_Extension_Width();
$width->transferFromDOM($child);
$this->_gphotoWidth = $width;
break;
case $this->lookupNamespace('gphoto') . ':' . 'height';
$height = new Zend_Gdata_Photos_Extension_Height();
$height->transferFromDOM($child);
$this->_gphotoHeight = $height;
break;
case $this->lookupNamespace('gphoto') . ':' . 'size';
$size = new Zend_Gdata_Photos_Extension_Size();
$size->transferFromDOM($child);
$this->_gphotoSize = $size;
break;
case $this->lookupNamespace('gphoto') . ':' . 'client';
$client = new Zend_Gdata_Photos_Extension_Client();
$client->transferFromDOM($child);
$this->_gphotoClient = $client;
break;
case $this->lookupNamespace('gphoto') . ':' . 'checksum';
$checksum = new Zend_Gdata_Photos_Extension_Checksum();
$checksum->transferFromDOM($child);
$this->_gphotoChecksum = $checksum;
break;
case $this->lookupNamespace('gphoto') . ':' . 'timestamp';
$timestamp = new Zend_Gdata_Photos_Extension_Timestamp();
$timestamp->transferFromDOM($child);
$this->_gphotoTimestamp = $timestamp;
break;
case $this->lookupNamespace('gphoto') . ':' . 'commentingEnabled';
$commentingEnabled = new Zend_Gdata_Photos_Extension_CommentingEnabled();
$commentingEnabled->transferFromDOM($child);
$this->_gphotoCommentingEnabled = $commentingEnabled;
break;
case $this->lookupNamespace('gphoto') . ':' . 'commentCount';
$commentCount = new Zend_Gdata_Photos_Extension_CommentCount();
$commentCount->transferFromDOM($child);
$this->_gphotoCommentCount = $commentCount;
break;
case $this->lookupNamespace('media') . ':' . 'group';
$mediaGroup = new Zend_Gdata_Media_Extension_MediaGroup();
$mediaGroup->transferFromDOM($child);
$this->_mediaGroup = $mediaGroup;
break;
case $this->lookupNamespace('atom') . ':' . 'entry':
$entryClassName = $this->_entryClassName;
$tmpEntry = new Zend_Gdata_App_Entry($child);
$categories = $tmpEntry->getCategory();
foreach ($categories as $category) {
if ($category->scheme == Zend_Gdata_Photos::KIND_PATH &&
$this->_entryKindClassMapping[$category->term] != "") {
$entryClassName = $this->_entryKindClassMapping[$category->term];
break;
} else {
require_once 'Zend/Gdata/App/Exception.php';
throw new Zend_Gdata_App_Exception('Entry is missing kind declaration.');
}
}
$newEntry = new $entryClassName($child);
$newEntry->setHttpClient($this->getHttpClient());
$this->_entry[] = $newEntry;
break;
default:
parent::takeChildFromDOM($child);
break;
}
}
/**
* Get the value for this element's gphoto:id attribute.
*
* @see setGphotoId
* @return string The requested attribute.
*/
public function getGphotoId()
{
return $this->_gphotoId;
}
/**
* Set the value for this element's gphoto:id attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Id The element being modified.
*/
public function setGphotoId($value)
{
$this->_gphotoId = $value;
return $this;
}
/**
* Get the value for this element's gphoto:version attribute.
*
* @see setGphotoVersion
* @return string The requested attribute.
*/
public function getGphotoVersion()
{
return $this->_gphotoVersion;
}
/**
* Set the value for this element's gphoto:version attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Version The element being modified.
*/
public function setGphotoVersion($value)
{
$this->_gphotoVersion = $value;
return $this;
}
/**
* Get the value for this element's gphoto:albumid attribute.
*
* @see setGphotoAlbumId
* @return string The requested attribute.
*/
public function getGphotoAlbumId()
{
return $this->_gphotoAlbumId;
}
/**
* Set the value for this element's gphoto:albumid attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_AlbumId The element being modified.
*/
public function setGphotoAlbumId($value)
{
$this->_gphotoAlbumId = $value;
return $this;
}
/**
* Get the value for this element's gphoto:width attribute.
*
* @see setGphotoWidth
* @return string The requested attribute.
*/
public function getGphotoWidth()
{
return $this->_gphotoWidth;
}
/**
* Set the value for this element's gphoto:width attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Width The element being modified.
*/
public function setGphotoWidth($value)
{
$this->_gphotoWidth = $value;
return $this;
}
/**
* Get the value for this element's gphoto:height attribute.
*
* @see setGphotoHeight
* @return string The requested attribute.
*/
public function getGphotoHeight()
{
return $this->_gphotoHeight;
}
/**
* Set the value for this element's gphoto:height attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Height The element being modified.
*/
public function setGphotoHeight($value)
{
$this->_gphotoHeight = $value;
return $this;
}
/**
* Get the value for this element's gphoto:size attribute.
*
* @see setGphotoSize
* @return string The requested attribute.
*/
public function getGphotoSize()
{
return $this->_gphotoSize;
}
/**
* Set the value for this element's gphoto:size attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Size The element being modified.
*/
public function setGphotoSize($value)
{
$this->_gphotoSize = $value;
return $this;
}
/**
* Get the value for this element's gphoto:client attribute.
*
* @see setGphotoClient
* @return string The requested attribute.
*/
public function getGphotoClient()
{
return $this->_gphotoClient;
}
/**
* Set the value for this element's gphoto:client attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Client The element being modified.
*/
public function setGphotoClient($value)
{
$this->_gphotoClient = $value;
return $this;
}
/**
* Get the value for this element's gphoto:checksum attribute.
*
* @see setGphotoChecksum
* @return string The requested attribute.
*/
public function getGphotoChecksum()
{
return $this->_gphotoChecksum;
}
/**
* Set the value for this element's gphoto:checksum attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Checksum The element being modified.
*/
public function setGphotoChecksum($value)
{
$this->_gphotoChecksum = $value;
return $this;
}
/**
* Get the value for this element's gphoto:timestamp attribute.
*
* @see setGphotoTimestamp
* @return string The requested attribute.
*/
public function getGphotoTimestamp()
{
return $this->_gphotoTimestamp;
}
/**
* Set the value for this element's gphoto:timestamp attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Timestamp The element being modified.
*/
public function setGphotoTimestamp($value)
{
$this->_gphotoTimestamp = $value;
return $this;
}
/**
* Get the value for this element's gphoto:commentCount attribute.
*
* @see setGphotoCommentCount
* @return string The requested attribute.
*/
public function getGphotoCommentCount()
{
return $this->_gphotoCommentCount;
}
/**
* Set the value for this element's gphoto:commentCount attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_CommentCount The element being modified.
*/
public function setGphotoCommentCount($value)
{
$this->_gphotoCommentCount = $value;
return $this;
}
/**
* Get the value for this element's gphoto:commentingEnabled attribute.
*
* @see setGphotoCommentingEnabled
* @return string The requested attribute.
*/
public function getGphotoCommentingEnabled()
{
return $this->_gphotoCommentingEnabled;
}
/**
* Set the value for this element's gphoto:commentingEnabled attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_CommentingEnabled The element being modified.
*/
public function setGphotoCommentingEnabled($value)
{
$this->_gphotoCommentingEnabled = $value;
return $this;
}
/**
* Get the value for this element's media:group attribute.
*
* @see setMediaGroup
* @return string The requested attribute.
*/
public function getMediaGroup()
{
return $this->_mediaGroup;
}
/**
* Set the value for this element's media:group attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Media_Extension_MediaGroup The element being modified.
*/
public function setMediaGroup($value)
{
$this->_mediaGroup = $value;
return $this;
}
}

View file

@ -0,0 +1,98 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: PhotoQuery.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Gapps_Picasa_AlbumQuery
*/
require_once('Zend/Gdata/Photos/AlbumQuery.php');
/**
* Assists in constructing queries for comment/tag entries.
* Instances of this class can be provided in many places where a URL is
* required.
*
* For information on submitting queries to a server, see the
* service class, Zend_Gdata_Photos.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_PhotoQuery extends Zend_Gdata_Photos_AlbumQuery
{
/**
* The ID of the photo to query for.
*
* @var string
*/
protected $_photoId = null;
/**
* Set the photo ID to query for. When set, this photo's comments/tags
* will be returned. If not set or null, the default user's feed will be
* returned instead.
*
* @param string $value The ID of the photo to retrieve, or null to
* clear.
*/
public function setPhotoId($value)
{
$this->_photoId = $value;
}
/**
* Get the photo ID which is to be returned.
*
* @see setPhoto
* @return string The ID of the photo to retrieve.
*/
public function getPhotoId()
{
return $this->_photoId;
}
/**
* Returns the URL generated for this query, based on it's current
* parameters.
*
* @return string A URL generated based on the state of this query.
* @throws Zend_Gdata_App_InvalidArgumentException
*/
public function getQueryUrl($incomingUri = '')
{
$uri = '';
if ($this->getPhotoId() !== null) {
$uri .= '/photoid/' . $this->getPhotoId();
} else {
require_once 'Zend/Gdata/App/InvalidArgumentException.php';
throw new Zend_Gdata_App_InvalidArgumentException(
'PhotoId cannot be null');
}
$uri .= $incomingUri;
return parent::getQueryUrl($uri);
}
}

View file

@ -0,0 +1,140 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: TagEntry.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Entry
*/
require_once 'Zend/Gdata/Entry.php';
/**
* @see Zend_Gdata_Photos_Extension_Weight
*/
require_once 'Zend/Gdata/Photos/Extension/Weight.php';
/**
* @see Zend_Gdata_App_Extension_Category
*/
require_once 'Zend/Gdata/App/Extension/Category.php';
/**
* Data model class for a Tag Entry.
*
* To transfer user entries to and from the servers, including
* creating new entries, refer to the service class,
* Zend_Gdata_Photos.
*
* This class represents <atom:entry> in the Google Data protocol.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_TagEntry extends Zend_Gdata_Entry
{
protected $_entryClassName = 'Zend_Gdata_Photos_TagEntry';
protected $_gphotoWeight = null;
/**
* Create a new instance.
*
* @param DOMElement $element (optional) DOMElement from which this
* object should be constructed.
*/
public function __construct($element = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct($element);
$category = new Zend_Gdata_App_Extension_Category(
'http://schemas.google.com/photos/2007#tag',
'http://schemas.google.com/g/2005#kind');
$this->setCategory(array($category));
}
/**
* 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->_gphotoWeight !== null) {
$element->appendChild($this->_gphotoWeight->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('gphoto') . ':' . 'weight';
$weight = new Zend_Gdata_Photos_Extension_Weight();
$weight->transferFromDOM($child);
$this->_gphotoWeight = $weight;
break;
default:
parent::takeChildFromDOM($child);
break;
}
}
/**
* Get the value for this element's gphoto:weight attribute.
*
* @see setGphotoWeight
* @return string The requested attribute.
*/
public function getGphotoWeight()
{
return $this->_gphotoWeight;
}
/**
* Set the value for this element's gphoto:weight attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Weight The element being modified.
*/
public function setGphotoWeight($value)
{
$this->_gphotoWeight = $value;
return $this;
}
}

View file

@ -0,0 +1,366 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: UserEntry.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Entry
*/
require_once 'Zend/Gdata/Entry.php';
/**
* @see Zend_Gdata_Gapps
*/
require_once 'Zend/Gdata/Gapps.php';
/**
* @see Zend_Gdata_Photos_Extension_Nickname
*/
require_once 'Zend/Gdata/Photos/Extension/Nickname.php';
/**
* @see Zend_Gdata_Photos_Extension_Thumbnail
*/
require_once 'Zend/Gdata/Photos/Extension/Thumbnail.php';
/**
* @see Zend_Gdata_Photos_Extension_QuotaCurrent
*/
require_once 'Zend/Gdata/Photos/Extension/QuotaCurrent.php';
/**
* @see Zend_Gdata_Photos_Extension_QuotaLimit
*/
require_once 'Zend/Gdata/Photos/Extension/QuotaLimit.php';
/**
* @see Zend_Gdata_Photos_Extension_MaxPhotosPerAlbum
*/
require_once 'Zend/Gdata/Photos/Extension/MaxPhotosPerAlbum.php';
/**
* @see Zend_Gdata_Photos_Extension_User
*/
require_once 'Zend/Gdata/Photos/Extension/User.php';
/**
* @see Zend_Gdata_App_Extension_Category
*/
require_once 'Zend/Gdata/App/Extension/Category.php';
/**
* Data model class for a User Entry.
*
* To transfer user entries to and from the servers, including
* creating new entries, refer to the service class,
* Zend_Gdata_Photos.
*
* This class represents <atom:entry> in the Google Data protocol.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_UserEntry extends Zend_Gdata_Entry
{
protected $_entryClassName = 'Zend_Gdata_Photos_UserEntry';
/**
* gphoto:nickname element
*
* @var Zend_Gdata_Photos_Extension_Nickname
*/
protected $_gphotoNickname = null;
/**
* gphoto:user element
*
* @var Zend_Gdata_Photos_Extension_User
*/
protected $_gphotoUser = null;
/**
* gphoto:thumbnail element
*
* @var Zend_Gdata_Photos_Extension_Thumbnail
*/
protected $_gphotoThumbnail = null;
/**
* gphoto:quotalimit element
*
* @var Zend_Gdata_Photos_Extension_QuotaLimit
*/
protected $_gphotoQuotaLimit = null;
/**
* gphoto:quotacurrent element
*
* @var Zend_Gdata_Photos_Extension_QuotaCurrent
*/
protected $_gphotoQuotaCurrent = null;
/**
* gphoto:maxPhotosPerAlbum element
*
* @var Zend_Gdata_Photos_Extension_MaxPhotosPerAlbum
*/
protected $_gphotoMaxPhotosPerAlbum = null;
/**
* Create a new instance.
*
* @param DOMElement $element (optional) DOMElement from which this
* object should be constructed.
*/
public function __construct($element = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct($element);
$category = new Zend_Gdata_App_Extension_Category(
'http://schemas.google.com/photos/2007#user',
'http://schemas.google.com/g/2005#kind');
$this->setCategory(array($category));
}
/**
* 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->_gphotoNickname !== null) {
$element->appendChild($this->_gphotoNickname->getDOM($element->ownerDocument));
}
if ($this->_gphotoThumbnail !== null) {
$element->appendChild($this->_gphotoThumbnail->getDOM($element->ownerDocument));
}
if ($this->_gphotoUser !== null) {
$element->appendChild($this->_gphotoUser->getDOM($element->ownerDocument));
}
if ($this->_gphotoQuotaCurrent !== null) {
$element->appendChild($this->_gphotoQuotaCurrent->getDOM($element->ownerDocument));
}
if ($this->_gphotoQuotaLimit !== null) {
$element->appendChild($this->_gphotoQuotaLimit->getDOM($element->ownerDocument));
}
if ($this->_gphotoMaxPhotosPerAlbum !== null) {
$element->appendChild($this->_gphotoMaxPhotosPerAlbum->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('gphoto') . ':' . 'nickname';
$nickname = new Zend_Gdata_Photos_Extension_Nickname();
$nickname->transferFromDOM($child);
$this->_gphotoNickname = $nickname;
break;
case $this->lookupNamespace('gphoto') . ':' . 'thumbnail';
$thumbnail = new Zend_Gdata_Photos_Extension_Thumbnail();
$thumbnail->transferFromDOM($child);
$this->_gphotoThumbnail = $thumbnail;
break;
case $this->lookupNamespace('gphoto') . ':' . 'user';
$user = new Zend_Gdata_Photos_Extension_User();
$user->transferFromDOM($child);
$this->_gphotoUser = $user;
break;
case $this->lookupNamespace('gphoto') . ':' . 'quotacurrent';
$quotaCurrent = new Zend_Gdata_Photos_Extension_QuotaCurrent();
$quotaCurrent->transferFromDOM($child);
$this->_gphotoQuotaCurrent = $quotaCurrent;
break;
case $this->lookupNamespace('gphoto') . ':' . 'quotalimit';
$quotaLimit = new Zend_Gdata_Photos_Extension_QuotaLimit();
$quotaLimit->transferFromDOM($child);
$this->_gphotoQuotaLimit = $quotaLimit;
break;
case $this->lookupNamespace('gphoto') . ':' . 'maxPhotosPerAlbum';
$maxPhotosPerAlbum = new Zend_Gdata_Photos_Extension_MaxPhotosPerAlbum();
$maxPhotosPerAlbum->transferFromDOM($child);
$this->_gphotoMaxPhotosPerAlbum = $maxPhotosPerAlbum;
break;
default:
parent::takeChildFromDOM($child);
break;
}
}
/**
* Get the value for this element's gphoto:nickname attribute.
*
* @see setGphotoNickname
* @return string The requested attribute.
*/
public function getGphotoNickname()
{
return $this->_gphotoNickname;
}
/**
* Set the value for this element's gphoto:nickname attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Nickname The element being modified.
*/
public function setGphotoNickname($value)
{
$this->_gphotoNickname = $value;
return $this;
}
/**
* Get the value for this element's gphoto:thumbnail attribute.
*
* @see setGphotoThumbnail
* @return string The requested attribute.
*/
public function getGphotoThumbnail()
{
return $this->_gphotoThumbnail;
}
/**
* Set the value for this element's gphoto:thumbnail attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Thumbnail The element being modified.
*/
public function setGphotoThumbnail($value)
{
$this->_gphotoThumbnail = $value;
return $this;
}
/**
* Get the value for this element's gphoto:quotacurrent attribute.
*
* @see setGphotoQuotaCurrent
* @return string The requested attribute.
*/
public function getGphotoQuotaCurrent()
{
return $this->_gphotoQuotaCurrent;
}
/**
* Set the value for this element's gphoto:quotacurrent attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_QuotaCurrent The element being modified.
*/
public function setGphotoQuotaCurrent($value)
{
$this->_gphotoQuotaCurrent = $value;
return $this;
}
/**
* Get the value for this element's gphoto:quotalimit attribute.
*
* @see setGphotoQuotaLimit
* @return string The requested attribute.
*/
public function getGphotoQuotaLimit()
{
return $this->_gphotoQuotaLimit;
}
/**
* Set the value for this element's gphoto:quotalimit attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_QuotaLimit The element being modified.
*/
public function setGphotoQuotaLimit($value)
{
$this->_gphotoQuotaLimit = $value;
return $this;
}
/**
* Get the value for this element's gphoto:maxPhotosPerAlbum attribute.
*
* @see setGphotoMaxPhotosPerAlbum
* @return string The requested attribute.
*/
public function getGphotoMaxPhotosPerAlbum()
{
return $this->_gphotoMaxPhotosPerAlbum;
}
/**
* Set the value for this element's gphoto:maxPhotosPerAlbum attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_MaxPhotosPerAlbum The element being modified.
*/
public function setGphotoMaxPhotosPerAlbum($value)
{
$this->_gphotoMaxPhotosPerAlbum = $value;
return $this;
}
/**
* Get the value for this element's gphoto:user attribute.
*
* @see setGphotoUser
* @return string The requested attribute.
*/
public function getGphotoUser()
{
return $this->_gphotoUser;
}
/**
* Set the value for this element's gphoto:user attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_User The element being modified.
*/
public function setGphotoUser($value)
{
$this->_gphotoUser = $value;
return $this;
}
}

View file

@ -0,0 +1,247 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: UserFeed.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Photos
*/
require_once 'Zend/Gdata/Photos.php';
/**
* @see Zend_Gdata_Feed
*/
require_once 'Zend/Gdata/Feed.php';
/**
* @see Zend_Gdata_Photos_UserEntry
*/
require_once 'Zend/Gdata/Photos/UserEntry.php';
/**
* @see Zend_Gdata_Photos_AlbumEntry
*/
require_once 'Zend/Gdata/Photos/AlbumEntry.php';
/**
* @see Zend_Gdata_Photos_PhotoEntry
*/
require_once 'Zend/Gdata/Photos/PhotoEntry.php';
/**
* @see Zend_Gdata_Photos_TagEntry
*/
require_once 'Zend/Gdata/Photos/TagEntry.php';
/**
* @see Zend_Gdata_Photos_CommentEntry
*/
require_once 'Zend/Gdata/Photos/CommentEntry.php';
/**
* Data model for a collection of entries for a specific user, usually
* provided by the servers.
*
* For information on requesting this feed from a server, see the
* service class, Zend_Gdata_Photos.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_UserFeed extends Zend_Gdata_Feed
{
/**
* gphoto:user element
*
* @var Zend_Gdata_Photos_Extension_User
*/
protected $_gphotoUser = null;
/**
* gphoto:thumbnail element
*
* @var Zend_Gdata_Photos_Extension_Thumbnail
*/
protected $_gphotoThumbnail = null;
/**
* gphoto:nickname element
*
* @var Zend_Gdata_Photos_Extension_Nickname
*/
protected $_gphotoNickname = null;
protected $_entryClassName = 'Zend_Gdata_Photos_UserEntry';
protected $_feedClassName = 'Zend_Gdata_Photos_UserFeed';
protected $_entryKindClassMapping = array(
'http://schemas.google.com/photos/2007#album' => 'Zend_Gdata_Photos_AlbumEntry',
'http://schemas.google.com/photos/2007#photo' => 'Zend_Gdata_Photos_PhotoEntry',
'http://schemas.google.com/photos/2007#comment' => 'Zend_Gdata_Photos_CommentEntry',
'http://schemas.google.com/photos/2007#tag' => 'Zend_Gdata_Photos_TagEntry'
);
public function __construct($element = null)
{
$this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
parent::__construct($element);
}
/**
* Creates individual Entry objects of the appropriate type and
* stores them in the $_entry array 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('gphoto') . ':' . 'user';
$user = new Zend_Gdata_Photos_Extension_User();
$user->transferFromDOM($child);
$this->_gphotoUser = $user;
break;
case $this->lookupNamespace('gphoto') . ':' . 'nickname';
$nickname = new Zend_Gdata_Photos_Extension_Nickname();
$nickname->transferFromDOM($child);
$this->_gphotoNickname = $nickname;
break;
case $this->lookupNamespace('gphoto') . ':' . 'thumbnail';
$thumbnail = new Zend_Gdata_Photos_Extension_Thumbnail();
$thumbnail->transferFromDOM($child);
$this->_gphotoThumbnail = $thumbnail;
break;
case $this->lookupNamespace('atom') . ':' . 'entry':
$entryClassName = $this->_entryClassName;
$tmpEntry = new Zend_Gdata_App_Entry($child);
$categories = $tmpEntry->getCategory();
foreach ($categories as $category) {
if ($category->scheme == Zend_Gdata_Photos::KIND_PATH &&
$this->_entryKindClassMapping[$category->term] != "") {
$entryClassName = $this->_entryKindClassMapping[$category->term];
break;
} else {
require_once 'Zend/Gdata/App/Exception.php';
throw new Zend_Gdata_App_Exception('Entry is missing kind declaration.');
}
}
$newEntry = new $entryClassName($child);
$newEntry->setHttpClient($this->getHttpClient());
$this->_entry[] = $newEntry;
break;
default:
parent::takeChildFromDOM($child);
break;
}
}
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_gphotoUser != null) {
$element->appendChild($this->_gphotoUser->getDOM($element->ownerDocument));
}
if ($this->_gphotoNickname != null) {
$element->appendChild($this->_gphotoNickname->getDOM($element->ownerDocument));
}
if ($this->_gphotoThumbnail != null) {
$element->appendChild($this->_gphotoThumbnail->getDOM($element->ownerDocument));
}
return $element;
}
/**
* Get the value for this element's gphoto:user attribute.
*
* @see setGphotoUser
* @return string The requested attribute.
*/
public function getGphotoUser()
{
return $this->_gphotoUser;
}
/**
* Set the value for this element's gphoto:user attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_User The element being modified.
*/
public function setGphotoUser($value)
{
$this->_gphotoUser = $value;
return $this;
}
/**
* Get the value for this element's gphoto:nickname attribute.
*
* @see setGphotoNickname
* @return string The requested attribute.
*/
public function getGphotoNickname()
{
return $this->_gphotoNickname;
}
/**
* Set the value for this element's gphoto:nickname attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Nickname The element being modified.
*/
public function setGphotoNickname($value)
{
$this->_gphotoNickname = $value;
return $this;
}
/**
* Get the value for this element's gphoto:thumbnail attribute.
*
* @see setGphotoThumbnail
* @return string The requested attribute.
*/
public function getGphotoThumbnail()
{
return $this->_gphotoThumbnail;
}
/**
* Set the value for this element's gphoto:thumbnail attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Photos_Extension_Thumbnail The element being modified.
*/
public function setGphotoThumbnail($value)
{
$this->_gphotoThumbnail = $value;
return $this;
}
}

View file

@ -0,0 +1,355 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: UserQuery.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Gapps_Query
*/
require_once('Zend/Gdata/Gapps/Query.php');
/**
* Assists in constructing queries for user entries.
* Instances of this class can be provided in many places where a URL is
* required.
*
* For information on submitting queries to a server, see the
* service class, Zend_Gdata_Photos.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Photos
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Photos_UserQuery extends Zend_Gdata_Query
{
/**
* Indicates the format of data returned in Atom feeds. Can be either
* 'api' or 'base'. Default value is 'api'.
*
* @var string
*/
protected $_projection = 'api';
/**
* Indicates whether to request a feed or entry in queries. Default
* value is 'feed';
*
* @var string
*/
protected $_type = 'feed';
/**
* A string which, if not null, indicates which user should
* be retrieved by this query. If null, the default user will be used
* instead.
*
* @var string
*/
protected $_user = Zend_Gdata_Photos::DEFAULT_USER;
/**
* Create a new Query object with default values.
*/
public function __construct()
{
parent::__construct();
}
/**
* Set's the format of data returned in Atom feeds. Can be either
* 'api' or 'base'. Normally, 'api' will be desired. Default is 'api'.
*
* @param string $value
* @return Zend_Gdata_Photos_UserQuery Provides a fluent interface
*/
public function setProjection($value)
{
$this->_projection = $value;
return $this;
}
/**
* Gets the format of data in returned in Atom feeds.
*
* @see setProjection
* @return string projection
*/
public function getProjection()
{
return $this->_projection;
}
/**
* Set's the type of data returned in queries. Can be either
* 'feed' or 'entry'. Normally, 'feed' will be desired. Default is 'feed'.
*
* @param string $value
* @return Zend_Gdata_Photos_UserQuery Provides a fluent interface
*/
public function setType($value)
{
$this->_type = $value;
return $this;
}
/**
* Gets the type of data in returned in queries.
*
* @see setType
* @return string type
*/
public function getType()
{
return $this->_type;
}
/**
* Set the user to query for. When set, this user's feed will be
* returned. If not set or null, the default user's feed will be returned
* instead.
*
* @param string $value The user to retrieve, or null for the default
* user.
*/
public function setUser($value)
{
if ($value !== null) {
$this->_user = $value;
} else {
$this->_user = Zend_Gdata_Photos::DEFAULT_USER;
}
}
/**
* Get the user which is to be returned.
*
* @see setUser
* @return string The visibility to retrieve.
*/
public function getUser()
{
return $this->_user;
}
/**
* Set the visibility filter for entries returned. Only entries which
* match this value will be returned. If null or unset, the default
* value will be used instead.
*
* Valid values are 'all' (default), 'public', and 'private'.
*
* @param string $value The visibility to filter by, or null to use the
* default value.
*/
public function setAccess($value)
{
if ($value !== null) {
$this->_params['access'] = $value;
} else {
unset($this->_params['access']);
}
}
/**
* Get the visibility filter for entries returned.
*
* @see setAccess
* @return string The visibility to filter by, or null for the default
* user.
*/
public function getAccess()
{
return $this->_params['access'];
}
/**
* Set the tag for entries that are returned. Only entries which
* match this value will be returned. If null or unset, this filter will
* not be applied.
*
* See http://code.google.com/apis/picasaweb/reference.html#Parameters
* for a list of valid values.
*
* @param string $value The tag to filter by, or null if no
* filter is to be applied.
*/
public function setTag($value)
{
if ($value !== null) {
$this->_params['tag'] = $value;
} else {
unset($this->_params['tag']);
}
}
/**
* Get the tag filter for entries returned.
*
* @see setTag
* @return string The tag to filter by, or null if no filter
* is to be applied.
*/
public function getTag()
{
return $this->_params['tag'];
}
/**
* Set the kind of entries that are returned. Only entries which
* match this value will be returned. If null or unset, this filter will
* not be applied.
*
* See http://code.google.com/apis/picasaweb/reference.html#Parameters
* for a list of valid values.
*
* @param string $value The kind to filter by, or null if no
* filter is to be applied.
*/
public function setKind($value)
{
if ($value !== null) {
$this->_params['kind'] = $value;
} else {
unset($this->_params['kind']);
}
}
/**
* Get the kind of entries to be returned.
*
* @see setKind
* @return string The kind to filter by, or null if no filter
* is to be applied.
*/
public function getKind()
{
return $this->_params['kind'];
}
/**
* Set the maximum image size for entries returned. Only entries which
* match this value will be returned. If null or unset, this filter will
* not be applied.
*
* See http://code.google.com/apis/picasaweb/reference.html#Parameters
* for a list of valid values.
*
* @param string $value The image size to filter by, or null if no
* filter is to be applied.
*/
public function setImgMax($value)
{
if ($value !== null) {
$this->_params['imgmax'] = $value;
} else {
unset($this->_params['imgmax']);
}
}
/**
* Get the maximum image size filter for entries returned.
*
* @see setImgMax
* @return string The image size size to filter by, or null if no filter
* is to be applied.
*/
public function getImgMax()
{
return $this->_params['imgmax'];
}
/**
* Set the thumbnail size filter for entries returned. Only entries which
* match this value will be returned. If null or unset, this filter will
* not be applied.
*
* See http://code.google.com/apis/picasaweb/reference.html#Parameters
* for a list of valid values.
*
* @param string $value The thumbnail size to filter by, or null if no
* filter is to be applied.
*/
public function setThumbsize($value)
{
if ($value !== null) {
$this->_params['thumbsize'] = $value;
} else {
unset($this->_params['thumbsize']);
}
}
/**
* Get the thumbnail size filter for entries returned.
*
* @see setThumbsize
* @return string The thumbnail size to filter by, or null if no filter
* is to be applied.
*/
public function getThumbsize()
{
return $this->_params['thumbsize'];
}
/**
* Returns the URL generated for this query, based on it's current
* parameters.
*
* @return string A URL generated based on the state of this query.
* @throws Zend_Gdata_App_InvalidArgumentException
*/
public function getQueryUrl($incomingUri = null)
{
$uri = Zend_Gdata_Photos::PICASA_BASE_URI;
if ($this->getType() !== null) {
$uri .= '/' . $this->getType();
} else {
require_once 'Zend/Gdata/App/InvalidArgumentException.php';
throw new Zend_Gdata_App_InvalidArgumentException(
'Type must be feed or entry, not null');
}
if ($this->getProjection() !== null) {
$uri .= '/' . $this->getProjection();
} else {
require_once 'Zend/Gdata/App/InvalidArgumentException.php';
throw new Zend_Gdata_App_InvalidArgumentException(
'Projection must not be null');
}
if ($this->getUser() !== null) {
$uri .= '/user/' . $this->getUser();
} else {
// Should never occur due to setter behavior
require_once 'Zend/Gdata/App/InvalidArgumentException.php';
throw new Zend_Gdata_App_InvalidArgumentException(
'User must not be null');
}
$uri .= $incomingUri;
$uri .= $this->getQueryString();
return $uri;
}
}