Service/Ebay/Finding.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 [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Service
- Subpackage
- Ebay
- Version
- $Id: Finding.php 22824 2010-08-09 18:59:54Z renanbr $
\Zend_Service_Ebay_Finding
- Parent(s)
- \Zend_Service_Ebay_Abstract
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Uses
- \global\Zend_Service_Ebay_Abstract
Constants
OPTION_APP_ID
= 'app_id'- Inherited_from
- \Zend_Service_Ebay_Abstract::OPTION_APP_ID
OPTION_GLOBAL_ID
= 'global_id'- Inherited_from
- \Zend_Service_Ebay_Abstract::OPTION_GLOBAL_ID
Properties

mixed $_client = - Type
- mixed
- Inherited_from
- \Zend_Service_Ebay_Abstract::$$_client

array $_options = array(self::OPTION_GLOBAL_ID => 'EBAY-US')array(self::OPTION_GLOBAL_ID => 'EBAY-US')Details- Type
- array

array $_xmlNamespaces = array(self::XMLNS_FINDING => 'http://www.ebay.com/marketplace/search/v1/services', self::XMLNS_MS => 'http://www.ebay.com/marketplace/services')array(self::XMLNS_FINDING => 'http://www.ebay.com/marketplace/search/v1/services', self::XMLNS_MS => 'http://www.ebay.com/marketplace/services')Details- Type
- array
Methods

__construct(\Zend_Config | array | string $options) : void| Name | Type | Description |
|---|---|---|
| $options | \Zend_Config | array | string | Application Id or array of options |
| Exception | Description |
|---|---|
| \Zend_Service_Ebay_Finding_Exception | When application id is missing |

_findItems(array $options, string $operation) : \Zend_Service_Ebay_Finding_Response_Items| Name | Type | Description |
|---|---|---|
| $options | array | |
| $operation | string |
| Type | Description |
|---|---|
| \Zend_Service_Ebay_Finding_Response_Items |

_optionsToNameValueSyntax(\Zend_Config | array $options) : arrayImplements Name-value Syntax translator.
Inherited from: \Zend_Service_Ebay_Abstract::_optionsToNameValueSyntax()Example:
array( 'paginationInput' => array( 'entriesPerPage' => 5, 'pageNumber' => 2 ), 'itemFilter' => array( array( 'name' => 'MaxPrice', 'value' => 25, 'paramName' => 'Currency', 'paramValue' => 'USD' ), array( 'name' => 'FreeShippingOnly', 'value' => true ), array( 'name' => 'ListingType', 'value' => array( 'AuctionWithBIN', 'FixedPrice', 'StoreInventory' ) ) ), 'productId' => array( '' => 123, 'type' => 'UPC' ) )
this above is translated to
array( 'paginationInput.entriesPerPage' => '5', 'paginationInput.pageNumber' => '2', 'itemFilter(0).name' => 'MaxPrice', 'itemFilter(0).value' => '25', 'itemFilter(0).paramName' => 'Currency', 'itemFilter(0).paramValue' => 'USD', 'itemFilter(1).name' => 'FreeShippingOnly', 'itemFilter(1).value' => '1', 'itemFilter(2).name' => 'ListingType', 'itemFilter(2).value(0)' => 'AuctionWithBIN', 'itemFilter(2).value(1)' => 'FixedPrice', 'itemFilter(2).value(2)' => 'StoreInventory', 'productId' => '123', 'productId.@type' => 'UPC' )
| Name | Type | Description |
|---|---|---|
| $options | \Zend_Config | array |
| Type | Description |
|---|---|
| array | A simple array of strings |

_parseResponse(\Zend_Http_Response $response) : \DOMDocumentSearch for error from request.
If any error is found a DOMDocument is returned, this object contains a DOMXPath object as "ebayFindingXPath" attribute.
| Name | Type | Description |
|---|---|---|
| $response | \Zend_Http_Response |
| Type | Description |
|---|---|
| \DOMDocument |
| Exception | Description |
|---|---|
| \Zend_Service_Ebay_Finding_Exception | When any error occurrs during request |
- Link
- http://developer.ebay.com/DevZone/finding/CallRef/types/ErrorSeverity.html
- See
- \global\Zend_Service_Ebay_Finding_Abstract::_initXPath()

_request(string $operation, array $options = null) : \DOMDocument| Name | Type | Description |
|---|---|---|
| $operation | string | |
| $options | array |
| Type | Description |
|---|---|
| \DOMDocument |

findItemsAdvanced(string $keywords, boolean $descriptionSearch = true, integer $categoryId = null, \Zend_Config | array $options = null) : \Zend_Service_Ebay_Finding_Response_ItemsFinds items by a keyword query and/or category and allows searching within item descriptions.
| Name | Type | Description |
|---|---|---|
| $keywords | string | |
| $descriptionSearch | boolean | |
| $categoryId | integer | |
| $options | \Zend_Config | array |
| Type | Description |
|---|---|
| \Zend_Service_Ebay_Finding_Response_Items |

findItemsByCategory(integer $categoryId, \Zend_Config | array $options = null) : \Zend_Service_Ebay_Finding_Response_ItemsFinds items in a specific category.
Results can be filtered and sorted.
| Name | Type | Description |
|---|---|---|
| $categoryId | integer | |
| $options | \Zend_Config | array |
| Type | Description |
|---|---|
| \Zend_Service_Ebay_Finding_Response_Items |

findItemsByKeywords(string $keywords, \Zend_Config | array $options = null) : \Zend_Service_Ebay_Finding_Response_ItemsFinds items on eBay based upon a keyword query and returns details for matching items.
| Name | Type | Description |
|---|---|---|
| $keywords | string | |
| $options | \Zend_Config | array |
| Type | Description |
|---|---|
| \Zend_Service_Ebay_Finding_Response_Items |

findItemsByProduct(integer $productId, string $productIdType = null, \Zend_Config | array $options = null) : \Zend_Service_Ebay_Finding_Response_ItemsFinds items based upon a product ID, such as an ISBN, UPC, EAN, or ePID.
| Name | Type | Description |
|---|---|---|
| $productId | integer | |
| $productIdType | string | Default value is ReferenceID |
| $options | \Zend_Config | array |
| Type | Description |
|---|---|
| \Zend_Service_Ebay_Finding_Response_Items |

findItemsInEbayStores(string $storeName, \Zend_Config | array $options = null) : \Zend_Service_Ebay_Finding_Response_ItemsFinds items in eBay stores.
Can search a specific store or can search all stores with a keyword query.
| Name | Type | Description |
|---|---|---|
| $storeName | string | |
| $options | \Zend_Config | array |
| Type | Description |
|---|---|
| \Zend_Service_Ebay_Finding_Response_Items |

getHistograms(integer $categoryId, \Zend_Config | array $options = null) : \Zend_Service_Ebay_Finding_Response_HistogramsGets category and/or aspect metadata for the specified category.
| Name | Type | Description |
|---|---|---|
| $categoryId | integer | |
| $options | \Zend_Config | array |
| Type | Description |
|---|---|
| \Zend_Service_Ebay_Finding_Response_Histograms |

getOption(string $name = null) : mixed| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| mixed |

getSearchKeywordsRecommendation(string $keywords, \Zend_Config | array $options = null) : \Zend_Service_Ebay_Finding_Response_KeywordsChecks specified keywords and returns correctly spelled keywords for best search results.
| Name | Type | Description |
|---|---|---|
| $keywords | string | |
| $options | \Zend_Config | array |
| Type | Description |
|---|---|
| \Zend_Service_Ebay_Finding_Response_Keywords |

hasOption(string $name) : boolean| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| boolean |

optionsToArray(\Zend_Config | array $options) : array
| Name | Type | Description |
|---|---|---|
| $options | \Zend_Config | array |
| Type | Description |
|---|---|
| array |
| Exception | Description |
|---|---|
| \Zend_Service_Ebay_Finding_Exception | When $options is not an array neither a Zend_Config object |

setClient(\Zend_Rest_Client $client) : \Zend_Service_Ebay_Finding| Name | Type | Description |
|---|---|---|
| $client | \Zend_Rest_Client |
| Type | Description |
|---|---|
| \Zend_Service_Ebay_Finding | Provides a fluent interface |

setOption(string | \Zend_Config | array $name, mixed $value = null) : \Zend_Service_Ebay_Abstract| Name | Type | Description |
|---|---|---|
| $name | string | \Zend_Config | array | |
| $value | mixed |
| Type | Description |
|---|---|
| \Zend_Service_Ebay_Abstract | Provides a fluent interface |

toEbayValue(mixed $value) : stringTranslate native PHP values format to ebay format for request.
Inherited from: \Zend_Service_Ebay_Abstract::toEbayValue()Boolean is translated to "0" or "1", date object generates ISO 8601, everything else is translated to string.
| Name | Type | Description |
|---|---|---|
| $value | mixed |
| Type | Description |
|---|---|
| string |

toPhpValue(string $value, string $type) : mixedTranslate an ebay value format to native PHP type.
Inherited from: \Zend_Service_Ebay_Abstract::toPhpValue()| Name | Type | Description |
|---|---|---|
| $value | string | |
| $type | string |
| Type | Description |
|---|---|
| mixed |
| Exception | Description |
|---|---|
| \Zend_Service_Ebay_Finding_Exception | When $type is not valid |
- See
- \global\http://developer.ebay.com/DevZone/finding/CallRef/types/simpleTypes.html