Zend Framework  1.12
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Zend_Service_Ebay_Abstract Class Reference

Public Member Functions

 __construct ($options=null)
 
 setOption ($name, $value=null)
 
 getOption ($name=null)
 
 hasOption ($name)
 
 setClient ($client)
 
 getClient ()
 

Static Public Member Functions

static optionsToArray ($options)
 
static toEbayValue ($value)
 Translate native PHP values format to ebay format for request.
 
static toPhpValue ($value, $type)
 Translate an ebay value format to native PHP type.
 

Public Attributes

const OPTION_APP_ID = 'app_id'
 
const OPTION_GLOBAL_ID = 'global_id'
 

Protected Member Functions

 _optionsToNameValueSyntax ($options)
 Implements Name-value Syntax translator.
 

Protected Attributes

 $_options = array()
 
 $_client
 

Constructor & Destructor Documentation

__construct (   $options = null)
Parameters
Zend_Config | array$options
Returns
void

Member Function Documentation

_optionsToNameValueSyntax (   $options)
protected

Implements Name-value Syntax translator.

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.' => 'UPC' )

Parameters
Zend_Config | array$optionsarray A simple array of strings
getClient ( )
abstract
Returns
mixed
getOption (   $name = null)
Parameters
string$name
Returns
mixed
hasOption (   $name)
Parameters
string$name
Returns
boolean
static optionsToArray (   $options)
static
Parameters
Zend_Config | array$options
Exceptions
Zend_Service_Ebay_Finding_ExceptionWhen $options is not an array neither a Zend_Config object
Returns
array
See Also
Zend_Service_Ebay_Exception
setClient (   $client)
abstract
Parameters
mixed$client
Returns
Zend_Service_Ebay_Abstract Provides a fluent interface
setOption (   $name,
  $value = null 
)
Parameters
string | Zend_Config | array$name
mixed$value
Returns
Zend_Service_Ebay_Abstract Provides a fluent interface
static toEbayValue (   $value)
static

Translate native PHP values format to ebay format for request.

Boolean is translated to "0" or "1", date object generates ISO 8601, everything else is translated to string.

Parameters
mixed$value
Returns
string
static toPhpValue (   $value,
  $type 
)
static

Translate an ebay value format to native PHP type.

Parameters
string$value
string$type
See Also
http://developer.ebay.com/DevZone/finding/CallRef/types/simpleTypes.html
Exceptions
Zend_Service_Ebay_Finding_ExceptionWhen $type is not valid
Returns
mixed
See Also
Zend_Service_Ebay_Exception

Member Data Documentation

$_client
protected
$_options = array()
protected
const OPTION_APP_ID = 'app_id'
const OPTION_GLOBAL_ID = 'global_id'