[44] | 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 | * Zend_Gdata_Query
|
---|
| 25 | */
|
---|
| 26 | require_once('Zend/Gdata/Query.php');
|
---|
| 27 |
|
---|
| 28 | /**
|
---|
| 29 | * Zend_Gdata_Gbase_Query
|
---|
| 30 | */
|
---|
| 31 | require_once('Zend/Gdata/Gbase/Query.php');
|
---|
| 32 |
|
---|
| 33 | /**
|
---|
| 34 | * Assists in constructing queries for Google Base Snippets Feed
|
---|
| 35 | *
|
---|
| 36 | * @link http://code.google.com/apis/base/
|
---|
| 37 | *
|
---|
| 38 | * @category Zend
|
---|
| 39 | * @package Zend_Gdata
|
---|
| 40 | * @subpackage Gbase
|
---|
| 41 | * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
---|
| 42 | * @license http://framework.zend.com/license/new-bsd New BSD License
|
---|
| 43 | */
|
---|
| 44 | class Zend_Gdata_Gbase_SnippetQuery extends Zend_Gdata_Gbase_Query
|
---|
| 45 | {
|
---|
| 46 | /**
|
---|
| 47 | * Path to the snippets feeds on the Google Base server.
|
---|
| 48 | */
|
---|
| 49 | const BASE_SNIPPET_FEED_URI = 'http://www.google.com/base/feeds/snippets';
|
---|
| 50 |
|
---|
| 51 | /**
|
---|
| 52 | * The default URI for POST methods
|
---|
| 53 | *
|
---|
| 54 | * @var string
|
---|
| 55 | */
|
---|
| 56 | protected $_defaultFeedUri = self::BASE_SNIPPET_FEED_URI;
|
---|
| 57 |
|
---|
| 58 | /**
|
---|
| 59 | * Returns the query URL generated by this query instance.
|
---|
| 60 | *
|
---|
| 61 | * @return string The query URL for this instance.
|
---|
| 62 | */
|
---|
| 63 | public function getQueryUrl()
|
---|
| 64 | {
|
---|
| 65 | $uri = $this->_defaultFeedUri;
|
---|
| 66 | if ($this->getCategory() !== null) {
|
---|
| 67 | $uri .= '/-/' . $this->getCategory();
|
---|
| 68 | }
|
---|
| 69 | $uri .= $this->getQueryString();
|
---|
| 70 | return $uri;
|
---|
| 71 | }
|
---|
| 72 |
|
---|
| 73 | }
|
---|