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

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

View file

@ -0,0 +1,151 @@
<?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 Gbase
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Entry.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Entry
*/
require_once 'Zend/Gdata/Entry.php';
/**
* @see Zend_Gdata_Gbase_Extension_BaseAttribute
*/
require_once 'Zend/Gdata/Gbase/Extension/BaseAttribute.php';
/**
* Base class for working with Google Base entries.
*
* @link http://code.google.com/apis/base/
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gbase
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_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);
}
/**
* 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;
}
}

View file

@ -0,0 +1,115 @@
<?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 Gbase
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: BaseAttribute.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension_Element
*/
require_once 'Zend/Gdata/App/Extension/Element.php';
/**
* Concrete class for working with ItemType elements.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gbase
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Gbase_Extension_BaseAttribute extends Zend_Gdata_App_Extension_Element
{
/**
* Namespace for Google Base elements
*
* var @string
*/
protected $_rootNamespace = 'g';
/**
* Create a new instance.
*
* @param string $name (optional) The name of the Base attribute
* @param string $text (optional) The text value of the Base attribute
* @param string $text (optional) The type of the Base attribute
*/
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;
}
/**
* 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;
}
}

View file

@ -0,0 +1,60 @@
<?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 Gbase
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Feed.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Feed
*/
require_once 'Zend/Gdata/Feed.php';
/**
* Base class for the Google Base Feed
*
* @link http://code.google.com/apis/base/
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gbase
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_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
* object should be constructed.
*/
public function __construct($element = null)
{
$this->registerAllNamespaces(Zend_Gdata_Gbase::$namespaces);
parent::__construct($element);
}
}

View file

@ -0,0 +1,161 @@
<?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 Gbase
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: ItemEntry.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Gbase_Entry
*/
require_once 'Zend/Gdata/Gbase/Entry.php';
/**
* Concrete class for working with Item entries.
*
* @link http://code.google.com/apis/base/
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gbase
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_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();
}
}
}

View file

@ -0,0 +1,48 @@
<?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 Gbase
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: ItemFeed.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Gbase_Feed
*/
require_once 'Zend/Gdata/Gbase/Feed.php';
/**
* Represents the Google Base Customer Items Feed
*
* @link http://code.google.com/apis/base/
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gbase
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Gbase_ItemFeed extends Zend_Gdata_Feed
{
/**
* The classname for individual item feed elements.
*
* @var string
*/
protected $_entryClassName = 'Zend_Gdata_Gbase_ItemEntry';
}

View file

@ -0,0 +1,101 @@
<?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 Gbase
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: ItemQuery.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Query
*/
require_once('Zend/Gdata/Query.php');
/**
* @see Zend_Gdata_Gbase_Query
*/
require_once('Zend/Gdata/Gbase/Query.php');
/**
* Assists in constructing queries for Google Base Customer Items Feed
*
* @link http://code.google.com/apis/base/
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gbase
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Gbase_ItemQuery extends Zend_Gdata_Gbase_Query
{
/**
* Path to the customer items feeds on the Google Base server.
*/
const GBASE_ITEM_FEED_URI = 'http://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;
}
}

View file

@ -0,0 +1,268 @@
<?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 Gbase
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Query.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Query
*/
require_once('Zend/Gdata/Query.php');
/**
* Assists in constructing queries for Google Base
*
* @link http://code.google.com/apis/base
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gbase
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Gbase_Query extends Zend_Gdata_Query
{
/**
* Path to the customer items feeds on the Google Base server.
*/
const GBASE_ITEM_FEED_URI = 'http://www.google.com/base/feeds/items';
/**
* Path to the snippets feeds on the Google Base server.
*/
const GBASE_SNIPPET_FEED_URI = 'http://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
*/
public function setAdjust($value)
{
if ($value !== null) {
$this->_params['adjust'] = $value;
} else {
unset($this->_params['adjust']);
}
return $this;
}
/**
* @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;
}
}
}

View file

@ -0,0 +1,48 @@
<?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 Gbase
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: SnippetEntry.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Gbase_Entry
*/
require_once 'Zend/Gdata/Gbase/Entry.php';
/**
* Concrete class for working with Snippet entries.
*
* @link http://code.google.com/apis/base/
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gbase
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Gbase_SnippetEntry extends Zend_Gdata_Gbase_Entry
{
/**
* The classname for individual snippet entry elements.
*
* @var string
*/
protected $_entryClassName = 'Zend_Gdata_Gbase_SnippetEntry';
}

View file

@ -0,0 +1,48 @@
<?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 Gbase
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: SnippetFeed.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Gbase_Feed
*/
require_once 'Zend/Gdata/Gbase/Feed.php';
/**
* Represents the Google Base Snippets Feed
*
* @link http://code.google.com/apis/base/
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gbase
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Gbase_SnippetFeed extends Zend_Gdata_Feed
{
/**
* The classname for individual snippet feed elements.
*
* @var string
*/
protected $_entryClassName = 'Zend_Gdata_Gbase_SnippetEntry';
}

View file

@ -0,0 +1,74 @@
<?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 Gbase
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: SnippetQuery.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* Zend_Gdata_Query
*/
require_once('Zend/Gdata/Query.php');
/**
* Zend_Gdata_Gbase_Query
*/
require_once('Zend/Gdata/Gbase/Query.php');
/**
* Assists in constructing queries for Google Base Snippets Feed
*
* @link http://code.google.com/apis/base/
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gbase
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Gbase_SnippetQuery extends Zend_Gdata_Gbase_Query
{
/**
* Path to the snippets feeds on the Google Base server.
*/
const BASE_SNIPPET_FEED_URI = 'http://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;
}
}