Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

CurlHttpClient Class Reference
[HTTP related utilities]

Inheritance diagram for CurlHttpClient:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 setOption ($key, $value)
 dropOption ($key)
 getOption ($key)
 setTimeout ($timeout)
 getTimeout ()
 setFollowLocation ($really)
 whether to follow header Location or not
 isFollowLocation ()
 setNoBody ($really)
 hasNoBody ()
 setMaxRedirects ($maxRedirects)
 getMaxRedirects ()
 setMaxFileSize ($maxFileSize)
 getMaxFileSize ()
 addRequest (HttpRequest $request, $options=array())
 getResponse (HttpRequest $request)
 send (HttpRequest $request)
 multiSend ()

Static Public Member Functions

static create ()

Protected Member Functions

 getRequestKey (HttpRequest $request)
 makeHandle (HttpRequest $request, CurlHttpResponse $response)
 makeResponse ($handle, CurlHttpResponse $response)

Private Member Functions

 argumentsToString ($array)

Private Attributes

 $options = array()
 $followLocation = null
 $maxFileSize = null
 $noBody = null
 $multiRequests = array()
 $multiResponses = array()
 $multiThreadOptions = array()

Detailed Description

Definition at line 16 of file CurlHttpClient.class.php.


Member Function Documentation

CurlHttpClient::addRequest ( HttpRequest request,
options = array() 
)
Returns:
CurlHttpClient

Definition at line 154 of file CurlHttpClient.class.php.

References $options, getRequestKey(), and Assert::isArray().

Here is the call graph for this function:

CurlHttpClient::argumentsToString ( array  )  [private]

Definition at line 340 of file CurlHttpClient.class.php.

References Assert::isArray().

Referenced by makeHandle().

Here is the call graph for this function:

static CurlHttpClient::create (  )  [static]
Returns:
CurlHttpClient

Definition at line 30 of file CurlHttpClient.class.php.

Referenced by send().

CurlHttpClient::dropOption ( key  ) 
Returns:
CurlHttpClient

Definition at line 48 of file CurlHttpClient.class.php.

CurlHttpClient::getMaxFileSize (  ) 

Definition at line 146 of file CurlHttpClient.class.php.

CurlHttpClient::getMaxRedirects (  ) 

Implements HttpClient.

Definition at line 129 of file CurlHttpClient.class.php.

CurlHttpClient::getOption ( key  ) 

Definition at line 55 of file CurlHttpClient.class.php.

CurlHttpClient::getRequestKey ( HttpRequest request  )  [protected]

Definition at line 249 of file CurlHttpClient.class.php.

Referenced by addRequest(), and getResponse().

CurlHttpClient::getResponse ( HttpRequest request  ) 
Returns:
CurlHttpResponse

Definition at line 174 of file CurlHttpClient.class.php.

References getRequestKey().

Here is the call graph for this function:

CurlHttpClient::getTimeout (  ) 
Deprecated:
by getOption()

Implements HttpClient.

Definition at line 77 of file CurlHttpClient.class.php.

CurlHttpClient::hasNoBody (  ) 

Definition at line 114 of file CurlHttpClient.class.php.

CurlHttpClient::isFollowLocation (  ) 

Implements HttpClient.

Definition at line 98 of file CurlHttpClient.class.php.

CurlHttpClient::makeHandle ( HttpRequest request,
CurlHttpResponse response 
) [protected]
CurlHttpClient::makeResponse ( handle,
CurlHttpResponse response 
) [protected]
Returns:
CurlHttpClient

Definition at line 322 of file CurlHttpClient.class.php.

References Assert::isNotNull(), and CurlHttpResponse::setStatus().

Referenced by multiSend(), and send().

Here is the call graph for this function:

CurlHttpClient::multiSend (  ) 

Definition at line 210 of file CurlHttpClient.class.php.

References Assert::isNotEmptyArray(), makeHandle(), and makeResponse().

Here is the call graph for this function:

CurlHttpClient::send ( HttpRequest request  ) 
Returns:
HttpResponse

Implements HttpClient.

Definition at line 187 of file CurlHttpClient.class.php.

References create(), makeHandle(), makeResponse(), and setMaxFileSize().

Here is the call graph for this function:

CurlHttpClient::setFollowLocation ( really  ) 

whether to follow header Location or not

Parameters:
$really boolean
Returns:
CurlHttpClient

Implements HttpClient.

Definition at line 91 of file CurlHttpClient.class.php.

References Assert::isBoolean().

Here is the call graph for this function:

CurlHttpClient::setMaxFileSize ( maxFileSize  ) 
Returns:
CurlHttpClient

Definition at line 140 of file CurlHttpClient.class.php.

References $maxFileSize.

Referenced by send().

CurlHttpClient::setMaxRedirects ( maxRedirects  ) 
Returns:
CurlHttpClient

Implements HttpClient.

Definition at line 122 of file CurlHttpClient.class.php.

CurlHttpClient::setNoBody ( really  ) 
Parameters:
$really boolean
Returns:
CurlHttpClient

Definition at line 107 of file CurlHttpClient.class.php.

References Assert::isBoolean().

Here is the call graph for this function:

CurlHttpClient::setOption ( key,
value 
)
Returns:
CurlHttpClient

Definition at line 38 of file CurlHttpClient.class.php.

CurlHttpClient::setTimeout ( timeout  ) 
Parameters:
$timeout in seconds
Returns:
CurlHttpClient

Implements HttpClient.

Definition at line 67 of file CurlHttpClient.class.php.


Member Data Documentation

CurlHttpClient::$followLocation = null [private]

Definition at line 20 of file CurlHttpClient.class.php.

CurlHttpClient::$maxFileSize = null [private]

Definition at line 21 of file CurlHttpClient.class.php.

Referenced by setMaxFileSize().

CurlHttpClient::$multiRequests = array() [private]

Definition at line 23 of file CurlHttpClient.class.php.

CurlHttpClient::$multiResponses = array() [private]

Definition at line 24 of file CurlHttpClient.class.php.

CurlHttpClient::$multiThreadOptions = array() [private]

Definition at line 25 of file CurlHttpClient.class.php.

CurlHttpClient::$noBody = null [private]

Definition at line 22 of file CurlHttpClient.class.php.

CurlHttpClient::$options = array() [private]

Definition at line 18 of file CurlHttpClient.class.php.

Referenced by addRequest(), and makeHandle().


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