Services_Ebay
[ class tree: Services_Ebay ] [ index: Services_Ebay ] [ all elements ]

Class: Services_Ebay_Session

Source Location: /Services_Ebay-0.13.1/Services/Ebay/Session.php

Class Overview


Services/Ebay/Session.php


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 29]
Services/Ebay/Session.php

manages IDs, authentication, serialization, etc.



[ Top ]


Class Variables

$compatLevel =  405

[line 171]

compatibility level
  • Access: public

Type:   integer


[ Top ]

$debug =  1

[line 157]

debug flag
  • Access: public

Type:   boolean


[ Top ]

$detailLevel =

[line 178]

detail level
  • Access: public

Type:   string


[ Top ]

$wire =  null

[line 164]

XML wire
  • Access: public

Type:   string


[ Top ]



Method Detail

buildRequestBody   [line 360]

string buildRequestBody( string $verb, [array|null $params = array()], [ $authType = Services_Ebay::AUTH_TYPE_TOKEN])

build XML code for a request
  • Return: XML request
  • Access: public

Parameters:

string   $verb   —  verb of the request
array|null   $params   —  parameters of the request
   $authType   — 

[ Top ]

__construct (Constructor)   [line 228]

Services_Ebay_Session __construct( string $devId, string $appId, string $certId, [string $encoding = 'ISO-8859-1'])

create the session object
  • Access: public

Parameters:

string   $devId   —  developer id
string   $appId   —  application id
string   $certId   —  certificate id
string   $encoding   —  external encoding, as eBay uses UTF-8, the session will encode and decode to the specified encoding. Possible values are ISO-8859-1 and UTF-8

[ Top ]

getErrors   [line 534]

array getErrors( [boolean $clear = true])

get the errors and warnings that happened during the last API calls
  • Access: public

Parameters:

boolean   $clear   —  whether to clear the internal error list

[ Top ]

getWire   [line 280]

string getWire( )

get the XML code that was sent accross the network

To use this, debug mode must be set to DEBUG_STORE or DEBUG_PRINT

  • Return: xml wire
  • Access: public

[ Top ]

sendRequest   [line 419]

array sendRequest( string $verb, [array $params = array()], [integer $authType = Services_Ebay::AUTH_TYPE_TOKEN], [boolean $parseResult = true])

send a request

This method is used by the API methods. You may call it directly to access any eBay function that is not yet implemented.

  • Return: response
  • Todo: add real error handling
  • Access: public

Parameters:

string   $verb   —  function to call
array   $params   —  associative array containing all parameters for the function call
integer   $authType   —  authentication type
boolean   $parseResult   —  flag to indicate, whether XML should be parsed or returned raw

[ Top ]

setAuthenticationData   [line 300]

void setAuthenticationData( string $username, [ $password = null])

set the authentication username and password
  • Access: public

Parameters:

string   $username   — 
   $password   — 

[ Top ]

setCompatLevel   [line 569]

void setCompatLevel( int $compatLevel)

set compatibility level if particular request needs another version of API instead of default one
  • Access: public

Parameters:

int   $compatLevel   — 

[ Top ]

setDebug   [line 268]

void setDebug( integer $debug)

set the debug mode

Possible values are:

  • Services_Ebay_Session::DEBUG_NONE
  • Services_Ebay_Session::DEBUG_STORE
  • Services_Ebay_Session::DEBUG_PRINT


Parameters:

integer   $debug   — 

[ Top ]

setDetailLevel   [line 337]

void setDetailLevel( integer $level)

set the detail level
  • Access: public

Parameters:

integer   $level   — 

[ Top ]

setErrorLanguage   [line 347]

void setErrorLanguage( string $language)

set the error language
  • Access: public

Parameters:

string   $language   — 

[ Top ]

setSerializerOptions   [line 548]

void setSerializerOptions( [array $opts = array()])

set additional options for the serializer
  • Access: public

Parameters:

array   $opts   — 

[ Top ]

setSiteId   [line 327]

void setSiteId( integer $siteId)

set the site id
  • Access: public

Parameters:

integer   $siteId   — 

[ Top ]

setToken   [line 290]

void setToken( string $token)

set the authentication token
  • Access: public

Parameters:

string   $token   — 

[ Top ]

setUnserializerOptions   [line 558]

void setUnserializerOptions( [array $opts = array()])

set additional options for the unserializer
  • Access: public

Parameters:

array   $opts   — 

[ Top ]

setUrl   [line 317]

void setUrl( string $url)

set the API URL
  • Access: public

Parameters:

string   $url   —  Possible values are:
  • Services_Ebay_Session::URL_SANDBOX
  • Services_Ebay_Session::URL_PRODUCTION
  • Other URLs as applicable

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:49:49 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.