Open Journal Systems
3.3.0
|
Public Member Functions | |
_authenticateRequest (&$ch) | |
_buildHeaders (&$webServiceRequest) | |
_callGetWebService (&$webServiceRequest) | |
_callPostWebService ($webServiceRequest, $usePut=false) | |
_callPostWebServiceAsync ($webServiceRequest, $usePut=false) | |
_checkSSL ($ch, $url) | |
& | call (&$webServiceRequest) |
getLastResponseStatus () | |
setAuthPassword ($authPassword) | |
setAuthUsername ($authUsername) | |
setSslVersion ($sslVersion) | |
Data Fields | |
$_authPassword | |
$_authUsername | |
$_lastResponseStatus | |
$_sslVersion | |
Abstract base class for a web service.
Definition at line 25 of file WebService.inc.php.
WebService::_authenticateRequest | ( | & | $ch | ) |
Adds (optional) authentication information to a curl request
$ch | object Reference to a curl handle. |
Definition at line 320 of file WebService.inc.php.
References $_authPassword, and $_authUsername.
Referenced by _callGetWebService(), and _callPostWebService().
WebService::_buildHeaders | ( | & | $webServiceRequest | ) |
Build and set the headers in a cURL request
$webServiceRequest | WebServiceRequest |
Definition at line 348 of file WebService.inc.php.
Referenced by _callGetWebService(), and _callPostWebServiceAsync().
WebService::_callGetWebService | ( | & | $webServiceRequest | ) |
Call a GET based web services
$webServiceRequest | WebServiceRequest |
Definition at line 198 of file WebService.inc.php.
References _authenticateRequest(), _buildHeaders(), _checkSSL(), and PKPCurlHelper\getCurlObject().
Referenced by call().
WebService::_callPostWebService | ( | $webServiceRequest, | |
$usePut = false |
|||
) |
Call a POST (or PUT) based web services
$webServiceRequest | WebServiceRequest |
$usePut | boolean |
Definition at line 140 of file WebService.inc.php.
References _authenticateRequest(), _checkSSL(), and PKPCurlHelper\getCurlObject().
Referenced by call().
WebService::_callPostWebServiceAsync | ( | $webServiceRequest, | |
$usePut = false |
|||
) |
Execute an asynchronous web service request.
NB: Web services must read the request all at once (i.e. they may not stream content in bit by bit) as we close the connection before we get a response. This also means that web services must be immune to the client closing the connection.
$webServiceRequest | WebServiceRequest |
$usePut | boolean |
Definition at line 262 of file WebService.inc.php.
References $_authPassword, $_authUsername, and _buildHeaders().
Referenced by call().
WebService::_checkSSL | ( | $ch, | |
$url | |||
) |
Configures SSL if necessary.
$ch | object Reference to a curl handle. |
$url | string The URL to access. |
Definition at line 334 of file WebService.inc.php.
Referenced by _callGetWebService(), and _callPostWebService().
& WebService::call | ( | & | $webServiceRequest | ) |
Call a web service
$webServiceRequest | WebServiceRequest |
Reimplemented in XmlWebService.
Definition at line 92 of file WebService.inc.php.
References _callGetWebService(), _callPostWebService(), and _callPostWebServiceAsync().
WebService::getLastResponseStatus | ( | ) |
Returns the last error produced by a web service.
Definition at line 79 of file WebService.inc.php.
References $_lastResponseStatus.
WebService::setAuthPassword | ( | $authPassword | ) |
Sets an (optional) authentication password.
$authPassword | string |
Definition at line 63 of file WebService.inc.php.
WebService::setAuthUsername | ( | $authUsername | ) |
Sets an (optional) authentication username.
$authUsername | string |
Definition at line 55 of file WebService.inc.php.
WebService::setSslVersion | ( | $sslVersion | ) |
Sets an (optional) ssl version.
$sslVersion | int CURL_SSLVERSION_... |
Definition at line 71 of file WebService.inc.php.
string WebService::$_authPassword |
Definition at line 35 of file WebService.inc.php.
Referenced by _authenticateRequest(), and _callPostWebServiceAsync().
string WebService::$_authUsername |
Definition at line 30 of file WebService.inc.php.
Referenced by _authenticateRequest(), and _callPostWebServiceAsync().
integer WebService::$_lastResponseStatus |
Definition at line 46 of file WebService.inc.php.
Referenced by getLastResponseStatus().
int WebService::$_sslVersion |
Definition at line 40 of file WebService.inc.php.