dmHTTPClient Class Reference

Public Member Functions

Static Public Member Functions


Detailed Description

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


Constructor & Destructor Documentation

dmHTTPClient::__construct ( method = null  ) 
Parameters:
string method dmBridge HTTP API method
Since:
0.1

Definition at line 80 of file dmHTTPClient.class.php.


Member Function Documentation

dmHTTPClient::__toString (  ) 

Equivalent to calling dmHTTPClient::getURI().

Returns:
string

Definition at line 90 of file dmHTTPClient.class.php.

dmHTTPClient::addPOSTData ( key,
value 
) [final]
Parameters:
string key
string value
Returns:
int

Definition at line 181 of file dmHTTPClient.class.php.

dmHTTPClient::GET (  ) 

Retrieves the resource at $this->getURI().

First checks the cache and returns a cached record, if available. Otherwise, performs an HTTP GET. If caching is enabled and self::isCacheEnabled() is true, transparently caches the result.

Exceptions:
dmHTTPException if response code is >= 400
Returns:
string Response body

Definition at line 103 of file dmHTTPClient.class.php.

static dmHTTPClient::getRequestCount (  )  [static]
Returns:
int

Definition at line 34 of file dmHTTPClient.class.php.

dmHTTPClient::getRequestMethod (  )  [final]
Returns:
string

Definition at line 188 of file dmHTTPClient.class.php.

static dmHTTPClient::getRequests (  )  [static]
Returns:
array Array of dmHTTPClient objects

Definition at line 41 of file dmHTTPClient.class.php.

dmHTTPClient::getResponse (  )  [final]
Returns:
string

Definition at line 208 of file dmHTTPClient.class.php.

dmHTTPClient::getResponseCode (  )  [final]
Returns:
int

Definition at line 215 of file dmHTTPClient.class.php.

dmHTTPClient::getTimeout (  )  [final]
Returns:
int seconds

Definition at line 237 of file dmHTTPClient.class.php.

static dmHTTPClient::getTotalTransferTime (  )  [static]
Returns:
float

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

dmHTTPClient::getTransferTime (  )  [final]
Returns:
float HTTP transfer time in microseconds

Definition at line 252 of file dmHTTPClient.class.php.

Referenced by GET(), and POST().

static dmHTTPClient::getUncachedRequests (  )  [static]
Returns:
array Array of dmHTTPClient objects

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

dmHTTPClient::getURI (  )  [final]
Returns:
string
Since:
0.1

Definition at line 260 of file dmHTTPClient.class.php.

Referenced by dmHTTPException::__construct(), and __toString().

dmHTTPClient::isCacheEnabled (  )  [final]
Returns:
Boolean

Definition at line 161 of file dmHTTPClient.class.php.

Referenced by GET().

dmHTTPClient::isReturnTransfer (  )  [final]
Returns:
Boolean

Definition at line 222 of file dmHTTPClient.class.php.

dmHTTPClient::POST (  ) 
Returns:
string

Definition at line 128 of file dmHTTPClient.class.php.

dmHTTPClient::setAPIMethod ( method  )  [final]
Parameters:
string method A dmBridge HTTP API method
See also:
dmHTTPClient::setURI()

Definition at line 149 of file dmHTTPClient.class.php.

Referenced by __construct().

dmHTTPClient::setCacheEnabled ( bool  )  [final]

Whether to enable the API record cache; checked by GET().

If caching is aggressive, the return value will be ignored and caching will always be enabled.

Parameters:
Boolean bool

Definition at line 172 of file dmHTTPClient.class.php.

dmHTTPClient::setReturnTransfer ( bool  )  [final]
Parameters:
Boolean bool

Definition at line 229 of file dmHTTPClient.class.php.

Referenced by __construct().

dmHTTPClient::setTimeout ( int  )  [final]
Parameters:
int int

Definition at line 244 of file dmHTTPClient.class.php.

dmHTTPClient::setURI ( uri  )  [final]
Parameters:
string uri A valid HTTP URI
See also:
dmHTTPClient::setAPIMethod()

Definition at line 268 of file dmHTTPClient.class.php.


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

Generated on Fri Aug 20 13:16:50 2010 for dmBridge PHP API by  doxygen 1.6.1