ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Provides support for performing web-requests via curl. More...
Public Member Functions | |
setUrl ($url) | |
Set the URL of the Request. More... | |
addCookie ($name, $value) | |
Add a cookie to the request. More... | |
addCookies (array $cookies) | |
Add an array of cookies to the request. More... | |
addHeader ($header) | |
Add a header string to the request. More... | |
addHeaders (array $headers) | |
Add an array of header strings to the request. More... | |
makePost () | |
Make the request a POST request rather than the default GET request. More... | |
setPostBody ($body) | |
Add a POST body to the request. More... | |
setSslCaCert ($caCertPath, $validate_cn=true) | |
Specify the path to an SSL CA certificate to validate the server with. More... | |
send () | |
Perform the request. More... | |
getResponseHeaders () | |
Answer the headers of the response. More... | |
getResponseStatusCode () | |
Answer HTTP status code of the response. More... | |
getResponseBody () | |
Answer the body of response. More... | |
getErrorMessage () | |
Answer a message describing any errors if the request failed. More... | |
Public Member Functions inherited from CAS_Request_RequestInterface | |
setUrl ($url) | |
Set the URL of the Request. More... | |
addCookie ($name, $value) | |
Add a cookie to the request. More... | |
addCookies (array $cookies) | |
Add an array of cookies to the request. More... | |
addHeader ($header) | |
Add a header string to the request. More... | |
addHeaders (array $headers) | |
Add an array of header strings to the request. More... | |
makePost () | |
Make the request a POST request rather than the default GET request. More... | |
setPostBody ($body) | |
Add a POST body to the request. More... | |
setSslCaCert ($caCertPath, $validate_cn=true) | |
Specify the path to an SSL CA certificate to validate the server with. More... | |
send () | |
Perform the request. More... | |
getResponseHeaders () | |
Answer the headers of the response. More... | |
getResponseStatusCode () | |
Answer HTTP status code of the response. More... | |
getResponseBody () | |
Answer the body of response. More... | |
getErrorMessage () | |
Answer a message describing any errors if the request failed. More... | |
Protected Member Functions | |
sendRequest () | |
Send the request and store the results. More... | |
storeResponseHeaders (array $headers) | |
Store the response headers. More... | |
storeResponseHeader ($header) | |
Store a single response header to our array. More... | |
storeResponseBody ($body) | |
Store the response body. More... | |
storeErrorMessage ($message) | |
Add a string to our error message. More... | |
Protected Attributes | |
$url = null | |
$cookies = array() | |
$headers = array() | |
$isPost = false | |
$postBody = null | |
$caCertPath = null | |
$validateCN = true | |
Private Attributes | |
$_sent = false | |
$_responseHeaders = array() | |
$_responseBody = null | |
$_errorMessage = '' | |
Provides support for performing web-requests via curl.
Definition at line 40 of file AbstractRequest.php.
CAS_Request_AbstractRequest::addCookie | ( | $name, | |
$value | |||
) |
Add a cookie to the request.
string | $name | Name of entry |
string | $value | value of entry |
CAS_OutOfSequenceException | If called after the Request has been sent. |
Definition at line 86 of file AbstractRequest.php.
References $name.
CAS_Request_AbstractRequest::addCookies | ( | array | $cookies | ) |
Add an array of cookies to the request.
The cookie array is of the form array('cookie_name' => 'cookie_value', 'cookie_name2' => cookie_value2')
array | $cookies | cookies to add |
CAS_OutOfSequenceException | If called after the Request has been sent. |
Definition at line 107 of file AbstractRequest.php.
CAS_Request_AbstractRequest::addHeader | ( | $header | ) |
Add a header string to the request.
string | $header | Header to add |
CAS_OutOfSequenceException | If called after the Request has been sent. |
Definition at line 126 of file AbstractRequest.php.
References $header.
CAS_Request_AbstractRequest::addHeaders | ( | array | $headers | ) |
Add an array of header strings to the request.
array | $headers | headers to add |
CAS_OutOfSequenceException | If called after the Request has been sent. |
Definition at line 145 of file AbstractRequest.php.
CAS_Request_AbstractRequest::getErrorMessage | ( | ) |
Answer a message describing any errors if the request failed.
CAS_OutOfSequenceException | If called before the Request has been sent. |
Definition at line 369 of file AbstractRequest.php.
References $_errorMessage.
CAS_Request_AbstractRequest::getResponseBody | ( | ) |
Answer the body of response.
CAS_OutOfSequenceException | If called before the Request has been sent. |
Definition at line 352 of file AbstractRequest.php.
References $_responseBody.
CAS_Request_AbstractRequest::getResponseHeaders | ( | ) |
Answer the headers of the response.
CAS_OutOfSequenceException | If called before the Request has been sent. |
Definition at line 308 of file AbstractRequest.php.
References $_responseHeaders.
CAS_Request_AbstractRequest::getResponseStatusCode | ( | ) |
Answer HTTP status code of the response.
CAS_OutOfSequenceException | If called before the Request has been sent. |
Definition at line 324 of file AbstractRequest.php.
CAS_Request_AbstractRequest::makePost | ( | ) |
Make the request a POST request rather than the default GET request.
CAS_OutOfSequenceException | If called after the Request has been sent. |
Definition at line 162 of file AbstractRequest.php.
CAS_Request_AbstractRequest::send | ( | ) |
Perform the request.
CAS_OutOfSequenceException | If called multiple times. |
Definition at line 227 of file AbstractRequest.php.
References sendRequest().
|
abstractprotected |
Send the request and store the results.
Referenced by send().
CAS_Request_AbstractRequest::setPostBody | ( | $body | ) |
Add a POST body to the request.
string | $body | body to add |
CAS_OutOfSequenceException | If called after the Request has been sent. |
Definition at line 181 of file AbstractRequest.php.
CAS_Request_AbstractRequest::setSslCaCert | ( | $caCertPath, | |
$validate_cn = true |
|||
) |
Specify the path to an SSL CA certificate to validate the server with.
string | $caCertPath | path to cert |
bool | $validate_cn | valdiate CN of certificate |
CAS_OutOfSequenceException | If called after the Request has been sent. |
Definition at line 206 of file AbstractRequest.php.
References $caCertPath.
CAS_Request_AbstractRequest::setUrl | ( | $url | ) |
Set the URL of the Request.
string | $url | Url to set |
CAS_OutOfSequenceException | If called after the Request has been sent. |
Definition at line 66 of file AbstractRequest.php.
References $url.
|
protected |
Add a string to our error message.
string | $message | message to add |
Definition at line 293 of file AbstractRequest.php.
References $message.
Referenced by CAS_Request_CurlRequest\sendRequest().
|
protected |
Store the response body.
string | $body | body to store |
Definition at line 281 of file AbstractRequest.php.
Referenced by CAS_Request_CurlRequest\_storeResponseBody(), and CAS_Request_CurlRequest\sendRequest().
|
protected |
Store a single response header to our array.
string | $header | header to store |
Definition at line 269 of file AbstractRequest.php.
References $header.
Referenced by CAS_Request_CurlRequest\_curlReadHeaders().
|
protected |
Store the response headers.
array | $headers | headers to store |
Definition at line 257 of file AbstractRequest.php.
|
private |
Definition at line 52 of file AbstractRequest.php.
Referenced by getErrorMessage().
|
private |
Definition at line 51 of file AbstractRequest.php.
Referenced by getResponseBody().
|
private |
Definition at line 50 of file AbstractRequest.php.
Referenced by getResponseHeaders().
|
private |
Definition at line 49 of file AbstractRequest.php.
|
protected |
Definition at line 47 of file AbstractRequest.php.
Referenced by setSslCaCert().
|
protected |
Definition at line 43 of file AbstractRequest.php.
|
protected |
Definition at line 44 of file AbstractRequest.php.
|
protected |
Definition at line 45 of file AbstractRequest.php.
|
protected |
Definition at line 46 of file AbstractRequest.php.
|
protected |
Definition at line 42 of file AbstractRequest.php.
Referenced by setUrl().
|
protected |
Definition at line 48 of file AbstractRequest.php.