|
ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Provides support for performing web-requests via curl. More...
Inheritance diagram for CAS_Request_AbstractRequest:
Collaboration diagram for CAS_Request_AbstractRequest: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... | |
| 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. |
Reimplemented from CAS_Request_RequestInterface.
Definition at line 88 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. |
Reimplemented from CAS_Request_RequestInterface.
Definition at line 109 of file AbstractRequest.php.
References $cookies.
| 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. |
Reimplemented from CAS_Request_RequestInterface.
Definition at line 128 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. |
Reimplemented from CAS_Request_RequestInterface.
Definition at line 147 of file AbstractRequest.php.
References $headers.
| CAS_Request_AbstractRequest::getErrorMessage | ( | ) |
Answer a message describing any errors if the request failed.
| CAS_OutOfSequenceException | If called before the Request has been sent. |
Reimplemented from CAS_Request_RequestInterface.
Definition at line 370 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. |
Reimplemented from CAS_Request_RequestInterface.
Definition at line 353 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. |
Reimplemented from CAS_Request_RequestInterface.
Definition at line 310 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. |
Reimplemented from CAS_Request_RequestInterface.
Definition at line 326 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. |
Reimplemented from CAS_Request_RequestInterface.
Definition at line 164 of file AbstractRequest.php.
| CAS_Request_AbstractRequest::send | ( | ) |
Perform the request.
| CAS_OutOfSequenceException | If called multiple times. |
Reimplemented from CAS_Request_RequestInterface.
Definition at line 229 of file AbstractRequest.php.
References sendRequest().
Here is the call graph for this function:
|
abstractprotected |
Send the request and store the results.
Reimplemented in CAS_Request_CurlRequest.
Referenced by send().
Here is the caller graph for this function:| 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. |
Reimplemented from CAS_Request_RequestInterface.
Definition at line 183 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. |
Reimplemented from CAS_Request_RequestInterface.
Definition at line 208 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. |
Reimplemented from CAS_Request_RequestInterface.
Definition at line 68 of file AbstractRequest.php.
References $url.
|
protected |
Add a string to our error message.
| string | $message | message to add |
Definition at line 295 of file AbstractRequest.php.
References $message.
Referenced by CAS_Request_CurlRequest\sendRequest().
Here is the caller graph for this function:
|
protected |
Store the response body.
| string | $body | body to store |
Definition at line 283 of file AbstractRequest.php.
Referenced by CAS_Request_CurlRequest\_storeResponseBody(), and CAS_Request_CurlRequest\sendRequest().
Here is the caller graph for this function:
|
protected |
Store a single response header to our array.
| string | $header | header to store |
Definition at line 271 of file AbstractRequest.php.
References $header.
Referenced by CAS_Request_CurlRequest\_curlReadHeaders().
Here is the caller graph for this function:
|
protected |
Store the response headers.
| array | $headers | headers to store |
Definition at line 259 of file AbstractRequest.php.
References $headers.
|
private |
Definition at line 54 of file AbstractRequest.php.
Referenced by getErrorMessage().
|
private |
Definition at line 53 of file AbstractRequest.php.
Referenced by getResponseBody().
|
private |
Definition at line 52 of file AbstractRequest.php.
Referenced by getResponseHeaders().
|
private |
Definition at line 51 of file AbstractRequest.php.
|
protected |
Definition at line 49 of file AbstractRequest.php.
Referenced by setSslCaCert().
|
protected |
Definition at line 45 of file AbstractRequest.php.
Referenced by addCookies().
|
protected |
Definition at line 46 of file AbstractRequest.php.
Referenced by addHeaders(), and storeResponseHeaders().
|
protected |
Definition at line 47 of file AbstractRequest.php.
|
protected |
Definition at line 48 of file AbstractRequest.php.
|
protected |
Definition at line 44 of file AbstractRequest.php.
Referenced by setUrl().
|
protected |
Definition at line 50 of file AbstractRequest.php.