Class WSRequest

Description

WSRequest class is used to send web services request to WSGateway class. This class i sa wrapper around REST based requests. It contains methods that is need by the target service and some utility methods.

WSRequest class is used to create the following requests:

<li>Search Request (Keyword and Dicplay Categories Search)</li> <li>Product Details Request</li> <li>Compare Products Request</li> <li>Category Family Request</li> <li>Ajax Request for Lazy Details</li>

WSRequest also provide information about the target service , the service endpoints, method used and the list of paramters required by the request.

This class throws WSException when created WSrequest is not validate.

Located in /models/WSRequest.php (line 30)


	
			
Method Summary
array appendUrlParameters ( $source,  $destination)
WSRequest createCategoryFamilyRequest (array $parameters)
WSRequest createCompareProductRequest (array $parameters)
WSRequest createProductDetailRequest (array $parameters)
unknown createRequestString ()
WSRequest createSearchRequest (array $parameters)
WSRequest createWSAjaxRequest (array $parameters)
string getappId ()
string getEndpoint ()
void getMethod ()
array getParameters ()
unknown getQueryString ()
string getRequestURL ()
string getUri_Base ()
Methods
appendUrlParameters (line 190)

This method is used to append paramters passed from outside WSRequest from any source to destination parameters array.

  • access: public
array appendUrlParameters ( $source,  $destination)
  • array $source
  • array $destination
createCategoryFamilyRequest (line 332)

This method will create request to fetch all categories , there parent and child categories tree.

This method will return WSException::$REQUEST_VALIDATION_ERROR if the created WSRequest is not valdated properly.

  • throws: WSException
  • access: public
WSRequest createCategoryFamilyRequest (array $parameters)
  • array $parameters
createCompareProductRequest (line 363)

This method will create product comparison request. This method will return WSException::$REQUEST_VALIDATION_ERROR if the created WSRequest is not valdated properly.

WSRequest createCompareProductRequest (array $parameters)
  • array $parameters
createProductDetailRequest (line 301)

This method will create product details sheet request. This method will return WSException::$REQUEST_VALIDATION_ERROR if the created WSRequest is not valdated properly.

  • throws: WSException
  • access: public
WSRequest createProductDetailRequest (array $parameters)
  • array $parameters
createRequestString (line 432)

Enter description here...

  • access: public
unknown createRequestString ()
createSearchRequest (line 207)

This method will create keyword search and dicplay category search request depending onthe paramters pass to it. This method will return WSException::$REQUEST_VALIDATION_ERROR if the created WSRequest is not valdated properly.

  • throws: WSException
  • access: public
WSRequest createSearchRequest (array $parameters)
  • array $parameters
createWSAjaxRequest (line 406)

This methid is used to set every ajax call to web service. Parameters are passed to make it flexible of every ajax call.

  • access: public
WSRequest createWSAjaxRequest (array $parameters)
  • array $parameters
getappId (line 114)

Return App ID

  • access: public
string getappId ()
getEndpoint (line 104)

Return the target service endpoint.

  • access: public
string getEndpoint ()
getMethod (line 130)
  • access: public
void getMethod ()
getParameters (line 124)

Get default parameters array of WSRequest object

  • access: public
array getParameters ()
getParametersString (line 140)

Use to prepare paramter string from paramters array.

  • access: public
string getParametersString ()
getQueryString (line 454)

Return string containing the parameters passed to the Web Service.

  • access: public
unknown getQueryString ()
getRequestURL (line 443)

Return request url

  • access: public
string getRequestURL ()
getUri_Base (line 94)

Return URI for webservice.

  • access: public
string getUri_Base ()

Documentation generated on Wed, 13 Feb 2008 01:57:46 +0500 by phpDocumentor 1.4.0a2