Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
WebServiceRequest Class Reference

Public Member Functions

 getAccept ()
 
 getAsync ()
 
 getHeaders ()
 
 getMethod ()
 
getParams ()
 
 getUrl ()
 
 hasHeader ($header)
 
 setAccept ($accept)
 
 setAsync ($async)
 
 setHeader ($header, $content)
 
 setMethod ($method)
 
 setParams (&$params)
 
 setUrl ($url)
 
 WebServiceRequest ($url, $params=array(), $method= 'GET')
 

Public Attributes

 $_accept
 
 $_async = false
 
 $_headers = array()
 
 $_method
 
 $_params
 

Detailed Description

Represents a web service request.

Definition at line 17 of file WebServiceRequest.inc.php.

Member Function Documentation

WebServiceRequest::getAccept ( )

Get the accept header value

Returns
string

Definition at line 127 of file WebServiceRequest.inc.php.

WebServiceRequest::getAsync ( )

Whether to make an async request.

Returns
boolean

Definition at line 176 of file WebServiceRequest.inc.php.

WebServiceRequest::getHeaders ( )

Get additional request headers.

Definition at line 159 of file WebServiceRequest.inc.php.

WebServiceRequest::getMethod ( )

Get the request method

Returns
string

Definition at line 103 of file WebServiceRequest.inc.php.

& WebServiceRequest::getParams ( )

Get the request parameters

Returns
array

Definition at line 87 of file WebServiceRequest.inc.php.

WebServiceRequest::getUrl ( )

Get the web service URL

Returns
string

Definition at line 71 of file WebServiceRequest.inc.php.

WebServiceRequest::hasHeader (   $header)

Check whether the given header is present in the request.

The check is case insensitive.

Parameters
$headerstring

Definition at line 148 of file WebServiceRequest.inc.php.

WebServiceRequest::setAccept (   $accept)

Set the accept header value

Parameters
$acceptstring

Definition at line 119 of file WebServiceRequest.inc.php.

WebServiceRequest::setAsync (   $async)

Set whether to make an async request. (POST requests only)

Parameters
$asyncboolean

Definition at line 168 of file WebServiceRequest.inc.php.

WebServiceRequest::setHeader (   $header,
  $content 
)

Set an additional request header.

Parameters
$headerstring
$contentstring

Definition at line 136 of file WebServiceRequest.inc.php.

WebServiceRequest::setMethod (   $method)

Set the request method

Parameters
$methodstring

Definition at line 111 of file WebServiceRequest.inc.php.

WebServiceRequest::setParams ( $params)

Set the request parameters

Parameters
$paramsarray

Definition at line 95 of file WebServiceRequest.inc.php.

WebServiceRequest::setUrl (   $url)

Set the web service URL

Parameters
$urlstring

Definition at line 79 of file WebServiceRequest.inc.php.

WebServiceRequest::WebServiceRequest (   $url,
  $params = array(),
  $method = 'GET' 
)

Constructor

Definition at line 57 of file WebServiceRequest.inc.php.

Member Data Documentation

string WebServiceRequest::$_accept

Accept header

Definition at line 40 of file WebServiceRequest.inc.php.

boolean WebServiceRequest::$_async = false

Whether to make an asynchronous request

Definition at line 52 of file WebServiceRequest.inc.php.

array WebServiceRequest::$_headers = array()

Additional request headers

Definition at line 46 of file WebServiceRequest.inc.php.

string WebServiceRequest::$_method

HTTP request method

Definition at line 34 of file WebServiceRequest.inc.php.

array WebServiceRequest::$_params

key value pairs

Definition at line 28 of file WebServiceRequest.inc.php.


The documentation for this class was generated from the following file: