source: trunk/www.guidonia.net/wp/wp-content/plugins/webtv/Drivers/Zend/Gdata/Gbase/ItemQuery.php@ 44

Last change on this file since 44 was 44, checked in by luciano, 14 years ago
File size: 2.4 KB
Line 
1<?php
2
3/**
4 * Zend Framework
5 *
6 * LICENSE
7 *
8 * This source file is subject to the new BSD license that is bundled
9 * with this package in the file LICENSE.txt.
10 * It is also available through the world-wide-web at this URL:
11 * http://framework.zend.com/license/new-bsd
12 * If you did not receive a copy of the license and are unable to
13 * obtain it through the world-wide-web, please send an email
14 * to license@zend.com so we can send you a copy immediately.
15 *
16 * @category Zend
17 * @package Zend_Gdata
18 * @subpackage Gbase
19 * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 */
22
23/**
24 * @see Zend_Gdata_Query
25 */
26require_once('Zend/Gdata/Query.php');
27
28/**
29 * @see Zend_Gdata_Gbase_Query
30 */
31require_once('Zend/Gdata/Gbase/Query.php');
32
33
34/**
35 * Assists in constructing queries for Google Base Customer Items Feed
36 *
37 * @link http://code.google.com/apis/base/
38 *
39 * @category Zend
40 * @package Zend_Gdata
41 * @subpackage Gbase
42 * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
43 * @license http://framework.zend.com/license/new-bsd New BSD License
44 */
45class Zend_Gdata_Gbase_ItemQuery extends Zend_Gdata_Gbase_Query
46{
47 /**
48 * Path to the customer items feeds on the Google Base server.
49 */
50 const GBASE_ITEM_FEED_URI = 'http://www.google.com/base/feeds/items';
51
52 /**
53 * The default URI for POST methods
54 *
55 * @var string
56 */
57 protected $_defaultFeedUri = self::GBASE_ITEM_FEED_URI;
58
59 /**
60 * The id of an item
61 *
62 * @var string
63 */
64 protected $_id = null;
65
66 /**
67 * @param string $value
68 * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface
69 */
70 public function setId($value)
71 {
72 $this->_id = $value;
73 return $this;
74 }
75
76 /*
77 * @return string id
78 */
79 public function getId()
80 {
81 return $this->_id;
82 }
83
84 /**
85 * Returns the query URL generated by this query instance.
86 *
87 * @return string The query URL for this instance.
88 */
89 public function getQueryUrl()
90 {
91 $uri = $this->_defaultFeedUri;
92 if ($this->getId() !== null) {
93 $uri .= '/' . $this->getId();
94 } else {
95 $uri .= $this->getQueryString();
96 }
97 return $uri;
98 }
99
100}
Note: See TracBrowser for help on using the repository browser.