phpCAS version 1.3.6

Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
CAS_Request_CurlRequest Class Reference
Inheritance diagram for CAS_Request_CurlRequest:

## Public Member Functions
| setCurlOptions (array $options)
| initAndConfigure ()
Public Member Functions inherited from CAS_Request_AbstractRequest
| setUrl ($url)
| addCookie ($name, $value)
| addCookies (array $cookies)
| addHeader ($header)
| addHeaders (array $headers)
| makePost ()
| setPostBody ($body)
| setSslCaCert ($caCertPath, $validate_cn=true)
| send ()
| getResponseHeaders ()
| getResponseStatusCode ()
| getResponseBody ()
| getErrorMessage ()
Public Member Functions inherited from CAS_Request_RequestInterface
| setUrl ($url)
| addCookie ($name, $value)
| addCookies (array $cookies)
| addHeader ($header)
| addHeaders (array $headers)
| makePost ()
| setPostBody ($body)
| setSslCaCert ($caCertPath, $validate_cn=true)
| send ()
| getResponseHeaders ()
| getResponseStatusCode ()
| getResponseBody ()
| getErrorMessage ()

## Protected Member Functions
| sendRequest ()
Protected Member Functions inherited from CAS_Request_AbstractRequest
| sendRequest ()
| storeResponseHeaders (array $headers)
| storeResponseHeader ($header)
| storeResponseBody ($body)
| storeErrorMessage ($message)

## Private Member Functions
| _storeResponseBody ($body)
| _curlReadHeaders ($ch, $header)

## Private Attributes
| $_curlOptions = array()

## Additional Inherited Members
Protected Attributes inherited from CAS_Request_AbstractRequest
| $url = null
| $cookies = array()
| $headers = array()
| $isPost = false
| $postBody = null
| $caCertPath = null
| $validateCN = true

## Detailed Description

Provides support for performing web-requests via curl

Definition at line 40 of file CurlRequest.php.

## Member Function Documentation

## ◆ _curlReadHeaders()

CAS_Request_CurlRequest::_curlReadHeaders | ( |  | $ch,
|  |  | $header
| ) |  |
| private

Internal method for capturing the headers from a curl request.

Parameters

  handle | $ch | handle of curl
  string | $header | header

Returns
  void

Definition at line 195 of file CurlRequest.php.

References CAS_Request_AbstractRequest\storeResponseHeader().

## ◆ _storeResponseBody()

CAS_Request_CurlRequest::_storeResponseBody | ( |  | $body | ) |
| private

Store the response body. This method should NOT be used outside of the CurlRequest or the CurlMultiRequest.

Parameters

  string | $body | body to stor

Returns
  void

Definition at line 182 of file CurlRequest.php.

References CAS_Request_AbstractRequest\storeResponseBody().

## ◆ initAndConfigure()

CAS_Request_CurlRequest::initAndConfigure | ( |  | ) |

Internal method to initialize our cURL handle and configure the request. This method should NOT be used outside of the CurlRequest or the CurlMultiRequest.

Returns
  resource The cURL handle on success, false on failure

Definition at line 102 of file CurlRequest.php.

References phpCAS\trace().

Referenced by sendRequest().

## ◆ sendRequest()

CAS_Request_CurlRequest::sendRequest | ( |  | ) |
| protected

Send the request and store the results.

Returns
  bool true on success, false on failure.

Definition at line 63 of file CurlRequest.php.

References initAndConfigure(), CAS_Request_AbstractRequest\storeErrorMessage(), CAS_Request_AbstractRequest\storeResponseBody(), phpCAS\trace(), phpCAS\traceBegin(), and phpCAS\traceEnd().

## ◆ setCurlOptions()

CAS_Request_CurlRequest::setCurlOptions | ( | array | $options | ) |

Set additional curl options

Parameters

  array | $options | option to set

Returns
  void

Definition at line 52 of file CurlRequest.php.

## Member Data Documentation

## ◆ $_curlOptions

CAS_Request_CurlRequest::$_curlOptions = array()
| private

Definition at line 56 of file CurlRequest.php.