Ver Fonte

ZF-12187: Disable Google Base API (Zend_Gdata_Gbase) in 1.12.x branch

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24777 44c647ce-9c0f-0410-b52a-842ac1e357ba
adamlundrigan há 13 anos atrás
pai
commit
014b481b6c
32 ficheiros alterados com 58 adições e 3768 exclusões
  1. 0 670
      demos/Zend/Gdata/Gbase.php
  2. 0 7
      documentation/manual/de/module_specs/Zend_Gdata-Introduction.xml
  3. 0 513
      documentation/manual/de/module_specs/Zend_Gdata_Gbase.xml
  4. 0 2
      documentation/manual/en/manual-print1.xml.in
  5. 0 5
      documentation/manual/en/manual.xml.in
  6. 0 8
      documentation/manual/en/module_specs/Zend_Gdata-Introduction.xml
  7. 0 499
      documentation/manual/en/module_specs/Zend_Gdata_Gbase.xml
  8. 0 7
      documentation/manual/ja/module_specs/Zend_Gdata-Introduction.xml
  9. 0 449
      documentation/manual/ja/module_specs/Zend_Gdata_Gbase.xml
  10. 9 140
      library/Zend/Gdata/Gbase.php
  11. 9 101
      library/Zend/Gdata/Gbase/Entry.php
  12. 5 66
      library/Zend/Gdata/Gbase/Extension/BaseAttribute.php
  13. 10 9
      library/Zend/Gdata/Gbase/Feed.php
  14. 0 119
      library/Zend/Gdata/Gbase/ItemEntry.php
  15. 0 6
      library/Zend/Gdata/Gbase/ItemFeed.php
  16. 3 52
      library/Zend/Gdata/Gbase/ItemQuery.php
  17. 13 212
      library/Zend/Gdata/Gbase/Query.php
  18. 0 6
      library/Zend/Gdata/Gbase/SnippetEntry.php
  19. 7 8
      library/Zend/Gdata/Gbase/SnippetFeed.php
  20. 2 30
      library/Zend/Gdata/Gbase/SnippetQuery.php
  21. 0 5
      tests/TestConfiguration.php.dist
  22. 0 22
      tests/Zend/Gdata/AllTests.php
  23. 0 64
      tests/Zend/Gdata/Gbase/BaseAttributeTest.php
  24. 0 68
      tests/Zend/Gdata/Gbase/ItemEntryTest.php
  25. 0 67
      tests/Zend/Gdata/Gbase/ItemFeedTest.php
  26. 0 92
      tests/Zend/Gdata/Gbase/ItemQueryTest.php
  27. 0 50
      tests/Zend/Gdata/Gbase/QueryTest.php
  28. 0 67
      tests/Zend/Gdata/Gbase/SnippetFeedTest.php
  29. 0 93
      tests/Zend/Gdata/Gbase/SnippetQueryTest.php
  30. 0 91
      tests/Zend/Gdata/Gbase/_files/TestDataGbaseItemFeedSample1.xml
  31. 0 73
      tests/Zend/Gdata/Gbase/_files/TestDataGbaseSnippetFeedSample1.xml
  32. 0 167
      tests/Zend/Gdata/GbaseOnlineTest.php

+ 0 - 670
demos/Zend/Gdata/Gbase.php

@@ -1,670 +0,0 @@
-<?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 Demos
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- */
-
-/* Load the Zend Gdata classes. */
-require_once 'Zend/Loader.php';
-Zend_Loader::loadClass('Zend_Gdata_AuthSub');
-Zend_Loader::loadClass('Zend_Gdata_Gbase');
-
-/* The items feed URL, used for queries, insertions and batch commands. */
-define('ITEMS_FEED_URI', 'http://www.google.com/base/feeds/items');
-
-/* Types of cuisine the user may select when inserting a recipe. */
-$cuisines = array('African', 'American', 'Asian', 'Caribbean', 'Chinese',
-  'French', 'Greek', 'Indian', 'Italian', 'Japanese', 'Jewish',
-  'Mediterranean', 'Mexican', 'Middle Eastern', 'Moroccan',
-  'North American', 'Spanish', 'Thai', 'Vietnamese', 'Other');
-
-
-/**
- * Inserts a new recipe by performing an HTTP POST to the
- * items feed.
- * @param boolean $dryRun (optional) True if this should be a dry run insert
- * @return Zend_Gdata_Gbase_ItemFeed The newly created entry
- */
-function postItem($dryRun = false) {
-  $client = Zend_Gdata_AuthSub::getHttpClient($_POST['token']);
-  $gdata = new Zend_Gdata_Gbase($client);
-
-  $newEntry = $gdata->newItemEntry();
-
-  // Add title
-  $newEntry->title = $gdata->newTitle(trim($_POST['recipe_title']));
-
-  // Add some content
-  $newEntry->content = $gdata->newContent($_POST['recipe_text']);
-  $newEntry->content->type = 'text';
-
-  // Define item type
-  $newEntry->itemType = 'testrecipes';
-  $newEntry->itemType->type = 'text';
-
-  // Add item-specific attributes
-  $newEntry->addGbaseAttribute('cuisine', $_POST['cuisine'], 'text');
-  $newEntry->addGbaseAttribute('cooking_time', $_POST['time_val'] . ' ' .
-      $_POST['time_units'], 'intUnit');
-  $newEntry->addGbaseAttribute('main_ingredient',
-                               $_POST['main_ingredient'],
-                              'text');
-  $newEntry->addGbaseAttribute('serving_count', $_POST['serves'], 'number');
-
-  // Post the item
-  $createdEntry = $gdata->insertGbaseItem($newEntry, $dryRun);
-
-  return $createdEntry;
-}
-
-/**
- * Updates an existing recipe by performing an HTTP PUT
- * on its feed URI, using the updated values as the data.
- * @return true
- */
-function updateItem() {
-  $client = Zend_Gdata_AuthSub::getHttpClient($_POST['token']);
-  $gdata = new Zend_Gdata_Gbase($client);
-
-  $itemUrl = $_POST['link'];
-  $updatedEntry = $gdata->getGbaseItemEntry($itemUrl);
-
-  // Update title
-  $updatedEntry->title = $gdata->newTitle(trim($_POST['recipe_title']));
-
-  // Update content
-  $updatedEntry->content = $gdata->newContent($_POST['recipe_text']);
-  $updatedEntry->content->type = 'text';
-
-  // Update item-specific attributes
-  $baseAttributeArr = $updatedEntry->getGbaseAttribute('cuisine');
-  if (is_object($baseAttributeArr[0])) {
-    $baseAttributeArr[0]->text = $_POST['cuisine'];
-  }
-
-  $baseAttributeArr = $updatedEntry->getGbaseAttribute('cooking_time');
-  if (is_object($baseAttributeArr[0])) {
-    $baseAttributeArr[0]->text =
-        $_POST['time_val'] . ' ' . $_POST['time_units'];
-  }
-
-  $baseAttributeArr = $updatedEntry->getGbaseAttribute('main_ingredient');
-  if (is_object($baseAttributeArr[0])) {
-    $baseAttributeArr[0]->text = $_POST['main_ingredient'];
-  }
-
-  $baseAttributeArr = $updatedEntry->getGbaseAttribute('serving_count');
-  if (is_object($baseAttributeArr[0])) {
-    $baseAttributeArr[0]->text = $_POST['serves'];
-  }
-
-  $dryRun = false;
-  $gdata->updateGbaseItem($updatedEntry, $dryRun);
-
-  // Alternatively, you can call the save() method directly on the entry
-  // $updatedEntry->save();
-
-  return true;
-}
-
-/**
- * Deletes a recipe by performing an HTTP DELETE on its feed URI.
- * @return void
- */
-function deleteItem() {
-  $client = Zend_Gdata_AuthSub::getHttpClient($_POST['token']);
-  $gdata = new Zend_Gdata_Gbase($client);
-
-  $itemUrl = $_POST['link'];
-  $deleteEntry = $gdata->getGbaseItemEntry($itemUrl);
-
-  $dryRun = false;
-  $gdata->deleteGbaseItem($deleteEntry, $dryRun);
-
-  // Alternatively, you can call the save() method directly on the entry
-  // $gdata->delete($itemUrl);
-}
-
-/**
- * Creates the XML content used to perform a batch delete.
- * @return string The constructed XML to be used for the batch delete
- */
-function buildBatchXML() {
-  $result =  '<?xml version="1.0" encoding="UTF-8"?>' . "\n" .
-             '<feed xmlns="http://www.w3.org/2005/Atom"' . "\n" .
-             ' xmlns:g="http://base.google.com/ns/1.0"' . "\n" .
-             ' xmlns:batch="http://schemas.google.com/gdata/batch">' . "\n";
-
-  $counter = 0;
-  foreach($_POST as $key => $value) {
-    if(substr($key, 0, 5) == "link_") {
-      $counter++;
-
-      $result .= '<entry>' . "\n" .
-                 '<id>' . $value . '</id>' . "\n" .
-                 '<batch:operation type="delete"/>' . "\n" .
-                 '<batch:id>' . $counter . '</batch:id>' . "\n" .
-                 '</entry>' . "\n";
-    }
-  }
-  $result .= '</feed>' . "\n";
-
-  return $result;
-}
-
-/**
- * Deletes all recipes by performing an HTTP POST to the
- * batch URI.
- * @return Zend_Http_Response The reponse of the post
- */
-function batchDelete() {
-  $client = Zend_Gdata_AuthSub::getHttpClient($_POST['token']);
-  $gdata = new Zend_Gdata_Gbase($client);
-
-  $response = $gdata->post(buildBatchXML(), ITEMS_FEED_URI . '/batch');
-
-  return $response;
-}
-
-/**
- * Writes the HTML header for the demo.
- *
- * NOTE: We would normally keep the HTML/CSS markup separate from the business
- *       logic above, but have decided to include it here for simplicity of
- *       having a single-file sample.
- * @return void
- */
-function printHTMLHeader()
-{
-  print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"' . "\n" .
-        '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n" .
-        '<html xmlns="http://www.w3.org/1999/xhtml" lang="en">' . "\n" .
-        '<head><meta http-equiv="Content-Type" ' .
-        'content="text/html;charset=utf-8"/>' . "\n" .
-        '<title>PHP Demo: Google Base API</title>' . "\n" .
-        '<link rel="stylesheet" type="text/css" ' .
-        'href="http://code.google.com/css/dev_docs.css">' . "\n" .
-        '</head>' . "\n" .
-        '<body><center>' . "\n";
-}
-
-/**
- * Writes the HTML footer for the demo.
- *
- * NOTE: We would normally keep the HTML/CSS markup separate from the business
- *       logic above, but have decided to include it here for simplicity of
- *       having a single-file sample.
- * @return void
- */
-function printHTMLFooter() {
-  print '</center></body></html>' . "\n";
-}
-
-/**
- * We arrive here when the user first comes to the form. The first step is
- * to have them get a single-use token.
- */
-function showIntroPage() {
-  $next_url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
-  $scope = ITEMS_FEED_URI;
-  $secure = false;
-  $session = true;
-  $redirect_url = Zend_Gdata_AuthSub::getAuthSubTokenUri($next_url,
-                                                         $scope,
-                                                         $secure,
-                                                         $session);
-
-  printHTMLHeader();
-
-  print '<table style="width:50%;">' . "\n" .
-        '<tr>' . "\n" .
-        '<th colspan="2" style="text-align:center;">' .
-        'PHP Demo: Google Base data API<br/>' .
-        '<small><span style="font-variant: small-caps;">Powered By</span>' .
-        ' <a href="http://framework.zend.com/download/gdata">' .
-        'Zend Google Data Client Library</a></small></th>' . "\n" .
-        '</tr>' . "\n" .
-        '<tr><td>Before you get started, please <a href="' . $redirect_url .
-        '">sign in</a> to your personal Google Base account.</td></tr>' . "\n" .
-        '</table>' . "\n";
-
-  printHTMLFooter();
-}
-
-/**
- * Prints the table of recipes the user has already entered
- * on the left-hand side of the page.
- * @param string $token The session token
- * @return void
- */
-function showRecipeListPane($token) {
-  $client = Zend_Gdata_AuthSub::getHttpClient($token);
-  $gdata = new Zend_Gdata_Gbase($client);
-  try {
-    $feed = $gdata->getGbaseItemFeed(ITEMS_FEED_URI . '/-/testrecipes');
-
-    print '<td style="width:50%;text-align:center;vertical-align:top">' . "\n" .
-          '<a href="http://www.google.com/base/dashboard" target="_blank">' .
-          'View all of your published items</a>' .
-          '<table>' . "\n" .
-          '<tr><th colspan="5" style="text-align:center">' .
-          'Recipes you have added that searchable via the API</th></tr>' . "\n";
-
-    if ($feed->count() == 0) {
-      print '<tr style="font-style:italic">' .
-            '<td colspan="5" style="text-align:center">(none)</td>' .
-            '</tr>' . "\n";
-    } else {
-      print '<tr style="font-style:italic">' . "\n" .
-            '<td style="text-align:center">Name</td>' . "\n" .
-            '<td style="text-align:center">Cuisine</td>' . "\n" .
-            '<td style="text-align:center">Serves</td>' . "\n" .
-            '<td colspan="2" style="text-align:center">Actions</td>' . "\n" .
-            '</tr>' . "\n";
-
-      foreach ($feed->entries as $feed_entry) {
-        $href = $feed_entry->link[0]->href;
-        $title = $feed_entry->title->text;
-        $id = $feed_entry->id->text;
-
-        $baseAttributeArr = $feed_entry->getGbaseAttribute('cuisine');
-        // Only want first cuisine
-        if (isset($baseAttributeArr[0]) && is_object($baseAttributeArr[0])) {
-          $cuisine = $baseAttributeArr[0]->text;
-        }
-
-        $baseAttributeArr = $feed_entry->getGbaseAttribute('serving_count');
-        // Only want first serving_count
-        if (isset($baseAttributeArr[0]) && is_object($baseAttributeArr[0])) {
-          $serving_count = $baseAttributeArr[0]->text;
-        }
-
-        print '<tr>' . "\n" .
-              '<td align="left" valign="top"><b><a href="' . $href . '">' .
-              $title . '</a></b></td>' . "\n" .
-              '<td style="text-align:center;vertical-align:top">' .
-              $cuisine . '</td>' . "\n" .
-              '<td style="text-align:center;vertical-align:top">' .
-              $serving_count . '</td>' . "\n";
-
-        /* Create an Edit button for each existing recipe. */
-        print '<td style="text-align:center;vertical-align:top">' . "\n" .
-              '<form method="post" action="' . $_SERVER['PHP_SELF'] .
-              '" style="margin-top:0;margin-bottom:0;">' . "\n" .
-              '<input type="hidden" name="action" value="edit">' . "\n" .
-              "<input type=\"hidden\" name=\"token\" value=\"$token\">" . "\n" .
-              '<input type="hidden" name="edit" value="' . $id . '">' . "\n" .
-              '<input type="submit" value="Edit">' . "\n" .
-              '</form>' . "\n" .
-              '</td>' . "\n";
-
-        /* Create a Delete button for each existing recipe. */
-        print '<td style="text-align:center; vertical-align:top">' . "\n" .
-              '<form method="post" action="' . $_SERVER['PHP_SELF'] .
-              '" style="margin-top:0;margin-bottom:0;">' . "\n" .
-              '<input type="hidden" name="action" value="delete">' . "\n" .
-              "<input type=\"hidden\" name=\"token\" value=\"$token\">" . "\n" .
-              '<input type="hidden" name="link" value="' . $id . '">' . "\n" .
-              '<input type="submit" value="Delete">' . "\n" .
-              '</form>' . "\n" .
-              '</td>' . "\n" .
-              '</tr>' . "\n";
-      }
-    }
-
-    /* Create a "Delete all" button" to demonstrate batch requests. */
-    print '<tr><td colspan="5" style="text-align:center">' . "\n" .
-          '<form method="post" action="' . $_SERVER['PHP_SELF'] .
-          '" style="margin-top:0;margin-bottom:0">' . "\n" .
-          '<input type="hidden" name="action" value="delete_all">' . "\n" .
-          '<input type="hidden" name="token" value="' . $token . '">' . "\n";
-
-    $i = 0;
-    foreach ($feed as $feed_entry) {
-      print '<input type="hidden" name="link_' . $i . '" value="' .
-            $feed_entry->id->text . '">' . "\n";
-      $i++;
-    }
-
-    print '<input type="submit" value="Delete All"';
-    if ($feed->count() == 0) {
-      print ' disabled="true"';
-    }
-    print '></form></td></tr>' . "\n";
-    print '</table>' . "\n";
-
-    print '</td>' . "\n";
-  } catch (Zend_Gdata_App_Exception $e) {
-    showMainMenu("Error: " . $e->getMessage(), $token);
-  }
-}
-
-/**
- * Prints a small form allowing the user to insert a new
- * recipe.
- * @param string $sessionToken A session token
- * @return void
- */
-function showRecipeInsertPane($sessionToken) {
-  global $cuisines;
-
-  print '<td valign="top" width="50%">' . "\n" .
-        '<table width="90%">' . "\n" .
-        '<tr><th colspan="2" style="text-align:center">' .
-        'Insert a new recipe</th></tr>' . "\n" .
-        '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">' . "\n" .
-        '<input type="hidden" name="action" value="insert">' . "\n" .
-        "<input type=\"hidden\" name=\"token\" value=\"$sessionToken\">\n" .
-        '<tr><td align="right">Title:</td>' . "\n" .
-        '<td><input type="text" name="recipe_title" class="half">' .
-        '</td></tr>' . "\n" .
-        '<tr><td align="right">Main ingredient:</td>' . "\n" .
-        '<td><input type="text" name="main_ingredient" class="half">' .
-        '</td></tr>' . "\n" .
-        '<tr><td align="right">Cuisine:</td>' . "\n" .
-        '<td><select name="cuisine" class="half">' . "\n";
-
-  foreach ($cuisines as $curCuisine) {
-    print "<option value=\"$curCuisine\">$curCuisine</option>\n";
-  }
-
-  print '</select></td></tr>' . "\n" .
-        '<tr><td align="right">Cooking Time:</td>' .
-        '<td><input type="text" name="time_val" size=2 maxlength=2>&nbsp;' .
-        '<select name="time_units"><option value="minutes">minutes</option>' .
-        '<option value="hours">hours</option></select></td></tr>' . "\n" .
-        '<tr><td align="right">Serves:</td>' . "\n" .
-        '<td><input type="text" name="serves" size=2 maxlength=3></td>' .
-        '</tr>' . "\n" .
-        '<tr><td align="right">Recipe:</td>' . "\n" .
-        '<td><textarea class="full" name="recipe_text"></textarea></td>' .
-        '</tr>' . "\n" .
-        '<td>&nbsp;</td><td><input type="submit" value="Submit"></td>' . "\n" .
-        '</form></tr></table>' . "\n" .
-        '</td>' . "\n";
-}
-
-/**
- * Shows a menu allowing the user to update an existing
- * recipe with the Base API update feature.
- * @return void
- */
-function showEditMenu() {
-  global $cuisines;
-
-  $client = Zend_Gdata_AuthSub::getHttpClient($_POST['token']);
-  $gdata = new Zend_Gdata_Gbase($client);
-
-  try {
-    $feed = $gdata->getGbaseItemFeed(ITEMS_FEED_URI);
-    foreach ($feed->entries as $feed_entry) {
-      $editLink = $feed_entry->link[2]->href;
-
-      if ($editLink == $_POST['edit']) {
-        $baseAttributeArr = $feed_entry->getGbaseAttribute('cooking_time');
-        if (isset($baseAttributeArr[0]) && is_object($baseAttributeArr[0])) {
-          $splitCookingTime = explode(' ', $baseAttributeArr[0]->text);
-        }
-
-        $baseAttributeArr = $feed_entry->getGbaseAttribute('cuisine');
-        // Cuisine can have multiple entries
-        if (isset($baseAttributeArr[0]) && is_object($baseAttributeArr[0])) {
-          $cuisine = $baseAttributeArr[0]->text;
-        }
-
-        $baseAttributeArr = $feed_entry->getGbaseAttribute('serving_count');
-        // $serving_count can have multiple entries
-        if (isset($baseAttributeArr[0]) && is_object($baseAttributeArr[0])) {
-          $serving_count = $baseAttributeArr[0]->text;
-        }
-
-        $main_ingredient = $feed_entry->getGbaseAttribute('main_ingredient');
-        // Main_ingredient can have multiple entries
-        if (is_array($main_ingredient)) {
-          $main_ingredient = $main_ingredient[0]->text;
-        }
-
-        printHTMLHeader();
-
-        print '<table style="width:50%">' . "\n";
-        print '<tr>' .
-              '<th colspan="2" style="text-align:center">Edit recipe:</th>' .
-              '</tr>' . "\n";
-
-        print "<form method=\"post\" action=\"{$_SERVER['PHP_SELF']}\">\n" .
-              '<input type="hidden" name="action" value="update">' . "\n" .
-              '<input type="hidden" name="link" value="' .
-              $_POST['edit'] . '">' . "\n" .
-              '<input type="hidden" name="token" value="' .
-              $_POST['token'] . '">' . "\n";
-
-        print '<tr><td align="right">Title:</td>' . "\n" .
-              '<td>' .
-              '<input type="text" name="recipe_title" class="half" value="' .
-              $feed_entry->title->text . '">' .
-              '</td></tr>' . "\n";
-
-        print '<tr><td align="right">Main ingredient:</td>' . "\n" .
-              '<td><input type="text" name="main_ingredient" value="' .
-               $main_ingredient . '" class="half"></td></tr>' . "\n";
-
-        print '<tr><td align="right">Cuisine:</td>' . "\n" .
-              '<td><select name="cuisine" class="half">' . "\n";
-
-        foreach ($cuisines as $curCuisine) {
-          print '<option value="' . $curCuisine . '"';
-          if ($curCuisine == $cuisine) {
-            print ' selected="selected"';
-          }
-          print '>' . $curCuisine . "</option>\n";
-        }
-
-        print '</select></td></tr>' . "\n";
-        print '<tr><td align="right">Cooking Time:</td>' .
-              '<td><input type="text" name="time_val" size="2" maxlength="2" ' .
-              'value="' . $splitCookingTime[0] . '">&nbsp;' . "\n" .
-              '<select name="time_units">' . "\n";
-        if ($splitCookingTime[1] == "minutes") {
-          print '<option value="minutes" selected="selected">minutes</option>' .
-            "\n";
-          print '<option value="hours">hours</option>' . "\n";
-        } else {
-          print '<option value="minutes">minutes</option>' . "\n";
-          print '<option value="hours" selected="selected">hours</option>' .
-            "\n";
-        }
-
-        print '</select></td></tr>' . "\n" .
-              '<tr><td align="right">Serves:</td>' . "\n" .
-              '<td><input type="text" name="serves" value="' .
-              $serving_count . '" size="2" maxlength="3"></td></tr>' . "\n" .
-              '<tr><td align="right">Recipe:</td>' . "\n" .
-              '<td><textarea class="full" name="recipe_text">' .
-              $feed_entry->content->text . '</textarea></td></tr>' . "\n" .
-              '<td>&nbsp;</td><td><input type="submit" value="Update">' .
-              '</td>' . "\n" .
-              '</form></tr></table>' . "\n";
-
-        printHTMLFooter();
-
-        break;
-      }
-    }
-  } catch (Zend_Gdata_App_Exception $e) {
-    showMainMenu($e->getMessage(), $_POST['token']);
-  }
-}
-
-/**
- * Displays both the "List of current recipes" and
- * "Insert a new recipe" panels in a single table.
- * @param string $tableTitle The title to display in the html table
- * @param string $sessionToken A session token
- * @return void
- */
-function showMainMenu($tableTitle, $sessionToken) {
-  printHTMLHeader();
-
-  print '<table style="width: 75%;text-align:center">' . "\n" .
-        '<tr>' . "\n" .
-        '<th colspan="2" style="text-align:center;">' .
-        'PHP Demo: Google Base data API<br />' .
-        '<font size="-1">' .
-        '<span style="font-variant: small-caps;">Powered By</span> ' .
-        '<a href="http://framework.zend.com/download/gdata">' .
-        'Zend Google Data Client Library</a></font></th>' . "\n" .
-        '</tr>' . "\n" .
-        '<tr><td colspan="2" align="center">' . $tableTitle . "</td></tr>\n" .
-        '<tr>' . "\n";
-
-  // Create the two sub-tables.
-  showRecipeListPane($sessionToken);
-  showRecipeInsertPane($sessionToken);
-
-  // Add a "Sign out" link.
-  print '<tr><th colspan="2" style="text-align: center">Or click here to' .
-        ' <a href="http://www.google.com/accounts/Logout">sign out</a>' .
-        ' of your Google account.</th></tr>' . "\n";
-
-  // Close the master table.
-  print '</table>' . "\n";
-
-  printHTMLFooter();
-}
-
-/**
- * Exchanges the given single-use token for a session
- * token using AuthSubSessionToken, and returns the result.
- * @param string $token The single-use token from AuthSubRequest
- * @return string The upgraded (session) token
- */
-function exchangeToken($token) {
-  return Zend_Gdata_AuthSub::getAuthSubSessionToken($token);
-}
-
-/**
- * We arrive here after the user first authenticates and we get back
- * a single-use token.
- * @return void
- */
-function showFirstAuthScreen() {
-  $singleUseToken = $_GET['token'];
-  $sessionToken = exchangeToken($singleUseToken);
-
-  if (!$sessionToken) {
-    showIntroPage();
-  } else {
-    $tableTitle = "Here's your <b>single use token:</b> " .
-      "<code>$singleUseToken</code><br/>" . "\n" .
-      "And here's the <b>session token:</b> <code>$sessionToken</code>";
-
-      showMainMenu($tableTitle, $sessionToken);
-  }
-}
-
-/**
- * Main logic to handle the POST operation of inserting an item.
- * @return void
- */
-function handlePost() {
-  try {
-    $newEntry= postItem();
-    if ($newEntry) {
-      showMainMenu('Recipe inserted!  It will be searchable by the API soon...',
-                    $_POST['token']);
-    }
-  } catch (Zend_Gdata_App_Exception $e) {
-    showMainMenu('Recipe insertion failed: ' . $e->getMessage(),
-                 $_POST['token']);
-  }
-}
-
-/**
- * Main logic to handle deleting an item.
- * @return void
- */
-function handleDelete() {
-  try {
-    deleteItem();
-    showMainMenu('Recipe deleted.', $_POST['token']);
-  } catch (Zend_Gdata_App_Exception $e) {
-    showMainMenu('Recipe deletion failed: ' . $e->getMessage(),
-                 $_POST['token']);
-  }
-}
-
-/**
- * Main logic to handle a batch deletion of items.
- * @return void
- */
-function handleBatch() {
-  try {
-    $batch_response = batchDelete();
-    if ($batch_response->isSuccessful()) {
-      showMainMenu('All recipes deleted.', $_POST['token']);
-    } else {
-      showMainMenu('Batch deletion failed: ' . $batch_response->getMessage(),
-                   $_POST['token']);
-    }
-  } catch (Zend_Gdata_App_Exception $e) {
-    showMainMenu('Batch deletion failed: ' . $e->getMessage(), $_POST['token']);
-  }
-}
-
-/**
- * Main logic to handle updating an item
- * @return void
- */
-function handleUpdate() {
-  try {
-    if (updateItem()) {
-      showMainMenu('Recipe successfully updated.', $_POST['token']);
-    } else {
-      showMainMenu('Recipe update failed.', $_POST['token']);
-    }
-  } catch (Zend_Gdata_App_Exception $e) {
-    showMainMenu('Recipe update failed: ' . $e->getMessage(), $_POST['token']);
-  }
-}
-
-/**
- * Main logic to handle requests
- */
-if (count($_GET) == 1 && array_key_exists('token', $_GET)) {
-  showFirstAuthScreen();
-} else {
-  if (count($_POST) == 0) {
-    showIntroPage();
-  } else {
-    if ($_POST['action'] == 'insert') {
-      handlePost();
-    } else if ($_POST['action'] == 'delete') {
-      handleDelete();
-    } else if ($_POST['action'] == 'delete_all') {
-      handleBatch();
-    } else if ($_POST['action'] == 'edit') {
-      showEditMenu();
-    } else if ($_POST['action'] == 'update') {
-      handleUpdate();
-    } else {
-      showIntroPage();
-    }
-  }
-}
-
-?>

+ 0 - 7
documentation/manual/de/module_specs/Zend_Gdata-Introduction.xml

@@ -61,13 +61,6 @@
 
             <listitem>
                 <para>
-                    <link linkend="zend.gdata.gbase">Google Base</link> bietet die Möglichkeit
-                    Elemente in Google Base zu empfangen, senden, aktualisieren und zu löschen.
-                </para>
-            </listitem>
-
-            <listitem>
-                <para>
                     <link linkend="zend.gdata.youtube">YouTube</link> bietet die Möglichkeit Videos,
                     Kommentare, Favoriten, Einschreibungen, Benutzerprofile und vieles mehr zu
                     Suchen und zu Empfangen.

+ 0 - 513
documentation/manual/de/module_specs/Zend_Gdata_Gbase.xml

@@ -1,513 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- EN-Revision: 24249 -->
-<!-- Reviewed: no -->
-<sect1 id="zend.gdata.gbase">
-    <title>Google Base verwenden</title>
-
-    <para>
-        Die Google Base Daten <acronym>API</acronym> wurde entwickelt um Entwicklern zwei Dinge zu
-        gestatten:
-
-        <itemizedlist>
-            <listitem>
-                <para>Google Base Daten abzufragen um Anwendungen und Mashups zu erstellen.</para>
-            </listitem>
-
-            <listitem>
-                <para>Google Base Elemente einzugeben und programtechnisch handzuhaben.</para>
-            </listitem>
-        </itemizedlist>
-    </para>
-
-    <para>
-        Es gibt zwei Feeds an Elementen: Feed Fetzen und benutzerdefinierte Feeds für Elemente. Der
-        Feed Fetzen enthält alle Google Base Daten und ist für jeden lesbar um Abfragen darauf
-        durchzuführen ohne der Notwendigkeit sich zu Authentifizieren. Der benutzerdefinierte Feed
-        für Elemente ist ein benutzer spezifisches Subset an Daten und nur ein Benutzer/Eigentümer
-        kann auf diesen Feed zugreifen um eigene Daten einzufügen, zu aktualisieren oder zu löschen.
-        Abfragen werden für beide Typen von Feeds auf dem selben Weg erstellt.
-    </para>
-
-    <para>
-        Siehe <ulink
-            url="http://code.google.com/apis/base/">http://code.google.com/apis/base</ulink> für
-        weitere Informationen über die Google Base <acronym>API</acronym>.
-    </para>
-
-    <sect2 id="zend.gdata.gbase.connect">
-        <title>Verbinden zum Base Service</title>
-
-        <para>
-            Die Google Base <acronym>API</acronym> basiert, wie alle GData <acronym>API</acronym>s,
-            auf dem Atom Publishing Protokoll (APP), einem <acronym>XML</acronym> basierenden Format
-            für gemanagte Web-basierende Ressourcen. Der Verkehr zwischen einem Client und den
-            Google Base Servern findet über <acronym>HTTP</acronym> statt, und erlaubt sowohl
-            authentifizierte als auch nicht authentifizierte Verbindungen.
-        </para>
-
-        <para>
-            Bevor irgendeine Transaktion stattfinden kann, muß diese Verbindung hergestellt werden.
-            Das Erstellen einer Verbindung zu den Base Server enthält zwei Schritte: Erstellen eines
-            <acronym>HTTP</acronym> Clients und das Binden einer
-            <classname>Zend_Gdata_Gbase</classname> Serviceinstanz an diesen Client.
-        </para>
-
-        <sect3 id="zend.gdata.gbase.connect.authentication">
-            <title>Authentifizierung</title>
-
-            <para>
-                Die Google Base <acronym>API</acronym> erlaubt Zugriff auf beide, sowohl öffentliche
-                als auch private Base Feeds. Öffentliche Feeds benötigen keine Authentifizierung,
-                sind aber nur lesbar und bieten nur reduzierte Funktionalität. Private Feeds bieten
-                die größte Funktionalität benötigen aber eine authentifizierte Verbindung zu den
-                Base Servern. Es gibt drei authentifizierung Schematas die von Google Base
-                unterstützt werden:
-            </para>
-
-            <itemizedlist>
-                <listitem>
-                    <para>
-                        <firstterm>ClientAuth</firstterm> bietet dirakte Benutzername/Passwort
-                        Authentifizierung zu den Base Servern. Da es dieses Schema notwendig macht
-                        das Benutzer die Anwendung mit Ihrem Passwort versorgen, ist diese
-                        Authentifizierung nur dann notwendig wenn andere Authentifizierung Schemata
-                        unzureichend sind.
-                    </para>
-                </listitem>
-
-                <listitem>
-                    <para>
-                        <firstterm>AuthSub</firstterm> erlaubt die Authentifizierung zu den Base
-                        Servern über einen Google Proxy Server. Das bietet das gleiche Level an
-                        Bequemlichkeit wie ClientAuth, aber ohne die Sicherheitsrisiken was es zu
-                        einer idealen Wahl für Web-basierte Anwendungen macht.
-                    </para>
-                </listitem>
-            </itemizedlist>
-
-            <para>
-                Die <classname>Zend_Gdata</classname> Bibliothek bietet Unterstützung für alle drei
-                Authentifizierungs Schemata. Im Rest dieses Kapitels wird angenommen das man mit den
-                Authentifizierungs Schemata umgehen kann und wie eine notwendige Authentifizierte
-                Verbindung erstellt wird. Für weitere Informationen kann in das Kapitel <link
-                    linkend="zend.gdata.introduction.authentication">Authentifizierung</link> oder
-                die <ulink url="http://code.google.com/apis/gdata/auth.html">Übersicht der
-                    Authentifizierung im Entwickler Guide der Google Data
-                    <acronym>API</acronym></ulink> gesehen werden.
-            </para>
-        </sect3>
-
-        <sect3 id="zend.gdata.gbase.connect.service">
-            <title>Eine Service Instanz erstellen</title>
-
-            <para>
-                Im mit Google Base zu interagieren, bietet diese Bibliothek die
-                <classname>Zend_Gdata_Gbase</classname> Service Klasse. Diese klasse bietet ein
-                standardmäßiges Interface zu Google Data und den Atom Publishing Protokoll Modellen
-                und unterstützt in der Durchführung von Anfragen von und zu den Base Servern.
-            </para>
-
-            <para>
-                Sobald ein Authentifizierungs Schema ausgewählt wurde, besteht der nächste Schritt
-                darin eine Instanz von <classname>Zend_Gdata_Gbase</classname> zu erstellen. Diese
-                Klasse nimmt eine Instanz von <classname>Zend_Http_Client</classname> als einziges
-                Argument. Das bietet ein Interface für AuthSub und ClientAuth Authentifizierungen,
-                da beide einen speziellen authentifizierten <acronym>HTTP</acronym> Client für die
-                Erstellung benötigen. Wenn keine Argumente angegeben wurden, wird automatisch eine
-                nicht authentifizierte Instanz von <classname>Zend_Http_Client</classname> erstellt.
-            </para>
-
-            <para>
-                Das nachfolgende Beispiel zeigt wir eine Base Service Klasse erstellt wird indem die
-                ClientAuth Authentifizierung verwendet wird:
-            </para>
-
-            <programlisting language="php"><![CDATA[
-// Parameter für die ClientAuth Authentifizierung
-$service = Zend_Gdata_Gbase::AUTH_SERVICE_NAME;
-$user = "sample.user@gmail.com";
-$pass = "pa$$w0rd";
-
-// Erstellt einen authentifizierten HTTP Client
-$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service);
-
-// Erstellt eine Instanz des Base Services
-$service = new Zend_Gdata_Gbase($client);
-]]></programlisting>
-
-            <para>
-                Ein Base Service der AuthSub verwendet kann ähnlich erstellt werden, durch einen
-                etwas längeren Code:
-            </para>
-
-            <programlisting language="php"><![CDATA[
-/*
- * Empfängt die aktuelle URL so das der AuthSub Server weiß wohin er
- * umleiten soll nachdem die Authentifizierung des Benutzers vollständig ist.
- */
-function getCurrentUrl()
-{
-    global $_SERVER;
-
-    // Filtert php_self um Sicherheits Risiken zu vermeiden
-    $php_request_uri =
-        htmlentities(substr($_SERVER['REQUEST_URI'],
-                            0,
-                            strcspn($_SERVER['REQUEST_URI'], "\n\r")),
-                     ENT_QUOTES);
-
-    if (isset($_SERVER['HTTPS']) &&
-        strtolower($_SERVER['HTTPS']) == 'on') {
-        $protocol = 'https://';
-    } else {
-        $protocol = 'http://';
-    }
-    $host = $_SERVER['HTTP_HOST'];
-    if ($_SERVER['HTTP_PORT'] != '' &&
-        (($protocol == 'http://' && $_SERVER['HTTP_PORT'] != '80') ||
-        ($protocol == 'https://' && $_SERVER['HTTP_PORT'] != '443'))) {
-        $port = ':' . $_SERVER['HTTP_PORT'];
-    } else {
-        $port = '';
-    }
-    return $protocol . $host . $port . $php_request_uri;
-}
-
-/**
- * Einen AuthSub authentifizierten HTTP Client erhalten, und den Benutzer zum
- * AuthSub Server umleiten um sich anzumelden wenn das notwendig ist.
- */
-function getAuthSubHttpClient()
-{
-    global $_SESSION, $_GET;
-
-    // Wenn es keine AuthSub Session gibt oder kein Einmal-Token auf uns wartet,
-    // den Benutzer zum AuthSub Server umleiten um eine zu erhalten.
-    if (!isset($_SESSION['sessionToken']) && !isset($_GET['token'])) {
-        // Parameter für den AuthSub Server
-        $next = getCurrentUrl();
-        $scope = "http://www.google.com/base/feeds/items/";
-        $secure = false;
-        $session = true;
-
-        // Den Benutzer zum AuthSub Server umleiten um sich anzumelden
-
-        $authSubUrl = Zend_Gdata_AuthSub::getAuthSubTokenUri($next,
-                                                             $scope,
-                                                             $secure,
-                                                             $session);
-         header("HTTP/1.0 307 Temporary redirect");
-
-         header("Location: " . $authSubUrl);
-
-         exit();
-    }
-
-    // Konvertiert einen AuthSub Einmal-Token in einen Session-Token wenn das notwendig ist
-    if (!isset($_SESSION['sessionToken']) && isset($_GET['token'])) {
-        $_SESSION['sessionToken'] =
-            Zend_Gdata_AuthSub::getAuthSubSessionToken($_GET['token']);
-    }
-
-    // An diesem Punkt sind wir durch AuthSub authentifiziert und können eine
-    // authentifizierte Instanz des HTTP Clients erhalten
-
-    // Erstellt einen authentifizierten HTTP Client
-    $client = Zend_Gdata_AuthSub::getHttpClient($_SESSION['sessionToken']);
-    return $client;
-}
-
-// -> Script Ausführung beginnt hier <-
-
-// http://code.google.com/apis/gdata/reference.html#Queries
-// Sicherstellen das der Benutzer eine gültige Session hat sodas wir die
-// AuthSub Session aufnehmen können sobald diese vorhanden ist.
-session_start();
-
-// Erstellt eine Instanz des Base Services, leitet den Benutzer zum AuthSub Server um
-// wenn das notwendig ist.
-$service = new Zend_Gdata_Gbase(getAuthSubHttpClient());
-]]></programlisting>
-
-            <para>
-                Letztendlich kann ein nicht authentifizierter Server erstellt werden für die
-                Verwendung mit Feed Fetzen:
-            </para>
-
-            <programlisting language="php"><![CDATA[
-// Erstellt eine Instanz des Base Services und verwendet einen nicht
-// authentifizierten HTTP Client
-$service = new Zend_Gdata_Gbase();
-]]></programlisting>
-        </sect3>
-    </sect2>
-
-    <sect2 id="zend.gdata.gbase.retrieve">
-        <title>Elemente empfangen</title>
-
-        <para>
-            Benutzerdefinierte Feeds oder Feed Fetzen können abgefragt werden um Elemente zu
-            erhalten. Es benötigt zwei Schritte um eine Abfrage zu senden und über den
-            zurückgegebenen Feed zu iterieren.
-        </para>
-
-        <sect3 id="zend.gdata.gbase.retrieve.query">
-            <title>Eine strukturierte Anfrage senden</title>
-
-            <para>
-                Eine strukturierte Anfrage kann gesendet werden um Elemente vom eigenen
-                benutzerdefinierten Feed oder von einem öffentlichen Feed Fetzen zu erhalten.
-            </para>
-
-            <para>
-                Wenn Elemente empfangen werden indem die Base <acronym>API</acronym> verwendet wird,
-                werden speziell konstruierte Abfrage <acronym>URL</acronym>s verwendet um zu
-                beschreiben welche Evente zurückgegeben werden sollen. Die
-                <classname>Zend_Gdata_Gbase_ItemQuery</classname> und
-                <classname>Zend_Gdata_Gbase_SnippetQuery</classname> Klassen vereinfachen diese
-                Aufgabe durch die automatische Erstellung einer Anfrage <acronym>URL</acronym>
-                basierend auf den angegebenen Parametern.
-            </para>
-
-            <sect4 id="zend.gdata.gbase.retrieve.query.customeritems">
-                <title>Benutzerdefinierte Feed Elemente Anfragen</title>
-
-                <para>
-                    Um eine Abfrage auf Benutzerdefinierte Feed Elemente durchzuführen, gibt es die
-                    <methodname>newItemQuery()</methodname> und
-                    <methodname>getGbaseItemFeed()</methodname> Methoden:
-                </para>
-
-                <programlisting language="php"><![CDATA[
-$service = new Zend_Gdata_Gbase($client);
-$query = $service->newItemQuery();
-$query->setBq('[title:Programming]');
-$query->setOrderBy('modification_time');
-$query->setSortOrder('descending');
-$query->setMaxResults('5');
-$feed = $service->getGbaseItemFeed($query);
-]]></programlisting>
-
-                <para>
-                    Eine komplette Liste dieser Parameter ist im <ulink
-                        url="http://code.google.com/apis/base/items-feed.html#QueParameters">Abfrage
-                        Parameter Kapitel</ulink> der Benutzerdefinierten Feed Elemente
-                    Dokumentation vorhanden.
-                </para>
-            </sect4>
-
-            <sect4 id="zend.gdata.gbase.retrieve.query.snippets">
-                <title>Feed Fetzen abfragen</title>
-
-                <para>
-                    Um eine Abfrage über öffentliche Feed Fetzen durchzuführen, gibt es die
-                    <methodname>newSnippetQuery()</methodname> und
-                    <methodname>getGbaseSnippetFeed()</methodname> Methoden:
-                </para>
-
-                <programlisting language="php"><![CDATA[
-$service = new Zend_Gdata_Gbase();
-$query = $service->newSnippetQuery();
-$query->setBq('[title:Programming]');
-$query->setOrderBy('modification_time');
-$query->setSortOrder('descending');
-$query->setMaxResults('5');
-$feed = $service->getGbaseSnippetFeed($query);
-]]></programlisting>
-
-                <para>
-                    Eine komplette Liste dieser Parameter ist im <ulink
-                        url="http://code.google.com/apis/base/items-feed.html#QueParameters">Abfrage
-                        Parameter Kapitel</ulink> der Feed Fetzen Dokumentation vorhanden.
-                </para>
-            </sect4>
-        </sect3>
-
-        <sect3 id="zend.gdata.gbase.retrieve.iterate">
-            <title>Über die Elemente iterieren</title>
-
-            <para>
-                Google Base Elemente können Element-Spezifische Attribute enthalten, wie
-                <emphasis>&lt;g:main_ingredient&gt;</emphasis> und
-                <emphasis>&lt;g:weight&gt;</emphasis>.
-            </para>
-
-            <para>
-                Um über alle Attribute eines gegebenen Elements zu iterieren, gibt es die
-                <methodname>getGbaseAttributes()</methodname> Methode die über alle Ergebnisse
-                iteriert:
-            </para>
-
-            <programlisting language="php"><![CDATA[
-foreach ($feed->entries as $entry) {
-  // Alle Attribute erhalten und den Namen und den Textwert
-  // jedes Attributes ausgeben
-  $baseAttributes = $entry->getGbaseAttributes();
-  foreach ($baseAttributes as $attr) {
-    echo "Attribut " . $attr->name . " : " . $attr->text . "<br>";
-  }
-}
-]]></programlisting>
-
-            <para>
-                Oder es kann auf spezielle Attributnamen gesehen werden und über die passenden
-                Ergebnisse iteriert werden:
-            </para>
-
-            <programlisting language="php"><![CDATA[
-foreach ($feed->entries as $entry) {
-  // Gibt alle Hauptzutaten aus <g:main_ingredient>
-  $baseAttributes = $entry->getGbaseAttribute("main_ingredient");
-  foreach ($baseAttributes as $attr) {
-    echo "Hauptzutaten: " . $attr->text . "<br>";
-  }
-}
-]]></programlisting>
-        </sect3>
-    </sect2>
-
-    <sect2 id="zend.gdata.gbase.crud">
-        <title>Benutzerdefinierte Elemente einfügen, aktualisieren und löschen</title>
-
-        <para>
-            Ein Benutzer/Eigentümer kann auf seine eigenen Benutzerdefinierten Feed Elemente
-            zugreifen um Sie hinzuzufügen, zu aktualisieren oder Ihre Elemente zu löschen. Diese
-            Operationen sind für den öffentlichen Feed Fetzen nicht vorhanden.
-        </para>
-
-        <para>
-            Eine Feed Operation kann getestet werden bevor diese wirklich ausgeführt wird durch das
-            setzen des Dry-Run Flags (<varname>$dryRun</varname>) auf <constant>TRUE</constant>.
-            Sobald sichergestellt ist das die Daten übertragen werden sollen, muß es auf
-            <constant>FALSE</constant> gesetzt werden um die Operation durchzuführen.
-        </para>
-
-        <sect3 id="zend.gdata.gbase.crud.insert">
-            <title>Ein Element einfügen</title>
-
-            <para>
-                Elemente können hinzugefügt werden durch Verwenden der
-                <methodname>insertGbaseItem()</methodname> Methode des Base Services:
-            </para>
-
-            <programlisting language="php"><![CDATA[
-$service = new Zend_Gdata_Gbase($client);
-$newEntry = $service->newItemEntry();
-
-// Überschrift hinzufügen
-$title = "PHP Entwickler Handbuch";
-$newEntry->title = $service->newTitle(trim($title));
-
-// Etwas Inhalt hinzufügen
-$content = "Wichtiges Handbuch für PHP Entwickler.";
-$newEntry->content = $service->newContent($content);
-$newEntry->content->type = 'text';
-
-// Produkt Typ definieren
-$itemType = "Produkte";
-$newEntry->itemType = $itemType;
-
-// Ein spezielles Element Attribut hinzufügen
-$newEntry->addGbaseAttribute("product_type", "book", "text");
-$newEntry->addGbaseAttribute("price", "12.99 USD", "floatUnit");
-$newEntry->addGbaseAttribute("quantity", "10", "int");
-$newEntry->addGbaseAttribute("weight", "2.2 lbs", "numberUnit");
-$newEntry->addGbaseAttribute("condition", "New", "text");
-$newEntry->addGbaseAttribute("author", "John Doe", "text");
-$newEntry->addGbaseAttribute("edition", "First Edition", "text");
-$newEntry->addGbaseAttribute("pages", "253", "number");
-$newEntry->addGbaseAttribute("publisher", "My Press", "text");
-$newEntry->addGbaseAttribute("year", "2007", "number");
-$newEntry->addGbaseAttribute("payment_accepted", "Google Checkout", "text");
-
-$dryRun = true;
-$createdEntry = $service->insertGbaseItem($newEntry, $dryRun);
-]]></programlisting>
-        </sect3>
-
-        <sect3 id="zend.gdata.gbase.crud.modify">
-            <title>Ein Element modifizieren</title>
-
-            <para>
-                Jedes Atribut eines Element kann aktualisiert werden wenn durch Sie iteriert wird:
-            </para>
-
-            <programlisting language="php"><![CDATA[
-// Die Überschrift aktualisieren
-$newTitle = "PHP Entwickler Handbuch zweite Editiondbook Second Edition";
-$entry->title = $service->newTitle($newTitle);
-
-// <g:price> Attribute finden und den Preis aktualisieren
-$baseAttributes = $entry->getGbaseAttribute("price");
-if (is_object($baseAttributes[0])) {
-  $newPrice = "16.99 USD";
-  $baseAttributes[0]->text = $newPrice;
-}
-
-// <g:pages> Attribute finden und die anzahl an Seiten aktualisieren
-$baseAttributes = $entry->getGbaseAttribute("pages");
-if (is_object($baseAttributes[0])) {
-  $newPages = "278";
-  $baseAttributes[0]->text = $newPages;
-
-  // Den Attribut Typ von "number" zu "int" aktualisieren
-  if ($baseAttributes[0]->type == "number") {
-    $newType = "int";
-    $baseAttributes[0]->type = $newType;
-  }
-}
-
-// <g:label> Attribute entfernen
-$baseAttributes = $entry->getGbaseAttribute("label");
-foreach ($baseAttributes as $note) {
-  $entry->removeGbaseAttribute($note);
-}
-
-// Neue Attribute hinzufügen
-$entry->addGbaseAttribute("note", "PHP 5", "text");
-$entry->addGbaseAttribute("note", "Web Programming", "text");
-
-// Die Änderungen abspeichern durch Aufruf von save() am Element-Objekt selbst
-$dryRun = true;
-$entry->save($dryRun);
-
-// Oder die Änderungen durch Aufruf von updateGbaseItem() am Service Objekt abspeichern
-// $dryRun = true;
-// $service->updateGbaseItem($entry, $dryRun);
-]]></programlisting>
-
-            <para>
-                Nach der Durchführung der Änderungen, muß entweder die
-                <methodname>save($dryRun)</methodname> Methode am
-                <classname>Zend_Gdata_Gbase_ItemEntry</classname> Objekt oder die
-                <methodname>updateGbaseItem($entry, $dryRun)</methodname> Methode am
-                <classname>Zend_Gdata_Gbase</classname> Objekt aufgerufen werden um die Änderungen
-                abzuspeichern.
-            </para>
-        </sect3>
-
-        <sect3 id="zend.gdata.gbase.crud.delete">
-            <title>Ein Element löschen</title>
-
-            <para>
-                ein Element kann gelöscht werden indem die
-                <methodname>deleteGbaseItem()</methodname> Methode aufgerufen wird:
-            </para>
-
-            <programlisting language="php"><![CDATA[
-$dryRun = false;
-$service->deleteGbaseItem($entry, $dryRun);
-]]></programlisting>
-
-            <para>
-                Alternativ kann <methodname>delete()</methodname> auf dem
-                <classname>Zend_Gdata_Gbase_ItemEntry</classname> Objekt aufgerufen werden:
-            </para>
-
-            <programlisting language="php"><![CDATA[
-$dryRun = false;
-$entry->delete($dryRun);
-]]></programlisting>
-        </sect3>
-    </sect2>
-</sect1>

+ 0 - 2
documentation/manual/en/manual-print1.xml.in

@@ -240,10 +240,8 @@
         <xi:include href="module_specs/Zend_Gdata_ClientLogin.xml" />
         <xi:include href="module_specs/Zend_Gdata_Calendar.xml" />
         <xi:include href="module_specs/Zend_Gdata_Docs.xml" />
-        <xi:include href="module_specs/Zend_Gdata_Health.xml" />
         <xi:include href="module_specs/Zend_Gdata_Spreadsheets.xml" />
         <xi:include href="module_specs/Zend_Gdata_Gapps.xml" />
-        <xi:include href="module_specs/Zend_Gdata_Gbase.xml" />
         <xi:include href="module_specs/Zend_Gdata_Photos.xml" />
         <xi:include href="module_specs/Zend_Gdata_YouTube.xml" />
         <xi:include href="module_specs/Zend_Gdata_Exception.xml" />

+ 0 - 5
documentation/manual/en/manual.xml.in

@@ -1091,11 +1091,6 @@
                     <xi:include href="../en/module_specs/Zend_Gdata_Gapps.xml" />
                 </xi:fallback>
             </xi:include>
-            <xi:include href="module_specs/Zend_Gdata_Gbase.xml">
-                <xi:fallback>
-                    <xi:include href="../en/module_specs/Zend_Gdata_Gbase.xml" />
-                </xi:fallback>
-            </xi:include>
             <xi:include href="module_specs/Zend_Gdata_Photos.xml">
                 <xi:fallback>
                     <xi:include href="../en/module_specs/Zend_Gdata_Photos.xml" />

+ 0 - 8
documentation/manual/en/module_specs/Zend_Gdata-Introduction.xml

@@ -60,14 +60,6 @@
 
             <listitem>
                 <para>
-                    <link linkend="zend.gdata.gbase">Google Base</link>
-                    provides the ability to retrieve, post, update, and
-                    delete items in Google Base.
-                </para>
-            </listitem>
-
-            <listitem>
-                <para>
                     <link linkend="zend.gdata.youtube">YouTube</link>
                     provides the ability to search and retrieve videos,
                     comments, favorites, subscriptions, user profiles

+ 0 - 499
documentation/manual/en/module_specs/Zend_Gdata_Gbase.xml

@@ -1,499 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Reviewed: no -->
-<sect1 id="zend.gdata.gbase">
-    <title>Using Google Base</title>
-
-    <para>
-        The Google Base data <acronym>API</acronym> is designed to enable developers to do two
-        things:
-
-        <itemizedlist>
-            <listitem>
-                <para>
-                    Query Google Base data to create applications and mashups.
-                </para>
-            </listitem>
-
-            <listitem>
-                <para>
-                    Input and manage Google Base items programmatically.
-                </para>
-            </listitem>
-        </itemizedlist>
-    </para>
-
-    <para>
-        There are two item feeds: snippets feed and customer items feeds. The snippets feed contains
-        all Google Base data and is available to anyone to query against without a need for
-        authentication. The customer items feed is a customer-specific subset of data and only a
-        customer/owner can access this feed to insert, update, or delete their own data. Queries are
-        constructed the same way against both types of feeds.
-    </para>
-
-    <para>
-        See <ulink url="http://code.google.com/apis/base/">http://code.google.com/apis/base</ulink>
-        for more information about the Google Base <acronym>API</acronym>.
-    </para>
-
-    <sect2 id="zend.gdata.gbase.connect">
-        <title>Connect To The Base Service</title>
-
-        <para>
-            The Google Base <acronym>API</acronym>, like all GData <acronym>API</acronym>s, is based
-            off of the Atom Publishing Protocol (APP), an <acronym>XML</acronym> based format for
-            managing web-based resources. Traffic between a client and the Google Base servers
-            occurs over <acronym>HTTP</acronym> and allows for both authenticated and
-            unauthenticated connections.
-        </para>
-
-        <para>
-            Before any transactions can occur, this connection needs to be made. Creating a
-            connection to the base servers involves two steps: creating an <acronym>HTTP</acronym>
-            client and binding a <classname>Zend_Gdata_Gbase</classname> service instance to that
-            client.
-        </para>
-
-        <sect3 id="zend.gdata.gbase.connect.authentication">
-            <title>Authentication</title>
-
-            <para>
-                The Google Base <acronym>API</acronym> allows access to both public and private base
-                feeds. Public feeds do not require authentication, but are read-only and offer
-                reduced functionality. Private feeds offers the most complete functionality but
-                requires an authenticated connection to the base servers. There are three
-                authentication schemes that are supported by Google Base:
-            </para>
-
-            <itemizedlist>
-                <listitem>
-                    <para>
-                        <firstterm>ClientAuth</firstterm> provides direct username/password
-                        authentication to the base servers. Since this scheme requires that users
-                        provide your application with their password, this authentication is only
-                        recommended when other authentication schemes are insufficient.
-                    </para>
-                </listitem>
-
-                <listitem>
-                    <para>
-                        <firstterm>AuthSub</firstterm> allows authentication to the base servers via
-                        a Google proxy server. This provides the same level of convenience as
-                        ClientAuth but without the security risk, making this an ideal choice for
-                         web-based applications.
-                    </para>
-                </listitem>
-            </itemizedlist>
-
-            <para>
-                The <classname>Zend_Gdata</classname> library provides support for all three
-                authentication schemes. The rest of this chapter will assume that you are familiar
-                the authentication schemes available and how to create an appropriate authenticated
-                connection. For more information, please see the <link
-                    linkend="zend.gdata.introduction.authentication">authentication section</link>
-                or the <ulink url="http://code.google.com/apis/gdata/auth.html">Authentication
-                    Overview in the Google Data <acronym>API</acronym> Developer's Guide</ulink>.
-            </para>
-        </sect3>
-
-        <sect3 id="zend.gdata.gbase.connect.service">
-            <title>Create A Service Instance</title>
-
-            <para>
-                In order to interact with Google Base, this library provides the
-                <classname>Zend_Gdata_Gbase</classname> service class. This class provides a common
-                interface to the Google Data and Atom Publishing Protocol models and assists in
-                marshaling requests to and from the base servers.
-            </para>
-
-            <para>
-                Once deciding on an authentication scheme, the next step is to create an instance of
-                <classname>Zend_Gdata_Gbase</classname>. This class takes in an instance of
-                <classname>Zend_Http_Client</classname> as a single argument. This provides an
-                interface for AuthSub and ClientAuth authentication, as both of these creation of a
-                special authenticated <acronym>HTTP</acronym> client. If no arguments are provided,
-                an unauthenticated instance of <classname>Zend_Http_Client</classname>
-                will be automatically created.
-            </para>
-
-            <para>
-                The example below shows how to create a Base service class using ClientAuth
-                authentication:
-            </para>
-
-            <programlisting language="php"><![CDATA[
-// Parameters for ClientAuth authentication
-$service = Zend_Gdata_Gbase::AUTH_SERVICE_NAME;
-$user = "sample.user@gmail.com";
-$pass = "pa$$w0rd";
-
-// Create an authenticated HTTP client
-$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service);
-
-// Create an instance of the Base service
-$service = new Zend_Gdata_Gbase($client);
-]]></programlisting>
-
-            <para>
-                A Base service using AuthSub can be created in a similar, though slightly more
-                lengthy fashion:
-            </para>
-
-            <programlisting language="php"><![CDATA[
-/*
- * Retrieve the current URL so that the AuthSub server knows where to
- * redirect the user after authentication is complete.
- */
-function getCurrentUrl()
-{
-    global $_SERVER;
-
-    // Filter php_self to avoid a security vulnerability.
-    $php_request_uri =
-        htmlentities(substr($_SERVER['REQUEST_URI'],
-                            0,
-                            strcspn($_SERVER['REQUEST_URI'], "\n\r")),
-                     ENT_QUOTES);
-
-    if (isset($_SERVER['HTTPS']) &&
-        strtolower($_SERVER['HTTPS']) == 'on') {
-        $protocol = 'https://';
-    } else {
-        $protocol = 'http://';
-    }
-    $host = $_SERVER['HTTP_HOST'];
-    if ($_SERVER['HTTP_PORT'] != '' &&
-        (($protocol == 'http://' && $_SERVER['HTTP_PORT'] != '80') ||
-        ($protocol == 'https://' && $_SERVER['HTTP_PORT'] != '443'))) {
-        $port = ':' . $_SERVER['HTTP_PORT'];
-    } else {
-        $port = '';
-    }
-    return $protocol . $host . $port . $php_request_uri;
-}
-
-/**
- * Obtain an AuthSub authenticated HTTP client, redirecting the user
- * to the AuthSub server to login if necessary.
- */
-function getAuthSubHttpClient()
-{
-    global $_SESSION, $_GET;
-
-    // If there is no AuthSub session or one-time token waiting for us,
-    // redirect the user to the AuthSub server to get one.
-    if (!isset($_SESSION['sessionToken']) && !isset($_GET['token'])) {
-        // Parameters to give to AuthSub server
-        $next = getCurrentUrl();
-        $scope = "http://www.google.com/base/feeds/items/";
-        $secure = false;
-        $session = true;
-
-        // Redirect the user to the AuthSub server to sign in
-
-        $authSubUrl = Zend_Gdata_AuthSub::getAuthSubTokenUri($next,
-                                                             $scope,
-                                                             $secure,
-                                                             $session);
-         header("HTTP/1.0 307 Temporary redirect");
-
-         header("Location: " . $authSubUrl);
-
-         exit();
-    }
-
-    // Convert an AuthSub one-time token into a session token if needed
-    if (!isset($_SESSION['sessionToken']) && isset($_GET['token'])) {
-        $_SESSION['sessionToken'] =
-            Zend_Gdata_AuthSub::getAuthSubSessionToken($_GET['token']);
-    }
-
-    // At this point we are authenticated via AuthSub and can obtain an
-    // authenticated HTTP client instance
-
-    // Create an authenticated HTTP client
-    $client = Zend_Gdata_AuthSub::getHttpClient($_SESSION['sessionToken']);
-    return $client;
-}
-
-// -> Script execution begins here <-
-
-// Make sure http://code.google.com/apis/gdata/reference.html#Queriesthat
-// the user has a valid session, so we can record the
-// AuthSub session token once it is available.
-session_start();
-
-// Create an instance of the Base service, redirecting the user
-// to the AuthSub server if necessary.
-$service = new Zend_Gdata_Gbase(getAuthSubHttpClient());
-]]></programlisting>
-
-            <para>
-                Finally, an unauthenticated server can be created for use with snippets feeds:
-            </para>
-
-            <programlisting language="php"><![CDATA[
-// Create an instance of the Base service using an unauthenticated HTTP client
-$service = new Zend_Gdata_Gbase();
-]]></programlisting>
-        </sect3>
-    </sect2>
-
-    <sect2 id="zend.gdata.gbase.retrieve">
-        <title>Retrieve Items</title>
-
-        <para>
-            You can query customer items feed or snippets feed to retrieve items. It involves two
-            steps, sending a query and iterating through the returned feed.
-        </para>
-
-        <sect3 id="zend.gdata.gbase.retrieve.query">
-            <title>Send a Structured Query</title>
-
-            <para>
-                You can send a structured query to retrieve items from your own customer items feed
-                or from the public snippets feed.
-            </para>
-
-            <para>
-                When retrieving items using the Base <acronym>API</acronym>, specially constructed
-                query <acronym>URL</acronym>s are used to describe what events should be returned.
-                The <classname>Zend_Gdata_Gbase_ItemQuery</classname> and
-                <classname>Zend_Gdata_Gbase_SnippetQuery</classname> classes simplify this task by
-                automatically constructing a query <acronym>URL</acronym> based on provided
-                parameters.
-            </para>
-
-            <sect4 id="zend.gdata.gbase.retrieve.query.customeritems">
-                <title>Query Customer Items Feed</title>
-
-                <para>
-                    To execute a query against the customer items feed, invoke
-                    <methodname>newItemQuery()</methodname> and
-                    <methodname>getGbaseItemFeed()</methodname> methods:
-                </para>
-
-                <programlisting language="php"><![CDATA[
-$service = new Zend_Gdata_Gbase($client);
-$query = $service->newItemQuery();
-$query->setBq('[title:Programming]');
-$query->setOrderBy('modification_time');
-$query->setSortOrder('descending');
-$query->setMaxResults('5');
-$feed = $service->getGbaseItemFeed($query);
-]]></programlisting>
-
-                <para>
-                    A full list of these parameters is available at the <ulink
-                        url="http://code.google.com/apis/base/items-feed.html#QueParameters">Query
-                        parameters section</ulink> of the Customer Items Feed documentation.
-                </para>
-            </sect4>
-
-            <sect4 id="zend.gdata.gbase.retrieve.query.snippets">
-                <title>Query Snippets Feed</title>
-
-                <para>
-                    To execute a query against the public snippets feed, invoke
-                    <methodname>newSnippetQuery()</methodname> and
-                    <methodname>getGbaseSnippetFeed()</methodname> methods:
-                </para>
-
-                <programlisting language="php"><![CDATA[
-$service = new Zend_Gdata_Gbase();
-$query = $service->newSnippetQuery();
-$query->setBq('[title:Programming]');
-$query->setOrderBy('modification_time');
-$query->setSortOrder('descending');
-$query->setMaxResults('5');
-$feed = $service->getGbaseSnippetFeed($query);
-]]></programlisting>
-
-                <para>
-                    A full list of these parameters is available at the <ulink
-                        url="http://code.google.com/apis/base/snippets-feed.html#Parameters">Query
-                        parameters section</ulink> of the Snippets Feed documentation.
-                </para>
-            </sect4>
-        </sect3>
-
-        <sect3 id="zend.gdata.gbase.retrieve.iterate">
-            <title>Iterate through the Items</title>
-
-            <para>
-                Google Base items can contain item-specific attributes such as
-                <emphasis>&lt;g:main_ingredient&gt;</emphasis> and <emphasis>&lt;g:weight&gt;</emphasis>.
-            </para>
-
-            <para>
-                To iterate through all attributes of a given item, invoke
-                <methodname>getGbaseAttributes()</methodname> and iterate through the results:
-            </para>
-
-            <programlisting language="php"><![CDATA[
-foreach ($feed->entries as $entry) {
-  // Get all attributes and print out the name and text value of each
-  // attribute
-  $baseAttributes = $entry->getGbaseAttributes();
-  foreach ($baseAttributes as $attr) {
-    echo "Attribute " . $attr->name . " : " . $attr->text . "<br>";
-  }
-}
-]]></programlisting>
-
-            <para>
-                Or, you can look for specific attribute name and iterate through the results that
-                match:
-            </para>
-
-            <programlisting language="php"><![CDATA[
-foreach ($feed->entries as $entry) {
-  // Print all main ingredients <g:main_ingredient>
-  $baseAttributes = $entry->getGbaseAttribute("main_ingredient");
-  foreach ($baseAttributes as $attr) {
-    echo "Main ingredient: " . $attr->text . "<br>";
-  }
-}
-]]></programlisting>
-        </sect3>
-    </sect2>
-
-    <sect2 id="zend.gdata.gbase.crud">
-        <title>Insert, Update, and Delete Customer Items</title>
-
-        <para>
-            A customer/owner can access his own Customer Items feed to insert, update, or delete
-            their items. These operations do not apply to the public snippets feed.
-        </para>
-
-        <para>
-            You can test a feed operation before it is actually executed by setting the dry-run flag
-            (<varname>$dryRun</varname>) to <constant>TRUE</constant>. Once you are sure that you
-            want to submit the data, set it to <constant>FALSE</constant> to execute the operation.
-        </para>
-
-        <sect3 id="zend.gdata.gbase.crud.insert">
-            <title>Insert an Item</title>
-
-            <para>
-                Items can be added by using the <methodname>insertGbaseItem()</methodname> method
-                for the Base service:
-            </para>
-
-            <programlisting language="php"><![CDATA[
-$service = new Zend_Gdata_Gbase($client);
-$newEntry = $service->newItemEntry();
-
-// Add title
-$title = "PHP Developer Handbook";
-$newEntry->title = $service->newTitle(trim($title));
-
-// Add some content
-$content = "Essential handbook for PHP developers.";
-$newEntry->content = $service->newContent($content);
-$newEntry->content->type = 'text';
-
-// Define product type
-$itemType = "Products";
-$newEntry->itemType = $itemType;
-
-// Add item specific attributes
-$newEntry->addGbaseAttribute("product_type", "book", "text");
-$newEntry->addGbaseAttribute("price", "12.99 USD", "floatUnit");
-$newEntry->addGbaseAttribute("quantity", "10", "int");
-$newEntry->addGbaseAttribute("weight", "2.2 lbs", "numberUnit");
-$newEntry->addGbaseAttribute("condition", "New", "text");
-$newEntry->addGbaseAttribute("author", "John Doe", "text");
-$newEntry->addGbaseAttribute("edition", "First Edition", "text");
-$newEntry->addGbaseAttribute("pages", "253", "number");
-$newEntry->addGbaseAttribute("publisher", "My Press", "text");
-$newEntry->addGbaseAttribute("year", "2007", "number");
-$newEntry->addGbaseAttribute("payment_accepted", "Google Checkout", "text");
-
-$dryRun = true;
-$createdEntry = $service->insertGbaseItem($newEntry, $dryRun);
-]]></programlisting>
-        </sect3>
-
-        <sect3 id="zend.gdata.gbase.crud.modify">
-            <title>Modify an Item</title>
-
-            <para>
-                You can update each attribute element of an item as you iterate through them:
-            </para>
-
-            <programlisting language="php"><![CDATA[
-// Update the title
-$newTitle = "PHP Developer Handbook Second Edition";
-$entry->title = $service->newTitle($newTitle);
-
-// Find <g:price> attribute and update the price
-$baseAttributes = $entry->getGbaseAttribute("price");
-if (is_object($baseAttributes[0])) {
-  $newPrice = "16.99 USD";
-  $baseAttributes[0]->text = $newPrice;
-}
-
-// Find <g:pages> attribute and update the number of pages
-$baseAttributes = $entry->getGbaseAttribute("pages");
-if (is_object($baseAttributes[0])) {
-  $newPages = "278";
-  $baseAttributes[0]->text = $newPages;
-
-  // Update the attribute type from "number" to "int"
-  if ($baseAttributes[0]->type == "number") {
-    $newType = "int";
-    $baseAttributes[0]->type = $newType;
-  }
-}
-
-// Remove <g:label> attributes
-$baseAttributes = $entry->getGbaseAttribute("label");
-foreach ($baseAttributes as $note) {
-  $entry->removeGbaseAttribute($note);
-}
-
-// Add new attributes
-$entry->addGbaseAttribute("note", "PHP 5", "text");
-$entry->addGbaseAttribute("note", "Web Programming", "text");
-
-// Save the changes by invoking save() on the entry object itself
-$dryRun = true;
-$entry->save($dryRun);
-
-// Or, save the changes by calling updateGbaseItem() on the service object
-// $dryRun = true;
-// $service->updateGbaseItem($entry, $dryRun);
-]]></programlisting>
-
-            <para>
-                After making the changes, either invoke <methodname>save($dryRun)</methodname>
-                method on the <classname>Zend_Gdata_Gbase_ItemEntry</classname> object or call
-                <methodname>updateGbaseItem($entry, $dryRun)</methodname> method on the
-                <classname>Zend_Gdata_Gbase</classname> object to save the changes.
-            </para>
-        </sect3>
-
-        <sect3 id="zend.gdata.gbase.crud.delete">
-            <title>Delete an Item</title>
-
-            <para>
-                You can remove an item by calling <methodname>deleteGbaseItem()</methodname> method:
-            </para>
-
-            <programlisting language="php"><![CDATA[
-$dryRun = false;
-$service->deleteGbaseItem($entry, $dryRun);
-]]></programlisting>
-
-            <para>
-                Alternatively, you can invoke <methodname>delete()</methodname> on the
-                <classname>Zend_Gdata_Gbase_ItemEntry</classname> object:
-            </para>
-
-            <programlisting language="php"><![CDATA[
-$dryRun = false;
-$entry->delete($dryRun);
-]]></programlisting>
-        </sect3>
-    </sect2>
-</sect1>

+ 0 - 7
documentation/manual/ja/module_specs/Zend_Gdata-Introduction.xml

@@ -59,13 +59,6 @@
             </listitem>
             <listitem>
                 <para>
-                    <link linkend="zend.gdata.gbase">Google Base</link>
-                    は、Google Base のアイテムを取得したり
-                    アイテムを投稿、更新、あるいは削除したりできます。
-                </para>
-            </listitem>
-            <listitem>
-                <para>
                     <link linkend="zend.gdata.youtube">YouTube</link>
                     は、動画やコメント、お気に入り、登録チャンネル、
                     ユーザのプロファイルといった情報を検索して取得できます。

+ 0 - 449
documentation/manual/ja/module_specs/Zend_Gdata_Gbase.xml

@@ -1,449 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Reviewed: no -->
-<!-- EN-Revision: 24249 -->
-<sect1 id="zend.gdata.gbase">
-    <title>Google Base の使用法</title>
-    <para>
-        Google Base データ <acronym>API</acronym> は、開発者が以下のことを行えるように設計されています。
-        <itemizedlist>
-            <listitem>
-                <para>
-                    Google Base のデータに対して問い合わせを行うアプリケーションやマッシュアップを作成する
-                </para>
-                </listitem>
-            <listitem>
-                <para>
-                    Google Base のアイテムをプログラム上で登録したり管理したりする
-                </para>
-            </listitem>
-        </itemizedlist>
-    </para>
-    <para>
-        アイテムのフィードには二種類があります。snippets フィードと customer items フィードです。
-        snippets フィードにはすべての Google Base のデータが含まれ、
-        認証なしで誰でも問い合わせることができます。
-        customer items フィードは特定の顧客に特化したデータの一部で、
-        そのカスタマー/オーナーだけがフィードにアクセスしてデータを追加、更新、削除できます。
-        どちらのフィードに対しても、クエリの作成方法は同じです。
-    </para>
-    <para>
-        Google Base <acronym>API</acronym> についての詳細は
-        <ulink url="http://code.google.com/apis/base/">http://code.google.com/apis/base</ulink>
-        を参照ください。
-    </para>
-    <sect2 id="zend.gdata.gbase.connect">
-        <title>Base サービスへの接続</title>
-        <para>
-            Google Base <acronym>API</acronym> は、他の GData <acronym>API</acronym> と同様に Atom Publishing Protocol (APP)
-            を使用しています。これは、ウェブベースのリソースを扱うための
-            XML 形式のフォーマットです。クライアントと Booble Base サーバとの間は
-            <acronym>HTTP</acronym> による通信を行い、認証済みの接続と未認証の接続の両方に対応しています。
-        </para>
-        <para>
-            トランザクションを実行するには、まずこの接続を作成する必要があります。
-            Base サーバへの接続を作成するには、次の二段階の手順を踏みます。
-            まずは <acronym>HTTP</acronym> クライアントを作成し、それから <classname>Zend_Gdata_Gbase</classname>
-            サービスのインスタンスをそのクライアントにバインドします。
-        </para>
-        <sect3 id="zend.gdata.gbase.connect.authentication">
-            <title>認証</title>
-            <para>
-                Google Base <acronym>API</acronym> は、公開 (public) フィードと非公開 (private)
-                フィードの両方にアクセスできます。
-                公開フィードへのアクセスには認証は不要です。
-                しかし読み込み専用のアクセスとなり、機能も制限されます。
-                非公開フィードに対してはほぼすべての機能を使用できますが、
-                Base サーバに対する認証済みの接続が必要となります。
-                Google Base がサポートする認証方式には三種類あります。
-            </para>
-            <itemizedlist>
-                <listitem>
-                    <para>
-                        <firstterm>ClientAuth</firstterm>
-                        は、ユーザ名/パスワードによる認証を Base サーバに対して直接行います。
-                        この方式では、アプリケーションが直接パスワードを扱う必要があります。
-                        したがって、この認証方式を使うのは、他の方式が使えない場合のみにしましょう。
-                    </para>
-                </listitem>
-                <listitem>
-                    <para>
-                        <firstterm>AuthSub</firstterm>
-                        は、Google プロキシサーバを経由した認証を行います。
-                        ClientAuth と同じくらい簡単に使用でき、セキュリティのリスクもありません。
-                        ウェブベースのアプリケーションでは、これが最も望ましい方式です。
-                    </para>
-                </listitem>
-            </itemizedlist>
-            <para>
-                <classname>Zend_Gdata</classname> ライブラリは、これら三種類の認証方式にすべて対応しています。
-                本章のこれ以降では、読者が認証方式についてよく知っていること、
-                そして認証済み接続の作成方法を知っていることを前提として説明を進めます。
-                詳細な情報は、<link linkend="zend.gdata.introduction.authentication">認証セクション</link>
-                あるいは
-                <ulink url="http://code.google.com/apis/gdata/auth.html">Google Data <acronym>API</acronym> Developer's Guide
-                の Authentication Overview</ulink>
-                を参照ください。
-            </para>
-        </sect3>
-        <sect3 id="zend.gdata.gbase.connect.service">
-            <title>サービスのインスタンスの作成</title>
-            <para>
-                Google Base に対する作業を行うために
-                <classname>Zend_Gdata_Gbase</classname> サービスクラスが用意されています。
-                このクラスは Google Data および Atom Publishing Protocol
-                に対する共通のインターフェイスを提供し、
-                Base サーバとの間のリクエストのやりとりを支援します。
-            </para>
-            <para>
-                使用する認証方式が決まったら、次に行うのは
-                <classname>Zend_Gdata_Gbase</classname> のインスタンスを作成することです。
-                このクラスの引数には <classname>Zend_Http_Client</classname>
-                のインスタンスを指定します。これが AuthSub および ClientAuth
-                認証へのインターフェイスとなる認証済みの <acronym>HTTP</acronym> クライアントです。
-                引数を省略した場合は、未認証の
-                <classname>Zend_Http_Client</classname> のインスタンスを自動的に作成します。
-            </para>
-            <para>
-                以下の例は、ClientAuth 認証を使用した Base サービスクラスを作成するものです。
-            </para>
-            <programlisting language="php"><![CDATA[
-// ClientAuth 認証用のパラメータ
-$service = Zend_Gdata_Gbase::AUTH_SERVICE_NAME;
-$user = "sample.user@gmail.com";
-$pass = "pa$$w0rd";
-
-// 認証済み HTTP クライアントを作成します
-$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service);
-
-// Base サービスのインスタンスを作成します
-$service = new Zend_Gdata_Gbase($client);
-]]></programlisting>
-<para>AuthSub を使用した Base サービスの作成方法も同様ですが、少し冗長になります。</para>
-<programlisting language="php"><![CDATA[
-/*
- * 現在の URL を取得し、AuthSub サーバが認証完了後に
- * リダイレクトする先を取得できるようにします
- */
-function getCurrentUrl()
-{
-    global $_SERVER;
-
-    // php_self をフィルタリングし、セキュリティ脆弱性を避けます
-    $php_request_uri =
-        htmlentities(substr($_SERVER['REQUEST_URI'],
-                            0,
-                            strcspn($_SERVER['REQUEST_URI'], "\n\r")),
-                     ENT_QUOTES);
-
-    if (isset($_SERVER['HTTPS']) &&
-        strtolower($_SERVER['HTTPS']) == 'on') {
-        $protocol = 'https://';
-    } else {
-        $protocol = 'http://';
-    }
-    $host = $_SERVER['HTTP_HOST'];
-    if ($_SERVER['HTTP_PORT'] != '' &&
-        (($protocol == 'http://' && $_SERVER['HTTP_PORT'] != '80') ||
-        ($protocol == 'https://' && $_SERVER['HTTP_PORT'] != '443'))) {
-        $port = ':' . $_SERVER['HTTP_PORT'];
-    } else {
-        $port = '';
-    }
-    return $protocol . $host . $port . $php_request_uri;
-}
-
-/**
- * AuthSub 認証済みの HTTP を取得し、必要に応じて
- * AuthSub サーバにリダイレクトします
- */
-function getAuthSubHttpClient()
-{
-    global $_SESSION, $_GET;
-
-    // AuthSub セッションやワンタイムトークンがない場合は、
-    // ユーザを AuthSub サーバにリダイレクトしてそれを取得させます
-    if (!isset($_SESSION['sessionToken']) && !isset($_GET['token'])) {
-        // AuthSub サーバに渡すパラメータ
-        $next = getCurrentUrl();
-        $scope = "http://www.google.com/base/feeds/items/";
-        $secure = false;
-        $session = true;
-
-        // ユーザを AuthSub サーバにリダイレクトし、サインインさせます
-
-        $authSubUrl = Zend_Gdata_AuthSub::getAuthSubTokenUri($next,
-                                                             $scope,
-                                                             $secure,
-                                                             $session);
-         header("HTTP/1.0 307 Temporary redirect");
-
-         header("Location: " . $authSubUrl);
-
-         exit();
-    }
-
-    // AuthSub ワンタイムトークンを、必要に応じてセッションに変換します
-    if (!isset($_SESSION['sessionToken']) && isset($_GET['token'])) {
-        $_SESSION['sessionToken'] =
-            Zend_Gdata_AuthSub::getAuthSubSessionToken($_GET['token']);
-    }
-
-    // この時点で AuthSub による認証がすんでおり、
-    // 認証済みの HTTP クライアントのインスタンスを取得できます
-
-    // 認証済みの HTTP クライアントを作成します
-    $client = Zend_Gdata_AuthSub::getHttpClient($_SESSION['sessionToken']);
-    return $client;
-}
-
-// -> スクリプトの実行はここから始まります <-
-
-// http://code.google.com/apis/gdata/reference.html#Queriesthat
-// より、ユーザは正規のセッションを保持しています。そこで
-// AuthSub セッショントークンを保存します
-session_start();
-
-// Base サービスのインスタンスを作成し、必要に応じて
-// AuthSub サーバにリダイレクトします
-$service = new Zend_Gdata_Gbase(getAuthSubHttpClient());
-]]></programlisting>
-
-            <para>最後に、snippets フィード用の未認証のサーバを作成する方法を示します。</para>
-
-            <programlisting language="php"><![CDATA[
-// Base サービスのインスタンスを、未認証の HTTP クライアントで作成します
-$service = new Zend_Gdata_Gbase();
-]]></programlisting>
-
-        </sect3>
-    </sect2>
-    <sect2 id="zend.gdata.gbase.retrieve">
-        <title>アイテムの取得</title>
-        <para>
-            customer items フィードや snippets フィードに問い合わせて、
-            アイテムを取得できます。
-            これは、まずクエリを送信して
-            返ってきたフィードを順に取得するという二段階の手順で行います。
-        </para>
-        <sect3 id="zend.gdata.gbase.retrieve.query">
-            <title>構造化クエリの送信</title>
-            <para>
-                構造化クエリを送信することで、あなた自身の customer items
-                フィードや公開 snippets フィードの内容を問い合わせることができます。
-            </para>
-            <para>
-                Base <acronym>API</acronym> でデータを取得する際には、特別な構造のクエリ <acronym>URL</acronym>
-                を使用してどんなイベントがほしいのかを指定します。
-                <classname>Zend_Gdata_Gbase_ItemQuery</classname> および
-                <classname>Zend_Gdata_Gbase_SnippetQuery</classname>
-                クラスのおかげで、この作業が簡単にできるようになります。
-                パラメータを指定すると、これらのクラスがクエリ URL を作成してくれるのです。
-            </para>
-            <sect4 id="zend.gdata.gbase.retrieve.query.customeritems">
-                <title>Customer Items フィードに対する問い合わせ</title>
-                <para>
-                    customer items フィードに対するクエリを実行するには
-                    <methodname>newItemQuery()</methodname> メソッドおよび <methodname>getGbaseItemFeed()</methodname>
-                    メソッドを実行します。
-                </para>
-                <programlisting language="php"><![CDATA[
-$service = new Zend_Gdata_Gbase($client);
-$query = $service->newItemQuery();
-$query->setBq('[title:Programming]');
-$query->setOrderBy('modification_time');
-$query->setSortOrder('descending');
-$query->setMaxResults('5');
-$feed = $service->getGbaseItemFeed($query);
-]]></programlisting>
-                <para>
-                    使用できるパラメータの一覧は、Customer Items フィードのドキュメントにある
-                    <ulink url="http://code.google.com/apis/base/items-feed.html#QueParameters">
-                    クエリパラメータのセクション</ulink> を参照ください。
-                </para>
-            </sect4>
-            <sect4 id="zend.gdata.gbase.retrieve.query.snippets">
-                <title>Snippets フィードに対する問い合わせ</title>
-                <para>
-                    公開 snippets フィードに対するクエリを実行するには
-                    <methodname>newSnippetQuery()</methodname> メソッドおよび
-                    <methodname>getGbaseSnippetFeed()</methodname> メソッドを実行します。
-                </para>
-                <programlisting language="php"><![CDATA[
-$service = new Zend_Gdata_Gbase();
-$query = $service->newSnippetQuery();
-$query->setBq('[title:Programming]');
-$query->setOrderBy('modification_time');
-$query->setSortOrder('descending');
-$query->setMaxResults('5');
-$feed = $service->getGbaseSnippetFeed($query);
-]]></programlisting>
-                <para>
-                    使用できるパラメータの一覧は、Snippets フィードのドキュメントにある
-                    <ulink url="http://code.google.com/apis/base/snippets-feed.html#Parameters">
-                    クエリパラメータのセクション</ulink> を参照ください。
-                </para>
-            </sect4>
-        </sect3>
-        <sect3 id="zend.gdata.gbase.retrieve.iterate">
-            <title>アイテムに対する順次処理</title>
-            <para>
-                Google Base のアイテムには、<emphasis>&lt;g:main_ingredient&gt;</emphasis>
-                や <emphasis>&lt;g:weight&gt;</emphasis> といったアイテム固有の属性が含まれています。
-            </para>
-            <para>
-                指定したアイテムのすべての属性を順に処理するには、
-                <methodname>getGbaseAttributes()</methodname> を実行してその結果を処理します。
-            </para>
-            <programlisting language="php"><![CDATA[
-foreach ($feed->entries as $entry) {
-  // すべての属性を取得し、各属性について名前とテキスト値を表示します
-  $baseAttributes = $entry->getGbaseAttributes();
-  foreach ($baseAttributes as $attr) {
-    echo "属性 " . $attr->name . " : " . $attr->text . "<br>";
-  }
-}
-]]></programlisting>
-            <para>
-                あるいは、特定の属性の名前を指定してそれにマッチする結果を取得することもできます。
-            </para>
-            <programlisting language="php"><![CDATA[
-foreach ($feed->entries as $entry) {
-  // すべての主原料 <g:main_ingredient> を表示します
-  $baseAttributes = $entry->getGbaseAttribute("main_ingredient");
-  foreach ($baseAttributes as $attr) {
-    echo "主原料: " . $attr->text . "<br>";
-  }
-}
-]]></programlisting>
-        </sect3>
-    </sect2>
-    <sect2 id="zend.gdata.gbase.crud">
-        <title>Customer Items の追加、更新、削除</title>
-        <para>
-            カスタマー/オーナーは、自分自身の Customer Items
-            フィードに対する追加、更新あるいは削除を行うことができます。
-            これらの操作は、公開 snippets フィードに対して行うことはできません。
-        </para>
-        <para>
-            実際に処理を行う前に、どのような操作が行われるのかを確かめることができます。
-            その場合は dry-run フラグ (<code>$dryRun</code>) を <constant>TRUE</constant>
-            に設定します。期待通りの結果が得られることを確認したら、このフラグを
-            <constant>FALSE</constant> にして実際の操作を行います。
-        </para>
-        <sect3 id="zend.gdata.gbase.crud.insert">
-            <title>アイテムの追加</title>
-            <para>
-                アイテムを追加するには、Base サービスの
-                <methodname>insertGbaseItem()</methodname> メソッドを使用します。
-            </para>
-            <programlisting language="php"><![CDATA[
-$service = new Zend_Gdata_Gbase($client);
-$newEntry = $service->newItemEntry();
-
-// タイトルを追加します
-$title = "PHP Developer Handbook";
-$newEntry->title = $service->newTitle(trim($title));
-
-// コンテンツを追加します
-$content = "Essential handbook for PHP developers.";
-$newEntry->content = $service->newContent($content);
-$newEntry->content->type = 'text';
-
-// 製品の型を定義します
-$itemType = "Products";
-$newEntry->itemType = $itemType;
-
-// アイテム固有の属性を追加します
-$newEntry->addGbaseAttribute("product_type", "book", "text");
-$newEntry->addGbaseAttribute("price", "12.99 USD", "floatUnit");
-$newEntry->addGbaseAttribute("quantity", "10", "int");
-$newEntry->addGbaseAttribute("weight", "2.2 lbs", "numberUnit");
-$newEntry->addGbaseAttribute("condition", "New", "text");
-$newEntry->addGbaseAttribute("author", "John Doe", "text");
-$newEntry->addGbaseAttribute("edition", "First Edition", "text");
-$newEntry->addGbaseAttribute("pages", "253", "number");
-$newEntry->addGbaseAttribute("publisher", "My Press", "text");
-$newEntry->addGbaseAttribute("year", "2007", "number");
-$newEntry->addGbaseAttribute("payment_accepted", "Google Checkout", "text");
-
-$dryRun = true;
-$createdEntry = $service->insertGbaseItem($newEntry, $dryRun);
-]]></programlisting>
-        </sect3>
-        <sect3 id="zend.gdata.gbase.crud.modify">
-            <title>アイテムの変更</title>
-            <para>
-                アイテムの各属性要素の値を変更できます。
-            </para>
-            <programlisting language="php"><![CDATA[
-// タイトルを更新します
-$newTitle = "PHP Developer Handbook Second Edition";
-$entry->title = $service->newTitle($newTitle);
-
-// <g:price> 属性を探し、価格を更新します
-$baseAttributes = $entry->getGbaseAttribute("price");
-if (is_object($baseAttributes[0])) {
-  $newPrice = "16.99 USD";
-  $baseAttributes[0]->text = $newPrice;
-}
-
-// <g:pages> 属性を探し、ページ数を更新します
-$baseAttributes = $entry->getGbaseAttribute("pages");
-if (is_object($baseAttributes[0])) {
-  $newPages = "278";
-  $baseAttributes[0]->text = $newPages;
-
-  // 属性の型を "number" から "int" に変更します
-  if ($baseAttributes[0]->type == "number") {
-    $newType = "int";
-    $baseAttributes[0]->type = $newType;
-  }
-}
-
-// <g:label> 属性を削除します
-$baseAttributes = $entry->getGbaseAttribute("label");
-foreach ($baseAttributes as $note) {
-  $entry->removeGbaseAttribute($note);
-}
-
-// 新たな属性を追加します
-$entry->addGbaseAttribute("note", "PHP 5", "text");
-$entry->addGbaseAttribute("note", "Web Programming", "text");
-
-// エントリオブジェクトの save() を実行して変更内容を保存します
-$dryRun = true;
-$entry->save($dryRun);
-
-// あるいは、サービスオブジェクトの updateGbaseItem() をコールして変更を保存します
-// $dryRun = true;
-// $service->updateGbaseItem($entry, $dryRun);
-]]></programlisting>
-            <para>
-                変更した後は、<classname>Zend_Gdata_Gbase_ItemEntry</classname>
-                オブジェクトの <methodname>save($dryRun)</methodname> メソッドを実行するか
-                <classname>Zend_Gdata_Gbase</classname> オブジェクトの
-                <methodname>updateGbaseItem($entry, $dryRun)</methodname>
-                メソッドをコールしてその内容を保存する必要があります。
-            </para>
-        </sect3>
-        <sect3 id="zend.gdata.gbase.crud.delete">
-            <title>アイテムの削除</title>
-            <para>
-                アイテムを削除するには、<methodname>deleteGbaseItem()</methodname>
-                メソッドをコールします。
-            </para>
-            <programlisting language="php"><![CDATA[
-$dryRun = false;
-$service->deleteGbaseItem($entry, $dryRun);
-]]></programlisting>
-            <para>
-                あるいは、<classname>Zend_Gdata_Gbase_ItemEntry</classname> オブジェクトの
-                <methodname>delete()</methodname> を実行することもできます。
-            </para>
-            <programlisting language="php"><![CDATA[
-$dryRun = false;
-$entry->delete($dryRun);
-]]></programlisting>
-        </sect3>
-    </sect2>
-</sect1>

+ 9 - 140
library/Zend/Gdata/Gbase.php

@@ -22,29 +22,14 @@
  */
 
 /**
- * @see Zend_Gdata
- */
-require_once 'Zend/Gdata.php';
-
-/**
- * @see Zend_Gdata_Gbase_ItemFeed
- */
-require_once 'Zend/Gdata/Gbase/ItemFeed.php';
-
-/**
- * @see Zend_Gdata_Gbase_ItemEntry
+ * @see Zend_Exception
  */
-require_once 'Zend/Gdata/Gbase/ItemEntry.php';
+require_once 'Zend/Exception.php';
 
 /**
- * @see Zend_Gdata_Gbase_SnippetEntry
- */
-require_once 'Zend/Gdata/Gbase/SnippetEntry.php';
-
-/**
- * @see Zend_Gdata_Gbase_SnippetFeed
+ * @see Zend_Gdata
  */
-require_once 'Zend/Gdata/Gbase/SnippetFeed.php';
+require_once 'Zend/Gdata.php';
 
 /**
  * Service class for interacting with the Google Base data API
@@ -76,23 +61,6 @@ class Zend_Gdata_Gbase extends Zend_Gdata
     const AUTH_SERVICE_NAME = 'gbase';
 
     /**
-     * The default URI for POST methods
-     *
-     * @var string
-     */
-    protected $_defaultPostUri = self::GBASE_ITEM_FEED_URI;
-
-    /**
-     * Namespaces used for Zend_Gdata_Gbase
-     *
-     * @var array
-     */
-    public static $namespaces = array(
-        array('g', 'http://base.google.com/ns/1.0', 1, 0),
-        array('batch', 'http://schemas.google.com/gdata/batch', 1, 0)
-    );
-
-    /**
      * Create Zend_Gdata_Gbase object
      *
      * @param Zend_Http_Client $client (optional) The HTTP client to use when
@@ -101,109 +69,10 @@ class Zend_Gdata_Gbase extends Zend_Gdata
      */
     public function __construct($client = null, $applicationId = 'MyCompany-MyApp-1.0')
     {
-        $this->registerPackage('Zend_Gdata_Gbase');
-        $this->registerPackage('Zend_Gdata_Gbase_Extension');
-        parent::__construct($client, $applicationId);
-        $this->_httpClient->setParameterPost('service', self::AUTH_SERVICE_NAME);
-    }
-
-    /**
-     * Retreive feed object
-     *
-     * @param mixed $location The location for the feed, as a URL or Query
-     * @return Zend_Gdata_Gbase_ItemFeed
-     */
-    public function getGbaseItemFeed($location = null)
-    {
-        if ($location === null) {
-            $uri = self::GBASE_ITEM_FEED_URI;
-        } else if ($location instanceof Zend_Gdata_Query) {
-            $uri = $location->getQueryUrl();
-        } else {
-            $uri = $location;
-        }
-        return parent::getFeed($uri, 'Zend_Gdata_Gbase_ItemFeed');
-    }
-
-    /**
-     * Retreive entry object
-     *
-     * @param mixed $location The location for the feed, as a URL or Query
-     * @return Zend_Gdata_Gbase_ItemEntry
-     */
-    public function getGbaseItemEntry($location = null)
-    {
-        if ($location === null) {
-            require_once 'Zend/Gdata/App/InvalidArgumentException.php';
-            throw new Zend_Gdata_App_InvalidArgumentException(
-                    'Location must not be null');
-        } else if ($location instanceof Zend_Gdata_Query) {
-            $uri = $location->getQueryUrl();
-        } else {
-            $uri = $location;
-        }
-        return parent::getEntry($uri, 'Zend_Gdata_Gbase_ItemEntry');
-    }
-
-    /**
-     * Insert an entry
-     *
-     * @param Zend_Gdata_Gbase_ItemEntry $entry The Base entry to upload
-     * @param boolean $dryRun Flag for the 'dry-run' parameter
-     * @return Zend_Gdata_Gbase_ItemFeed
-     */
-    public function insertGbaseItem($entry, $dryRun = false)
-    {
-        if ($dryRun == false) {
-            $uri = $this->_defaultPostUri;
-        } else {
-            $uri = $this->_defaultPostUri . '?dry-run=true';
-        }
-        $newitem = $this->insertEntry($entry, $uri, 'Zend_Gdata_Gbase_ItemEntry');
-        return $newitem;
-    }
-
-    /**
-     * Update an entry
-     *
-     * @param Zend_Gdata_Gbase_ItemEntry $entry The Base entry to be updated
-     * @param boolean $dryRun Flag for the 'dry-run' parameter
-     * @return Zend_Gdata_Gbase_ItemEntry
-     */
-    public function updateGbaseItem($entry, $dryRun = false)
-    {
-        $returnedEntry = $entry->save($dryRun);
-        return $returnedEntry;
-    }
-
-    /**
-     * Delete an entry
-     *
-     * @param Zend_Gdata_Gbase_ItemEntry $entry The Base entry to remove
-     * @param boolean $dryRun Flag for the 'dry-run' parameter
-     * @return Zend_Gdata_Gbase_ItemFeed
-     */
-    public function deleteGbaseItem($entry, $dryRun = false)
-    {
-        $entry->delete($dryRun);
-        return $this;
-    }
-
-    /**
-     * Retrieve feed object
-     *
-     * @param mixed $location The location for the feed, as a URL or Query
-     * @return Zend_Gdata_Gbase_SnippetFeed
-     */
-    public function getGbaseSnippetFeed($location = null)
-    {
-        if ($location === null) {
-            $uri = self::GBASE_SNIPPET_FEED_URI;
-        } else if ($location instanceof Zend_Gdata_Query) {
-            $uri = $location->getQueryUrl();
-        } else {
-            $uri = $location;
-        }
-        return parent::getFeed($uri, 'Zend_Gdata_Gbase_SnippetFeed');
+        throw new Zend_Exception(
+            'Google Base API has been discontinued by Google and was removed'
+            . ' from Zend Framework in 1.12.0.  For more information see: '
+            . 'http://googlemerchantblog.blogspot.ca/2010/12/new-shopping-apis-and-deprecation-of.html'
+        );
     }
 }

+ 9 - 101
library/Zend/Gdata/Gbase/Entry.php

@@ -22,14 +22,14 @@
  */
 
 /**
- * @see Zend_Gdata_Entry
+ * @see Zend_Exception
  */
-require_once 'Zend/Gdata/Entry.php';
+require_once 'Zend/Exception.php';
 
 /**
- * @see Zend_Gdata_Gbase_Extension_BaseAttribute
+ * @see Zend_Gdata_Entry
  */
-require_once 'Zend/Gdata/Gbase/Extension/BaseAttribute.php';
+require_once 'Zend/Gdata/Entry.php';
 
 /**
  * Base class for working with Google Base entries.
@@ -44,108 +44,16 @@ require_once 'Zend/Gdata/Gbase/Extension/BaseAttribute.php';
  */
 class Zend_Gdata_Gbase_Entry extends Zend_Gdata_Entry
 {
-
-    /**
-     * Name of the base class for Google Base entries
-     *
-     * var @string
-     */
-    protected $_entryClassName = 'Zend_Gdata_Gbase_Entry';
-
-    /**
-     * Google Base attribute elements in the 'g' namespace
-     *
-     * @var array
-     */
-    protected $_baseAttributes = array();
-
     /**
      * Constructs a new Zend_Gdata_Gbase_ItemEntry object.
      * @param DOMElement $element (optional) The DOMElement on which to base this object.
      */
     public function __construct($element = null)
     {
-        $this->registerAllNamespaces(Zend_Gdata_Gbase::$namespaces);
-        parent::__construct($element);
+        throw new Zend_Exception(
+            'Google Base API has been discontinued by Google and was removed'
+            . ' from Zend Framework in 1.12.0.  For more information see: '
+            . 'http://googlemerchantblog.blogspot.ca/2010/12/new-shopping-apis-and-deprecation-of.html'
+        );    
     }
-
-    /**
-     * 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);
-        foreach ($this->_baseAttributes as $baseAttribute) {
-            $element->appendChild($baseAttribute->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;
-
-        if (strstr($absoluteNodeName, $this->lookupNamespace('g') . ':')) {
-            $baseAttribute = new Zend_Gdata_Gbase_Extension_BaseAttribute();
-            $baseAttribute->transferFromDOM($child);
-            $this->_baseAttributes[] = $baseAttribute;
-        } else {
-            parent::takeChildFromDOM($child);
-        }
-    }
-
-    /**
-     * Get the value of the itme_type
-     *
-     * @return Zend_Gdata_Gbase_Extension_ItemType The requested object.
-     */
-    public function getItemType()
-    {
-        $itemType = $this->getGbaseAttribute('item_type');
-        if (is_object($itemType[0])) {
-          return $itemType[0];
-        } else {
-          return null;
-        }
-    }
-
-    /**
-     * Return all the Base attributes
-     * @return Zend_Gdata_Gbase_Extension_BaseAttribute
-     */
-    public function getGbaseAttributes() {
-        return $this->_baseAttributes;
-    }
-
-    /**
-     * Return an array of Base attributes that match the given attribute name
-     *
-     * @param string $name The name of the Base attribute to look for
-     * @return array $matches Array that contains the matching list of Base attributes
-     */
-    public function getGbaseAttribute($name)
-    {
-        $matches = array();
-        for ($i = 0; $i < count($this->_baseAttributes); $i++) {
-            $baseAttribute = $this->_baseAttributes[$i];
-            if ($baseAttribute->rootElement == $name &&
-                $baseAttribute->rootNamespaceURI == $this->lookupNamespace('g')) {
-                $matches[] = &$this->_baseAttributes[$i];
-            }
-        }
-        return $matches;
-    }
-
 }

+ 5 - 66
library/Zend/Gdata/Gbase/Extension/BaseAttribute.php

@@ -36,14 +36,6 @@ require_once 'Zend/Gdata/App/Extension/Element.php';
  */
 class Zend_Gdata_Gbase_Extension_BaseAttribute extends Zend_Gdata_App_Extension_Element
 {
-
-    /**
-     * Namespace for Google Base elements
-     *
-     * var @string
-     */
-    protected $_rootNamespace = 'g';
-
     /**
      * Create a new instance.
      *
@@ -53,63 +45,10 @@ class Zend_Gdata_Gbase_Extension_BaseAttribute extends Zend_Gdata_App_Extension_
      */
     public function __construct($name = null, $text = null, $type = null)
     {
-        $this->registerAllNamespaces(Zend_Gdata_Gbase::$namespaces);
-        if ($type !== null) {
-          $attr = array('name' => 'type', 'value' => $type);
-          $typeAttr = array('type' => $attr);
-          $this->setExtensionAttributes($typeAttr);
-        }
-        parent::__construct($name,
-                            $this->_rootNamespace,
-                            $this->lookupNamespace($this->_rootNamespace),
-                            $text);
-    }
-
-    /**
-     * Get the name of the attribute
-     *
-     * @return attribute name The requested object.
-     */
-    public function getName() {
-      return $this->_rootElement;
-    }
-
-    /**
-     * Get the type of the attribute
-     *
-     * @return attribute type The requested object.
-     */
-    public function getType() {
-      $typeAttr = $this->getExtensionAttributes();
-      return $typeAttr['type']['value'];
-    }
-
-    /**
-     * Set the 'name' of the Base attribute object:
-     *     &lt;g:[$name] type='[$type]'&gt;[$value]&lt;/g:[$name]&gt;
-     *
-     * @param Zend_Gdata_App_Extension_Element $attribute The attribute object
-     * @param string $name The name of the Base attribute
-     * @return Zend_Gdata_Extension_ItemEntry Provides a fluent interface
-     */
-    public function setName($name) {
-      $this->_rootElement = $name;
-      return $this;
+        throw new Zend_Exception(
+            'Google Base API has been discontinued by Google and was removed'
+            . ' from Zend Framework in 1.12.0.  For more information see: '
+            . 'http://googlemerchantblog.blogspot.ca/2010/12/new-shopping-apis-and-deprecation-of.html'
+        );    
     }
-
-    /**
-     * Set the 'type' of the Base attribute object:
-     *     &lt;g:[$name] type='[$type]'&gt;[$value]&lt;/g:[$name]&gt;
-     *
-     * @param Zend_Gdata_App_Extension_Element $attribute The attribute object
-     * @param string $type The type of the Base attribute
-     * @return Zend_Gdata_Extension_ItemEntry Provides a fluent interface
-     */
-    public function setType($type) {
-      $attr = array('name' => 'type', 'value' => $type);
-      $typeAttr = array('type' => $attr);
-      $this->setExtensionAttributes($typeAttr);
-      return $this;
-    }
-
 }

+ 10 - 9
library/Zend/Gdata/Gbase/Feed.php

@@ -22,6 +22,11 @@
  */
 
 /**
+ * @see Zend_Exception
+ */
+require_once 'Zend/Exception.php';
+
+/**
  * @see Zend_Gdata_Feed
  */
 require_once 'Zend/Gdata/Feed.php';
@@ -40,13 +45,6 @@ require_once 'Zend/Gdata/Feed.php';
 class Zend_Gdata_Gbase_Feed extends Zend_Gdata_Feed
 {
     /**
-     * The classname for the feed.
-     *
-     * @var string
-     */
-    protected $_feedClassName = 'Zend_Gdata_Gbase_Feed';
-
-    /**
      * Create a new instance.
      *
      * @param DOMElement $element (optional) DOMElement from which this
@@ -54,7 +52,10 @@ class Zend_Gdata_Gbase_Feed extends Zend_Gdata_Feed
      */
     public function __construct($element = null)
     {
-        $this->registerAllNamespaces(Zend_Gdata_Gbase::$namespaces);
-        parent::__construct($element);
+        throw new Zend_Exception(
+            'Google Base API has been discontinued by Google and was removed'
+            . ' from Zend Framework in 1.12.0.  For more information see: '
+            . 'http://googlemerchantblog.blogspot.ca/2010/12/new-shopping-apis-and-deprecation-of.html'
+        );    
     }
 }

+ 0 - 119
library/Zend/Gdata/Gbase/ItemEntry.php

@@ -39,123 +39,4 @@ require_once 'Zend/Gdata/Gbase/Entry.php';
  */
 class Zend_Gdata_Gbase_ItemEntry extends Zend_Gdata_Gbase_Entry
 {
-    /**
-     * The classname for individual item entry elements.
-     *
-     * @var string
-     */
-    protected $_entryClassName = 'Zend_Gdata_Gbase_ItemEntry';
-
-    /**
-     * Set the value of the itme_type
-     *
-     * @param Zend_Gdata_Gbase_Extension_ItemType $value The desired value for the item_type
-     * @return Zend_Gdata_Gbase_ItemEntry Provides a fluent interface
-     */
-    public function setItemType($value)
-    {
-        $this->addGbaseAttribute('item_type', $value, 'text');
-        return $this;
-    }
-
-    /**
-     * Adds a custom attribute to the entry in the following format:
-     * &lt;g:[$name] type='[$type]'&gt;[$value]&lt;/g:[$name]&gt;
-     *
-     * @param string $name The name of the attribute
-     * @param string $value The text value of the attribute
-     * @param string $type (optional) The type of the attribute.
-     *          e.g.: 'text', 'number', 'floatUnit'
-     * @return Zend_Gdata_Gbase_ItemEntry Provides a fluent interface
-     */
-    public function addGbaseAttribute($name, $text, $type = null) {
-        $newBaseAttribute =  new Zend_Gdata_Gbase_Extension_BaseAttribute($name, $text, $type);
-        $this->_baseAttributes[] = $newBaseAttribute;
-        return $this;
-    }
-
-    /**
-     * Removes a Base attribute from the current list of Base attributes
-     *
-     * @param Zend_Gdata_Gbase_Extension_BaseAttribute $baseAttribute The attribute to be removed
-     * @return Zend_Gdata_Gbase_ItemEntry Provides a fluent interface
-     */
-    public function removeGbaseAttribute($baseAttribute) {
-        $baseAttributes = $this->_baseAttributes;
-        for ($i = 0; $i < count($this->_baseAttributes); $i++) {
-            if ($this->_baseAttributes[$i] == $baseAttribute) {
-                array_splice($baseAttributes, $i, 1);
-                break;
-            }
-        }
-        $this->_baseAttributes = $baseAttributes;
-        return $this;
-    }
-
-    /**
-     * Uploads changes in this entry to the server using Zend_Gdata_App
-     *
-     * @param boolean $dryRun Whether the transaction is dry run or not.
-     * @param string|null $uri The URI to send requests to, or null if $data
-     *        contains the URI.
-     * @param string|null $className The name of the class that should we
-     *        deserializing the server response. If null, then
-     *        'Zend_Gdata_App_Entry' will be used.
-     * @param array $extraHeaders Extra headers to add to the request, as an
-     *        array of string-based key/value pairs.
-     * @return Zend_Gdata_App_Entry The updated entry
-     * @throws Zend_Gdata_App_Exception
-     */
-    public function save($dryRun = false,
-                         $uri = null,
-                         $className = null,
-                         $extraHeaders = array())
-    {
-        if ($dryRun == true) {
-            $editLink = $this->getEditLink();
-            if ($uri == null && $editLink !== null) {
-                $uri = $editLink->getHref() . '?dry-run=true';
-            }
-            if ($uri === null) {
-                require_once 'Zend/Gdata/App/InvalidArgumentException.php';
-                throw new Zend_Gdata_App_InvalidArgumentException('You must specify an URI which needs deleted.');
-            }
-            $service = new Zend_Gdata_App($this->getHttpClient());
-            return $service->updateEntry($this,
-                                         $uri,
-                                         $className,
-                                         $extraHeaders);
-        } else {
-            parent::save($uri, $className, $extraHeaders);
-        }
-    }
-
-    /**
-     * Deletes this entry to the server using the referenced
-     * Zend_Http_Client to do a HTTP DELETE to the edit link stored in this
-     * entry's link collection.
-     *
-     * @param boolean $dyrRun Whether the transaction is dry run or not
-     * @return void
-     * @throws Zend_Gdata_App_Exception
-     */
-    public function delete($dryRun = false)
-    {
-        $uri = null;
-
-        if ($dryRun == true) {
-            $editLink = $this->getEditLink();
-            if ($editLink !== null) {
-                $uri = $editLink->getHref() . '?dry-run=true';
-            }
-            if ($uri === null) {
-                require_once 'Zend/Gdata/App/InvalidArgumentException.php';
-                throw new Zend_Gdata_App_InvalidArgumentException('You must specify an URI which needs deleted.');
-            }
-            parent::delete($uri);
-        } else {
-            parent::delete();
-        }
-    }
-
 }

+ 0 - 6
library/Zend/Gdata/Gbase/ItemFeed.php

@@ -39,10 +39,4 @@ require_once 'Zend/Gdata/Gbase/Feed.php';
  */
 class Zend_Gdata_Gbase_ItemFeed extends Zend_Gdata_Feed
 {
-    /**
-     * The classname for individual item feed elements.
-     *
-     * @var string
-     */
-    protected $_entryClassName = 'Zend_Gdata_Gbase_ItemEntry';
 }

+ 3 - 52
library/Zend/Gdata/Gbase/ItemQuery.php

@@ -22,14 +22,14 @@
  */
 
 /**
- * @see Zend_Gdata_Query
+ * @see Zend_Exception
  */
-require_once('Zend/Gdata/Query.php');
+require_once 'Zend/Exception.php';
 
 /**
  * @see Zend_Gdata_Gbase_Query
  */
-require_once('Zend/Gdata/Gbase/Query.php');
+require_once 'Zend/Gdata/Gbase/Query.php';
 
 
 /**
@@ -49,53 +49,4 @@ class Zend_Gdata_Gbase_ItemQuery extends Zend_Gdata_Gbase_Query
      * Path to the customer items feeds on the Google Base server.
      */
     const GBASE_ITEM_FEED_URI = 'https://www.google.com/base/feeds/items';
-
-    /**
-     * The default URI for POST methods
-     *
-     * @var string
-     */
-    protected $_defaultFeedUri = self::GBASE_ITEM_FEED_URI;
-
-    /**
-     * The id of an item
-     *
-     * @var string
-     */
-    protected $_id = null;
-
-    /**
-     * @param string $value
-     * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface
-     */
-    public function setId($value)
-    {
-        $this->_id = $value;
-        return $this;
-    }
-
-    /*
-     * @return string id
-     */
-    public function getId()
-    {
-        return $this->_id;
-    }
-
-    /**
-     * Returns the query URL generated by this query instance.
-     *
-     * @return string The query URL for this instance.
-     */
-    public function getQueryUrl()
-    {
-        $uri = $this->_defaultFeedUri;
-        if ($this->getId() !== null) {
-            $uri .= '/' . $this->getId();
-        } else {
-            $uri .= $this->getQueryString();
-        }
-        return $uri;
-    }
-
 }

+ 13 - 212
library/Zend/Gdata/Gbase/Query.php

@@ -22,9 +22,14 @@
  */
 
 /**
+ * @see Zend_Exception
+ */
+require_once 'Zend/Exception.php';
+
+/**
  * @see Zend_Gdata_Query
  */
-require_once('Zend/Gdata/Query.php');
+require_once 'Zend/Gdata/Query.php';
 
 /**
  * Assists in constructing queries for Google Base
@@ -51,218 +56,14 @@ class Zend_Gdata_Gbase_Query extends Zend_Gdata_Query
     const GBASE_SNIPPET_FEED_URI = 'https://www.google.com/base/feeds/snippets';
 
     /**
-     * The default URI for POST methods
-     *
-     * @var string
-     */
-    protected $_defaultFeedUri = self::GBASE_ITEM_FEED_URI;
-
-    /**
-     * @param string $value
-     * @return Zend_Gdata_Gbase_Query Provides a fluent interface
-     */
-    public function setKey($value)
-    {
-        if ($value !== null) {
-            $this->_params['key'] = $value;
-        } else {
-            unset($this->_params['key']);
-        }
-        return $this;
-    }
-
-    /**
-     * @param string $value
-     * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface
-     */
-    public function setBq($value)
-    {
-        if ($value !== null) {
-            $this->_params['bq'] = $value;
-        } else {
-            unset($this->_params['bq']);
-        }
-        return $this;
-    }
-
-    /**
-     * @param string $value
-     * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface
-     */
-    public function setRefine($value)
-    {
-        if ($value !== null) {
-            $this->_params['refine'] = $value;
-        } else {
-            unset($this->_params['refine']);
-        }
-        return $this;
-    }
-
-    /**
-     * @param string $value
-     * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface
-     */
-    public function setContent($value)
-    {
-        if ($value !== null) {
-            $this->_params['content'] = $value;
-        } else {
-            unset($this->_params['content']);
-        }
-        return $this;
-    }
-
-    /**
-     * @param string $value
-     * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface
-     */
-    public function setOrderBy($value)
-    {
-        if ($value !== null) {
-            $this->_params['orderby'] = $value;
-        } else {
-            unset($this->_params['orderby']);
-        }
-        return $this;
-    }
-
-    /**
-     * @param string $value
-     * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface
-     */
-    public function setSortOrder($value)
-    {
-        if ($value !== null) {
-            $this->_params['sortorder'] = $value;
-        } else {
-            unset($this->_params['sortorder']);
-        }
-        return $this;
-    }
-
-    /**
-     * @param string $value
-     * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface
-     */
-    public function setCrowdBy($value)
-    {
-        if ($value !== null) {
-            $this->_params['crowdby'] = $value;
-        } else {
-            unset($this->_params['crowdby']);
-        }
-        return $this;
-    }
-
-    /**
-     * @param string $value
-     * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface
+     * Create Gdata_Query object
      */
-    public function setAdjust($value)
+    public function __construct($url = null)
     {
-        if ($value !== null) {
-            $this->_params['adjust'] = $value;
-        } else {
-            unset($this->_params['adjust']);
-        }
-        return $this;
+        throw new Zend_Exception(
+            'Google Base API has been discontinued by Google and was removed'
+            . ' from Zend Framework in 1.12.0.  For more information see: '
+            . 'http://googlemerchantblog.blogspot.ca/2010/12/new-shopping-apis-and-deprecation-of.html'
+        );    
     }
-
-    /**
-     * @return string key
-     */
-    public function getKey()
-    {
-        if (array_key_exists('key', $this->_params)) {
-            return $this->_params['key'];
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * @return string bq
-     */
-    public function getBq()
-    {
-        if (array_key_exists('bq', $this->_params)) {
-            return $this->_params['bq'];
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * @return string refine
-     */
-    public function getRefine()
-    {
-        if (array_key_exists('refine', $this->_params)) {
-            return $this->_params['refine'];
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * @return string content
-     */
-    public function getContent()
-    {
-        if (array_key_exists('content', $this->_params)) {
-            return $this->_params['content'];
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * @return string orderby
-     */
-    public function getOrderBy()
-    {
-        if (array_key_exists('orderby', $this->_params)) {
-            return $this->_params['orderby'];
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * @return string sortorder
-     */
-    public function getSortOrder()
-    {
-        if (array_key_exists('sortorder', $this->_params)) {
-            return $this->_params['sortorder'];
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * @return string crowdby
-     */
-    public function getCrowdBy()
-    {
-        if (array_key_exists('crowdby', $this->_params)) {
-            return $this->_params['crowdby'];
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * @return string adjust
-     */
-    public function getAdjust()
-    {
-        if (array_key_exists('adjust', $this->_params)) {
-            return $this->_params['adjust'];
-        } else {
-            return null;
-        }
-    }
-
 }

+ 0 - 6
library/Zend/Gdata/Gbase/SnippetEntry.php

@@ -39,10 +39,4 @@ require_once 'Zend/Gdata/Gbase/Entry.php';
  */
 class Zend_Gdata_Gbase_SnippetEntry extends Zend_Gdata_Gbase_Entry
 {
-    /**
-     * The classname for individual snippet entry elements.
-     *
-     * @var string
-     */
-    protected $_entryClassName = 'Zend_Gdata_Gbase_SnippetEntry';
 }

+ 7 - 8
library/Zend/Gdata/Gbase/SnippetFeed.php

@@ -22,9 +22,14 @@
  */
 
 /**
- * @see Zend_Gdata_Gbase_Feed
+ * @see Zend_Exception
  */
-require_once 'Zend/Gdata/Gbase/Feed.php';
+require_once 'Zend/Exception.php';
+
+/**
+ * @see Zend_Gdata_Feed
+ */
+require_once 'Zend/Gdata/Feed.php';
 
 /**
  * Represents the Google Base Snippets Feed
@@ -39,10 +44,4 @@ require_once 'Zend/Gdata/Gbase/Feed.php';
  */
 class Zend_Gdata_Gbase_SnippetFeed extends Zend_Gdata_Feed
 {
-    /**
-     * The classname for individual snippet feed elements.
-     *
-     * @var string
-     */
-    protected $_entryClassName = 'Zend_Gdata_Gbase_SnippetEntry';
 }

+ 2 - 30
library/Zend/Gdata/Gbase/SnippetQuery.php

@@ -22,14 +22,9 @@
  */
 
 /**
- * Zend_Gdata_Query
+ * @see Zend_Gdata_Gbase_Query
  */
-require_once('Zend/Gdata/Query.php');
-
-/**
- * Zend_Gdata_Gbase_Query
- */
-require_once('Zend/Gdata/Gbase/Query.php');
+require_once 'Zend/Gdata/Gbase/Query.php';
 
 /**
  * Assists in constructing queries for Google Base Snippets Feed
@@ -48,27 +43,4 @@ class Zend_Gdata_Gbase_SnippetQuery extends Zend_Gdata_Gbase_Query
      * Path to the snippets feeds on the Google Base server.
      */
     const BASE_SNIPPET_FEED_URI = 'https://www.google.com/base/feeds/snippets';
-
-    /**
-     * The default URI for POST methods
-     *
-     * @var string
-     */
-    protected $_defaultFeedUri = self::BASE_SNIPPET_FEED_URI;
-
-    /**
-     * Returns the query URL generated by this query instance.
-     *
-     * @return string The query URL for this instance.
-     */
-    public function getQueryUrl()
-    {
-        $uri = $this->_defaultFeedUri;
-        if ($this->getCategory() !== null) {
-            $uri .= '/-/' . $this->getCategory();
-        }
-        $uri .= $this->getQueryString();
-        return $uri;
-    }
-
 }

+ 0 - 5
tests/TestConfiguration.php.dist

@@ -263,11 +263,6 @@ defined('TESTS_ZEND_GDATA_GAPPS_EMAIL') || define('TESTS_ZEND_GDATA_GAPPS_EMAIL'
 defined('TESTS_ZEND_GDATA_GAPPS_PASSWORD') || define('TESTS_ZEND_GDATA_GAPPS_PASSWORD', 'password');
 
 /*
- * This is the ONLINE_ENABLED property for Google Base.
- */
-defined('TESTS_ZEND_GDATA_GBASE_ONLINE_ENABLED') || define('TESTS_ZEND_GDATA_GBASE_ONLINE_ENABLED', false);
-
-/*
  * This indicates that online tests for the Books Search data API
  * should be performed.
  */

+ 0 - 22
tests/Zend/Gdata/AllTests.php

@@ -73,14 +73,6 @@ require_once 'Zend/Gdata/WhenTest.php';
 require_once 'Zend/Gdata/WhereTest.php';
 require_once 'Zend/Gdata/WhoTest.php';
 
-require_once 'Zend/Gdata/Gbase/ItemEntryTest.php';
-require_once 'Zend/Gdata/Gbase/ItemFeedTest.php';
-require_once 'Zend/Gdata/Gbase/ItemQueryTest.php';
-require_once 'Zend/Gdata/Gbase/SnippetFeedTest.php';
-require_once 'Zend/Gdata/Gbase/SnippetQueryTest.php';
-require_once 'Zend/Gdata/Gbase/QueryTest.php';
-require_once 'Zend/Gdata/Gbase/BaseAttributeTest.php';
-
 require_once 'Zend/Gdata/CalendarTest.php';
 require_once 'Zend/Gdata/CalendarFeedTest.php';
 require_once 'Zend/Gdata/CalendarEventTest.php';
@@ -192,7 +184,6 @@ require_once 'Zend/Gdata/Health/ProfileFeedTest.php';
  * and authentication credentials
  */
 require_once 'Zend/Gdata/GdataOnlineTest.php';
-require_once 'Zend/Gdata/GbaseOnlineTest.php';
 require_once 'Zend/Gdata/CalendarOnlineTest.php';
 require_once 'Zend/Gdata/HealthOnlineTest.php';
 require_once 'Zend/Gdata/SpreadsheetsOnlineTest.php';
@@ -267,14 +258,6 @@ class Zend_Gdata_AllTests
         $suite->addTestSuite('Zend_Gdata_WhereTest');
         $suite->addTestSuite('Zend_Gdata_WhoTest');
 
-        $suite->addTestSuite('Zend_Gdata_Gbase_ItemEntryTest');
-        $suite->addTestSuite('Zend_Gdata_Gbase_ItemFeedTest');
-        $suite->addTestSuite('Zend_Gdata_Gbase_ItemQueryTest');
-        $suite->addTestSuite('Zend_Gdata_Gbase_SnippetFeedTest');
-        $suite->addTestSuite('Zend_Gdata_Gbase_SnippetQueryTest');
-        $suite->addTestSuite('Zend_Gdata_Gbase_QueryTest');
-        $suite->addTestSuite('Zend_Gdata_Gbase_BaseAttributeTest');
-
         $suite->addTestSuite('Zend_Gdata_CalendarTest');
         $suite->addTestSuite('Zend_Gdata_CalendarFeedTest');
         $suite->addTestSuite('Zend_Gdata_CalendarEventTest');
@@ -395,11 +378,6 @@ class Zend_Gdata_AllTests
                 $suite->addTestSuite('Zend_Gdata_GdataOnlineTest');
             }
 
-            if (defined('TESTS_ZEND_GDATA_GBASE_ONLINE_ENABLED') &&
-            constant('TESTS_ZEND_GDATA_GBASE_ONLINE_ENABLED') == true) {
-                $suite->addTestSuite('Zend_Gdata_GbaseOnlineTest');
-            }
-
             if (defined('TESTS_ZEND_GDATA_CALENDAR_ONLINE_ENABLED') &&
             constant('TESTS_ZEND_GDATA_CALENDAR_ONLINE_ENABLED') == true) {
                 $suite->addTestSuite('Zend_Gdata_CalendarOnlineTest');

+ 0 - 64
tests/Zend/Gdata/Gbase/BaseAttributeTest.php

@@ -1,64 +0,0 @@
-<?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_Gbase
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id $
- */
-
-require_once 'Zend/Gdata/Gbase.php';
-require_once 'Zend/Http/Client.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_Gbase
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_Gbase
- */
-class Zend_Gdata_Gbase_BaseAttributeTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp()
-    {
-        $this->baseAttribute = new Zend_Gdata_Gbase_Extension_BaseAttribute();
-    }
-
-    public function testToAndFromString()
-    {
-
-        $this->baseAttribute->setName('price');
-        $this->baseAttribute->setText('10.99 USD');
-        $this->baseAttribute->setType('floatUnit');
-
-        $this->assertTrue($this->baseAttribute->getName() == 'price');
-        $this->assertTrue($this->baseAttribute->getText() == '10.99 USD');
-        $this->assertTrue($this->baseAttribute->getType() == 'floatUnit');
-
-        $newBaseAttribute = new Zend_Gdata_Gbase_Extension_BaseAttribute();
-        $doc = new DOMDocument();
-        $doc->loadXML($this->baseAttribute->saveXML());
-        $newBaseAttribute->transferFromDom($doc->documentElement);
-
-        $this->assertTrue($this->baseAttribute->getName() == $newBaseAttribute->getName());
-        $this->assertTrue($this->baseAttribute->getText() == $newBaseAttribute->getText());
-        $this->assertTrue($this->baseAttribute->getType() == $newBaseAttribute->getType());
-    }
-
-}

+ 0 - 68
tests/Zend/Gdata/Gbase/ItemEntryTest.php

@@ -1,68 +0,0 @@
-<?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_Gbase
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id $
- */
-
-require_once 'Zend/Gdata/Gbase.php';
-require_once 'Zend/Http/Client.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_Gbase
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_Gbase
- */
-class Zend_Gdata_Gbase_ItemEntryTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp()
-    {
-        $this->itemEntry = new Zend_Gdata_Gbase_ItemEntry();
-    }
-
-    public function testToAndFromString()
-    {
-        $this->itemEntry->setItemType('products');
-        $this->assertEquals($this->itemEntry->getItemType()->getText(), 'products');
-
-        $this->itemEntry->addGbaseAttribute('price', '10.99 USD', 'floatUnit');
-        $baseAttribute = $this->itemEntry->getGbaseAttribute('price');
-        $this->assertEquals(count($baseAttribute), 1);
-        $this->assertEquals($baseAttribute[0]->getName(), 'price');
-        $this->assertEquals($baseAttribute[0]->getText(), '10.99 USD');
-        $this->assertEquals($baseAttribute[0]->getType(), 'floatUnit');
-
-        $newItemEntry = new Zend_Gdata_Gbase_ItemEntry();
-        $doc = new DOMDocument();
-        $doc->loadXML($this->itemEntry->saveXML());
-        $newItemEntry->transferFromDom($doc->documentElement);
-        $rowDataFromXML = $newItemEntry->getGbaseAttribute('price');
-
-        $this->assertEquals($this->itemEntry->getItemType()->getText(), $newItemEntry->getItemType()->getText());
-        $this->assertEquals(count($rowDataFromXML), 1);
-        $this->assertEquals($rowDataFromXML[0]->getName(), 'price');
-        $this->assertEquals($rowDataFromXML[0]->getText(), '10.99 USD');
-        $this->assertEquals($rowDataFromXML[0]->getType(), 'floatUnit');
-    }
-
-}

+ 0 - 67
tests/Zend/Gdata/Gbase/ItemFeedTest.php

@@ -1,67 +0,0 @@
-<?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_Gbase
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id $
- */
-
-require_once 'Zend/Gdata/Gbase.php';
-require_once 'Zend/Http/Client.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_Gbase
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_Gbase
- */
-class Zend_Gdata_Gbase_ItemFeedTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp()
-    {
-        $this->itemFeed = new Zend_Gdata_Gbase_ItemFeed(
-                file_get_contents(dirname(__FILE__) . '/_files/TestDataGbaseItemFeedSample1.xml'),
-                true);
-    }
-
-    public function testToAndFromString()
-    {
-        $this->assertEquals(2, count($this->itemFeed->entries));
-        $this->assertEquals(2, $this->itemFeed->entries->count());
-        foreach($this->itemFeed->entries as $entry)
-        {
-            $this->assertTrue($entry instanceof Zend_Gdata_Gbase_ItemEntry);
-        }
-
-        $newItemFeed = new Zend_Gdata_Gbase_ItemFeed();
-        $doc = new DOMDocument();
-        $doc->loadXML($this->itemFeed->saveXML());
-        $newItemFeed->transferFromDom($doc->documentElement);
-
-        $this->assertEquals(2, count($newItemFeed->entries));
-        $this->assertEquals(2, $newItemFeed->entries->count());
-        foreach($newItemFeed->entries as $entry)
-        {
-            $this->assertTrue($entry instanceof Zend_Gdata_Gbase_ItemEntry);
-        }
-    }
-
-}

+ 0 - 92
tests/Zend/Gdata/Gbase/ItemQueryTest.php

@@ -1,92 +0,0 @@
-<?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_Gbase
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id $
- */
-
-require_once 'Zend/Gdata/Gbase.php';
-require_once 'Zend/Gdata/Gbase/ItemQuery.php';
-require_once 'Zend/Http/Client.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_Gbase
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_Gbase
- */
-class Zend_Gdata_Gbase_ItemQueryTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp()
-    {
-        $this->itemQuery = new Zend_Gdata_Gbase_ItemQuery();
-    }
-
-    public function testBq()
-    {
-        $this->itemQuery->resetParameters();
-        $this->itemQuery->setBq('[title:PHP]');
-        $this->assertEquals($this->itemQuery->getBq(), '[title:PHP]');
-    }
-
-    public function testRefine()
-    {
-        $this->itemQuery->resetParameters();
-        $this->itemQuery->setRefine('true');
-        $this->assertEquals($this->itemQuery->getRefine(), 'true');
-    }
-
-    public function testContent()
-    {
-        $this->itemQuery->resetParameters();
-        $this->itemQuery->setContent('stats');
-        $this->assertEquals($this->itemQuery->getContent(), 'stats');
-    }
-
-    public function testOrderBy()
-    {
-        $this->itemQuery->resetParameters();
-        $this->itemQuery->setOrderBy('relevancy');
-        $this->assertEquals($this->itemQuery->getOrderBy(), 'relevancy');
-    }
-
-    public function testSortOrder()
-    {
-        $this->itemQuery->resetParameters();
-        $this->itemQuery->setOrderBy('descending');
-        $this->assertEquals($this->itemQuery->getOrderBy(), 'descending');
-    }
-
-    public function testCrowdBy()
-    {
-        $this->itemQuery->resetParameters();
-        $this->itemQuery->setCrowdBy('attribute:5,content:2,url');
-        $this->assertEquals($this->itemQuery->getCrowdBy(), 'attribute:5,content:2,url');
-    }
-
-    public function testAdjust()
-    {
-        $this->itemQuery->resetParameters();
-        $this->itemQuery->setAdjust('true');
-        $this->assertEquals($this->itemQuery->getAdjust(), 'true');
-    }
-}

+ 0 - 50
tests/Zend/Gdata/Gbase/QueryTest.php

@@ -1,50 +0,0 @@
-<?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_Gbase
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id $
- */
-
-require_once 'Zend/Gdata/Gbase.php';
-require_once 'Zend/Gdata/Gbase/Query.php';
-require_once 'Zend/Http/Client.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_Gbase
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_Gbase
- */
-class Zend_Gdata_Gbase_QueryTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp()
-    {
-        $this->query = new Zend_Gdata_Gbase_Query();
-    }
-
-    public function testKey()
-    {
-        $this->query->setKey('xyz');
-        $this->assertEquals($this->query->getKey(), 'xyz');
-    }
-
-}

+ 0 - 67
tests/Zend/Gdata/Gbase/SnippetFeedTest.php

@@ -1,67 +0,0 @@
-<?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_Gbase
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id $
- */
-
-require_once 'Zend/Gdata/Gbase.php';
-require_once 'Zend/Http/Client.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_Gbase
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_Gbase
- */
-class Zend_Gdata_Gbase_SnippetFeedTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp()
-    {
-        $this->snippetFeed = new Zend_Gdata_Gbase_SnippetFeed(
-                file_get_contents(dirname(__FILE__) . '/_files/TestDataGbaseSnippetFeedSample1.xml'),
-                true);
-    }
-
-    public function testToAndFromString()
-    {
-        $this->assertEquals(2, count($this->snippetFeed->entries));
-        $this->assertEquals(2, $this->snippetFeed->entries->count());
-        foreach($this->snippetFeed->entries as $entry)
-        {
-            $this->assertTrue($entry instanceof Zend_Gdata_Gbase_SnippetEntry);
-        }
-
-        $newSnippetFeed = new Zend_Gdata_Gbase_SnippetFeed();
-        $doc = new DOMDocument();
-        $doc->loadXML($this->snippetFeed->saveXML());
-        $newSnippetFeed->transferFromDom($doc->documentElement);
-
-        $this->assertEquals(2, count($newSnippetFeed->entries));
-        $this->assertEquals(2, $newSnippetFeed->entries->count());
-        foreach($newSnippetFeed->entries as $entry)
-        {
-            $this->assertTrue($entry instanceof Zend_Gdata_Gbase_SnippetEntry);
-        }
-    }
-
-}

+ 0 - 93
tests/Zend/Gdata/Gbase/SnippetQueryTest.php

@@ -1,93 +0,0 @@
-<?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_Gbase
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id $
- */
-
-require_once 'Zend/Gdata/Gbase.php';
-require_once 'Zend/Gdata/Gbase/SnippetQuery.php';
-require_once 'Zend/Http/Client.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_Gbase
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_Gbase
- */
-class Zend_Gdata_Gbase_SnippetQueryTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp()
-    {
-        $this->snippetQuery = new Zend_Gdata_Gbase_SnippetQuery();
-    }
-
-    public function testBq()
-    {
-        $this->snippetQuery->resetParameters();
-        $this->snippetQuery->setBq('[title:PHP]');
-        $this->assertEquals($this->snippetQuery->getBq(), '[title:PHP]');
-    }
-
-    public function testRefine()
-    {
-        $this->snippetQuery->resetParameters();
-        $this->snippetQuery->setRefine('true');
-        $this->assertEquals($this->snippetQuery->getRefine(), 'true');
-    }
-
-    public function testContent()
-    {
-        $this->snippetQuery->resetParameters();
-        $this->snippetQuery->setContent('stats');
-        $this->assertEquals($this->snippetQuery->getContent(), 'stats');
-    }
-
-    public function testOrderBy()
-    {
-        $this->snippetQuery->resetParameters();
-        $this->snippetQuery->setOrderBy('relevancy');
-        $this->assertEquals($this->snippetQuery->getOrderBy(), 'relevancy');
-    }
-
-    public function testSortOrder()
-    {
-        $this->snippetQuery->resetParameters();
-        $this->snippetQuery->setOrderBy('descending');
-        $this->assertEquals($this->snippetQuery->getOrderBy(), 'descending');
-    }
-
-    public function testCrowdBy()
-    {
-        $this->snippetQuery->resetParameters();
-        $this->snippetQuery->setCrowdBy('attribute:5,content:2,url');
-        $this->assertEquals($this->snippetQuery->getCrowdBy(), 'attribute:5,content:2,url');
-    }
-
-    public function testAdjust()
-    {
-        $this->snippetQuery->resetParameters();
-        $this->snippetQuery->setAdjust('true');
-        $this->assertEquals($this->snippetQuery->getAdjust(), 'true');
-    }
-
-}

+ 0 - 91
tests/Zend/Gdata/Gbase/_files/TestDataGbaseItemFeedSample1.xml

@@ -1,91 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-  <feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:gm='http://base.google.com/ns-metadata/1.0' xmlns:g='http://base.google.com/ns/1.0' xmlns:batch='http://schemas.google.com/gdata/batch'>
-    <id>http://www.google.com/base/feeds/items</id>
-    <updated>2007-09-15T00:08:42.580Z</updated>
-    <title type='text'>Items matching query: [customer id(int):1385111]</title>
-    <link rel='alternate' type='text/html' href='http://base.google.com'/>
-    <link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.google.com/base/feeds/items'/>
-    <link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='http://www.google.com/base/feeds/items'/>
-    <link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href='http://www.google.com/base/feeds/items/batch'/>
-    <link rel='self' type='application/atom+xml' href='http://www.google.com/base/feeds/items?start-index=1&amp;max-results=2'/>
-    <link rel='next' type='application/atom+xml' href='http://www.google.com/base/feeds/items?start-index=3&amp;max-results=2'/>
-    <author>
-      <name>Google Inc.</name>
-      <email>base@google.com</email>
-    </author>
-    <generator version='1.0' uri='http://base.google.com'>GoogleBase</generator>
-    <openSearch:totalResults>9</openSearch:totalResults>
-    <openSearch:startIndex>1</openSearch:startIndex>
-    <openSearch:itemsPerPage>2</openSearch:itemsPerPage>
-    <g:customer_id type='int'>1385111</g:customer_id>
-    <entry>
-      <id>http://www.google.com/base/feeds/items/1717711776806040891</id>
-      <published>2007-09-14T00:26:01.000Z</published>
-      <updated>2007-09-14T00:26:01.000Z</updated>
-      <category scheme='http://base.google.com/categories/itemtypes' term='Products'/>
-      <title type='text'>PHP Developer Handbook Second Edition</title>
-      <content type='html'>Essential handbook for PHP developers. This is a test item.</content>
-      <link rel='alternate' type='text/html' href='http://base.google.com/base/a/1385111/D1717711776806040891'/>
-      <link rel='self' type='application/atom+xml' href='http://www.google.com/base/feeds/items/1717711776806040891'/>
-      <link rel='edit' type='application/atom+xml' href='http://www.google.com/base/feeds/items/1717711776806040891'/>
-      <author>
-        <name>jacobm@google.com</name>
-        <email>anon-d2dp8lsofybp@base.google.com</email>
-      </author>
-      <g:item_type type='text'>Products</g:item_type>
-      <g:publisher type='text'>My Press</g:publisher>
-      <g:isbn type='text'>ISBN12345</g:isbn>
-      <g:condition type='text'>New</g:condition>
-      <g:published_date type='text'>Sep 2007</g:published_date>
-      <g:payment type='text'>Google Checkout</g:payment>
-      <g:upc type='text'>UPC12345</g:upc>
-      <g:brand type='text'>Oxford</g:brand>
-      <g:product_type type='text'>book</g:product_type>
-      <g:edition type='text'>First Edition</g:edition>
-      <g:year type='float'>2006.0</g:year>
-      <g:item_language type='text'>en</g:item_language>
-      <g:pages type='float'>253.0</g:pages>
-      <g:price type='floatUnit'>16.99 usd</g:price>
-      <g:target_country type='text'>US</g:target_country>
-      <g:customer_id type='int'>1385111</g:customer_id>
-      <g:customer_id type='int'>1385111</g:customer_id>
-      <g:quantity type='int'>10</g:quantity>
-      <g:author type='text'>John Doe</g:author>
-      <g:weight type='floatUnit'>2.2 lbs</g:weight>
-      <g:expiration_date type='dateTime'>2007-10-14T00:26:01.000Z</g:expiration_date>
-    </entry>
-    <entry>
-      <id>http://www.google.com/base/feeds/items/5366131833179111427</id>
-      <published>2007-09-14T00:32:03.000Z</published>
-      <updated>2007-09-14T00:32:04.000Z</updated>
-      <category scheme='http://base.google.com/categories/itemtypes' term='Products'/>
-      <title type='text'>PHP Developer Handbook Second Edition</title>
-      <content type='html'>Essential handbook for PHP developers. This is a test item.</content>
-      <link rel='alternate' type='text/html' href='http://base.google.com/base/a/1385111/D5366131833179111427'/>
-      <link rel='self' type='application/atom+xml' href='http://www.google.com/base/feeds/items/5366131833179111427'/>
-      <link rel='edit' type='application/atom+xml' href='http://www.google.com/base/feeds/items/5366131833179111427'/>
-      <author>
-        <name>jacobm@google.com</name>
-        <email>anon-d2dp8lsofybp@base.google.com</email>
-      </author>
-      <g:item_type type='text'>Products</g:item_type>
-      <g:isbn type='text'>ISBN12345</g:isbn>
-      <g:publisher type='text'>My Press</g:publisher>
-      <g:condition type='text'>New</g:condition>
-      <g:payment type='text'>Google Checkout</g:payment>
-      <g:upc type='text'>UPC12345</g:upc>
-      <g:edition type='text'>First Edition</g:edition>
-      <g:product_type type='text'>book</g:product_type>
-      <g:year type='float'>2006.0</g:year>
-      <g:item_language type='text'>en</g:item_language>
-      <g:pages type='float'>253.0</g:pages>
-      <g:price type='floatUnit'>12.99 usd</g:price>
-      <g:target_country type='text'>US</g:target_country>
-      <g:customer_id type='int'>1385111</g:customer_id>
-      <g:customer_id type='int'>1385111</g:customer_id>
-      <g:quantity type='int'>10</g:quantity>
-      <g:author type='text'>John Doe</g:author>
-      <g:weight type='floatUnit'>2.2 lbs</g:weight>
-      <g:expiration_date type='dateTime'>2007-10-14T00:32:03.000Z</g:expiration_date>
-    </entry>
-  </feed>

+ 0 - 73
tests/Zend/Gdata/Gbase/_files/TestDataGbaseSnippetFeedSample1.xml

@@ -1,73 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-  <feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:gm='http://base.google.com/ns-metadata/1.0' xmlns:g='http://base.google.com/ns/1.0' xmlns:batch='http://schemas.google.com/gdata/batch'>
-    <id>http://www.google.com/base/feeds/snippets</id>
-    <updated>2007-09-15T00:09:38.999Z</updated>
-    <title type='text'>Items matching query: [title:PHP book]</title>
-    <link rel='alternate' type='text/html' href='http://base.google.com'/>
-    <link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.google.com/base/feeds/snippets'/>
-    <link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href='http://www.google.com/base/feeds/snippets/batch'/>
-    <link rel='self' type='application/atom+xml' href='http://www.google.com/base/feeds/snippets?start-index=1&amp;max-results=2&amp;bq=%5Btitle%3APHP+book%5D'/>
-    <link rel='next' type='application/atom+xml' href='http://www.google.com/base/feeds/snippets?start-index=3&amp;max-results=2&amp;bq=%5Btitle%3APHP+book%5D'/>
-    <author>
-      <name>Google Inc.</name>
-      <email>base@google.com</email>
-    </author>
-    <generator version='1.0' uri='http://base.google.com'>GoogleBase</generator>
-    <openSearch:totalResults>191</openSearch:totalResults>
-    <openSearch:startIndex>1</openSearch:startIndex>
-    <openSearch:itemsPerPage>2</openSearch:itemsPerPage>
-    <entry>
-      <id>http://www.google.com/base/feeds/snippets/12314974507194001735</id>
-      <published>2007-06-06T07:02:31.000Z</published>
-      <updated>2007-09-14T07:48:53.000Z</updated>
-      <category scheme='http://base.google.com/categories/itemtypes' term='Products'/>
-      <title type='text'>The Zend PHP Certification Practice Test Book: Practice Questions for the Zend Certified Engineer Exam</title>
-      <content type='html'>John Coggeshall, Marco Tabini,Paperback, English-language edition,Pages:152,Pub BY Marco Tabini &amp; Associates,</content>
-      <link rel='alternate' type='text/html' href='http://search.barnesandnoble.com/booksearch/isbninquiry.asp?sourceid=Q000000630&amp;ean=9780973589887'/>
-      <link rel='self' type='application/atom+xml' href='http://www.google.com/base/feeds/snippets/12314974507194001735'/>
-      <author>
-        <name>Barnes &amp; Noble.com</name>
-        <email>anon-h0z4ch9cz5h5@base.google.com</email>
-      </author>
-      <g:item_type type='text'>Products</g:item_type>
-      <g:image_link type='url'>http://images.barnesandnoble.com.edgesuite.net/images/8950000/8957260.gif</g:image_link>
-      <g:publisher type='text'>Marco Tabini &amp; Associates,</g:publisher>
-      <g:isbn type='text'>0973589884</g:isbn>
-      <g:condition type='text'>new</g:condition>
-      <g:id type='text'>9780973589887</g:id>
-      <g:product_type type='text'>books</g:product_type>
-      <g:item_language type='text'>EN</g:item_language>
-      <g:pages type='int'>152</g:pages>
-      <g:price type='floatUnit'>21.99 usd</g:price>
-      <g:target_country type='text'>US</g:target_country>
-      <g:customer_id type='int'>1165992</g:customer_id>
-      <g:genre type='text'>Computers</g:genre>
-      <g:binding type='text'>paperback</g:binding>
-      <g:author type='text'>Marco Tabini</g:author>
-      <g:author type='text'>John Coggeshall</g:author>
-      <g:expiration_date type='dateTime'>2007-10-14T07:48:53.000Z</g:expiration_date>
-    </entry>
-    <entry>
-      <id>http://www.google.com/base/feeds/snippets/17983316950426332176</id>
-      <published>2007-09-07T04:21:51.000Z</published>
-      <updated>2007-09-14T04:09:34.000Z</updated>
-      <category scheme='http://base.google.com/categories/itemtypes' term='Products'/>
-      <title type='text'>PHP 5 / MYSQL PROGRAMMING FOR THE ABSOLUTE - BOOK *NEW</title>
-      <content type='html'>Sysqsystems includes more than two million titles in its online database, with an inventory of 1.3 Million titles available for immediate delivery.</content>
-      <link rel='alternate' type='text/html' href='http://adfarm.mediaplex.com/ad/ck/711-5256-8196-2?loc=http%3A%2F%2Fcgi.ebay.com%2FPHP-5-MYSQL-PROGRAMMING-FOR-THE-ABSOLUTE-BOOK-NEW_W0QQitemZ200149840989QQcmdZViewItem'/>
-      <link rel='self' type='application/atom+xml' href='http://www.google.com/base/feeds/snippets/17983316950426332176'/>
-      <author>
-        <name>eBay</name>
-        <email>rcross@ebay.com</email>
-      </author>
-      <g:item_type type='text'>Products</g:item_type>
-      <g:item_language type='text'>EN</g:item_language>
-      <g:price type='floatUnit'>18.42 usd</g:price>
-      <g:target_country type='text'>US</g:target_country>
-      <g:image_link type='url'>http://thumbs.ebaystatic.com/pict/200149840989_1.jpg</g:image_link>
-      <g:category type='text'>Books&gt;Nonfiction Books</g:category>
-      <g:customer_id type='int'>11729</g:customer_id>
-      <g:id type='text'>200149840989</g:id>
-      <g:expiration_date type='dateTime'>2007-10-14T04:09:34.000Z</g:expiration_date>
-    </entry>
-  </feed>

+ 0 - 167
tests/Zend/Gdata/GbaseOnlineTest.php

@@ -1,167 +0,0 @@
-<?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_Gbase
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id $
- */
-
-require_once 'Zend/Gdata/Gbase.php';
-require_once 'Zend/Http/Client.php';
-require_once 'Zend/Gdata/ClientLogin.php';
-
-/**
- * @category   Zend
- * @package    Zend_Gdata_Gbase
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Gdata
- * @group      Zend_Gdata_Gbase
- */
-class Zend_Gdata_GbaseOnlineTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp()
-    {
-        $user = constant('TESTS_ZEND_GDATA_CLIENTLOGIN_EMAIL');
-        $pass = constant('TESTS_ZEND_GDATA_CLIENTLOGIN_PASSWORD');
-        $service = Zend_Gdata_Gbase::AUTH_SERVICE_NAME;
-        $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service);
-        $this->gdata = new Zend_Gdata_Gbase($client);
-    }
-
-    public function testGetGbaseItemFeed()
-    {
-        $feed = $this->gdata->getGbaseItemFeed();
-        $this->assertTrue($feed instanceof Zend_Gdata_Gbase_ItemFeed);
-        foreach ($feed->entries as $entry) {
-            $this->assertTrue($entry instanceof Zend_Gdata_Gbase_ItemEntry);
-            $this->assertEquals($entry->getHttpClient(), $feed->getHttpClient());
-        }
-
-        $query = new Zend_Gdata_Gbase_ItemQuery();
-        $feed = $this->gdata->getGbaseItemFeed($query);
-        $this->assertTrue($feed instanceof Zend_Gdata_Gbase_ItemFeed);
-        foreach ($feed->entries as $entry) {
-            $this->assertTrue($entry instanceof Zend_Gdata_Gbase_ItemEntry);
-            $this->assertEquals($entry->getHttpClient(), $feed->getHttpClient());
-        }
-
-        $uri = $query->getQueryUrl();
-        $feed = $this->gdata->getGbaseItemFeed($uri);
-        $this->assertTrue($feed instanceof Zend_Gdata_Gbase_ItemFeed);
-        foreach ($feed->entries as $entry) {
-            $this->assertTrue($entry instanceof Zend_Gdata_Gbase_ItemEntry);
-            $this->assertEquals($entry->getHttpClient(), $feed->getHttpClient());
-        }
-    }
-
-    public function testGetGbaseItemEntry()
-    {
-        $newEntry = $this->gdata->newItemEntry();
-
-        $title = 'PHP Developer Handbook';
-        $newEntry->title = $this->gdata->newTitle(trim($title));
-
-        $desc = 'This is a test item';
-        $newEntry->content = $this->gdata->newContent($desc);
-        $newEntry->content->type = 'text';
-
-        $itemType = 'Products';
-        $newEntry->itemType = $itemType;
-        $newEntry->itemType->type = 'text';
-
-        $newEntry->addGbaseAttribute('product_type', 'book', 'text');
-        $newEntry->addGbaseAttribute('price', '12.99 usd', 'floatUnit');
-        $newEntry->addGbaseAttribute('quantity', '10', 'int');
-
-        $createdEntry = $this->gdata->insertGbaseItem($newEntry, false);
-        $itemId = $createdEntry->id->text;
-
-        $entry = $this->gdata->getGbaseItemEntry($itemId);
-        $this->assertTrue($entry instanceof Zend_Gdata_Gbase_ItemEntry);
-    }
-
-    public function testInsertGbaseItem()
-    {
-        $newEntry = $this->gdata->newItemEntry();
-
-        $title = 'PHP Developer Handbook';
-        $newEntry->title = $this->gdata->newTitle(trim($title));
-
-        $desc = 'Essential handbook for PHP developers.';
-        $newEntry->content = $this->gdata->newContent($desc);
-        $newEntry->content->type = 'text';
-
-        $itemType = 'Products';
-        $newEntry->itemType = $itemType;
-        $newEntry->itemType->type = 'text';
-
-        $newEntry->addGbaseAttribute('product_type', 'book', 'text');
-        $newEntry->addGbaseAttribute('price', '12.99 usd', 'floatUnit');
-        $newEntry->addGbaseAttribute('quantity', '10', 'int');
-
-        $createdEntry = $this->gdata->insertGbaseItem($newEntry, true);
-
-        $this->assertEquals($title, $createdEntry->title->text);
-        $this->assertEquals($desc, $createdEntry->content->text);
-        $this->assertEquals($itemType, $createdEntry->itemType->text);
-
-        $baseAttribute = $createdEntry->getGbaseAttribute('product_type');
-        $this->assertEquals('product_type', $baseAttribute[0]->name);
-        $this->assertEquals('book', $baseAttribute[0]->text);
-        $this->assertEquals('text', $baseAttribute[0]->type);
-
-        $baseAttribute = $createdEntry->getGbaseAttribute('price');
-        $this->assertEquals('price', $baseAttribute[0]->name);
-        $this->assertEquals('12.99 usd', $baseAttribute[0]->text);
-        $this->assertEquals('floatUnit', $baseAttribute[0]->type);
-
-        $baseAttribute = $createdEntry->getGbaseAttribute('quantity');
-        $this->assertEquals('quantity', $baseAttribute[0]->name);
-        $this->assertEquals('10', $baseAttribute[0]->text);
-        $this->assertEquals('int', $baseAttribute[0]->type);
-    }
-
-    public function testGetGbaseSnippetFeed()
-    {
-        $feed = $this->gdata->getGbaseSnippetFeed();
-        $this->assertTrue($feed instanceof Zend_Gdata_Gbase_SnippetFeed);
-        foreach ($feed->entries as $entry) {
-            $this->assertTrue($entry instanceof Zend_Gdata_Gbase_SnippetEntry);
-            $this->assertEquals($entry->getHttpClient(), $feed->getHttpClient());
-        }
-
-        $query = new Zend_Gdata_Gbase_SnippetQuery();
-        $feed = $this->gdata->getGbaseSnippetFeed($query);
-        $this->assertTrue($feed instanceof Zend_Gdata_Gbase_SnippetFeed);
-        foreach ($feed->entries as $entry) {
-            $this->assertTrue($entry instanceof Zend_Gdata_Gbase_SnippetEntry);
-            $this->assertEquals($entry->getHttpClient(), $feed->getHttpClient());
-        }
-
-        $uri = $query->getQueryUrl();
-        $feed = $this->gdata->getGbaseSnippetFeed($uri);
-        $this->assertTrue($feed instanceof Zend_Gdata_Gbase_SnippetFeed);
-        foreach ($feed->entries as $entry) {
-            $this->assertTrue($entry instanceof Zend_Gdata_Gbase_SnippetEntry);
-            $this->assertEquals($entry->getHttpClient(), $feed->getHttpClient());
-        }
-    }
-
-}