web/lib/Zend/Gdata/Gbase/ItemQuery.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
equal deleted inserted replaced
805:5e7a0fedabdf 807:877f952ae2bd
    14  * to license@zend.com so we can send you a copy immediately.
    14  * to license@zend.com so we can send you a copy immediately.
    15  *
    15  *
    16  * @category   Zend
    16  * @category   Zend
    17  * @package    Zend_Gdata
    17  * @package    Zend_Gdata
    18  * @subpackage Gbase
    18  * @subpackage Gbase
    19  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    19  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    20  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    20  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    21  * @version    $Id: ItemQuery.php 20096 2010-01-06 02:05:09Z bkarwin $
    21  * @version    $Id: ItemQuery.php 24777 2012-05-08 18:50:23Z adamlundrigan $
    22  */
    22  */
    23 
    23 
    24 /**
    24 /**
    25  * @see Zend_Gdata_Query
    25  * @see Zend_Exception
    26  */
    26  */
    27 require_once('Zend/Gdata/Query.php');
    27 require_once 'Zend/Exception.php';
    28 
    28 
    29 /**
    29 /**
    30  * @see Zend_Gdata_Gbase_Query
    30  * @see Zend_Gdata_Gbase_Query
    31  */
    31  */
    32 require_once('Zend/Gdata/Gbase/Query.php');
    32 require_once 'Zend/Gdata/Gbase/Query.php';
    33 
    33 
    34 
    34 
    35 /**
    35 /**
    36  * Assists in constructing queries for Google Base Customer Items Feed
    36  * Assists in constructing queries for Google Base Customer Items Feed
    37  *
    37  *
    38  * @link http://code.google.com/apis/base/
    38  * @link http://code.google.com/apis/base/
    39  *
    39  *
    40  * @category   Zend
    40  * @category   Zend
    41  * @package    Zend_Gdata
    41  * @package    Zend_Gdata
    42  * @subpackage Gbase
    42  * @subpackage Gbase
    43  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    43  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    44  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    44  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    45  */
    45  */
    46 class Zend_Gdata_Gbase_ItemQuery extends Zend_Gdata_Gbase_Query
    46 class Zend_Gdata_Gbase_ItemQuery extends Zend_Gdata_Gbase_Query
    47 {
    47 {
    48     /**
    48     /**
    49      * Path to the customer items feeds on the Google Base server.
    49      * Path to the customer items feeds on the Google Base server.
    50      */
    50      */
    51     const GBASE_ITEM_FEED_URI = 'http://www.google.com/base/feeds/items';
    51     const GBASE_ITEM_FEED_URI = 'https://www.google.com/base/feeds/items';
    52 
       
    53     /**
       
    54      * The default URI for POST methods
       
    55      *
       
    56      * @var string
       
    57      */
       
    58     protected $_defaultFeedUri = self::GBASE_ITEM_FEED_URI;
       
    59 
       
    60     /**
       
    61      * The id of an item
       
    62      *
       
    63      * @var string
       
    64      */
       
    65     protected $_id = null;
       
    66 
       
    67     /**
       
    68      * @param string $value
       
    69      * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface
       
    70      */
       
    71     public function setId($value)
       
    72     {
       
    73         $this->_id = $value;
       
    74         return $this;
       
    75     }
       
    76 
       
    77     /*
       
    78      * @return string id
       
    79      */
       
    80     public function getId()
       
    81     {
       
    82         return $this->_id;
       
    83     }
       
    84 
       
    85     /**
       
    86      * Returns the query URL generated by this query instance.
       
    87      *
       
    88      * @return string The query URL for this instance.
       
    89      */
       
    90     public function getQueryUrl()
       
    91     {
       
    92         $uri = $this->_defaultFeedUri;
       
    93         if ($this->getId() !== null) {
       
    94             $uri .= '/' . $this->getId();
       
    95         } else {
       
    96             $uri .= $this->getQueryString();
       
    97         }
       
    98         return $uri;
       
    99     }
       
   100 
       
   101 }
    52 }