?
Current File : /home/c/i/d/cideo/www/wp-includesVIp/js/crop/images/Gbase.tar
Extension/BaseAttribute.php000066600000007262151252756430012014 0ustar00<?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-2008 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: Entry.php 3941 2007-03-14 21:36:13Z darby $
 */

/**
 * @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-2008 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;
    }

}
ItemQuery.php000066600000004720151252756430007222 0ustar00<?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-2008 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */

/**
 * @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-2008 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;
    }

}
Query.php000066600000014622151252756430006405 0ustar00<?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-2008 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */

/**
 * @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-2008 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;
        }
    }

}
Entry.php000066600000011271151252756430006376 0ustar00<?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-2008 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */

/**
 * @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-2008 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;
    }

}
SnippetEntry.php000066600000002603151252756430007740 0ustar00<?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-2008 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */

/**
 * @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-2008 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';
}
ItemFeed.php000066600000002555151252756430006764 0ustar00<?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-2008 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */

/**
 * @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-2008 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';
}
SnippetQuery.php000066600000003776151252756430007760 0ustar00<?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-2008 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */

/**
 * 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-2008 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;
    }

}