You are here

public static function EasyRdf_Http::setDefaultHttpClient in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/easyrdf/easyrdf/lib/EasyRdf/Http.php \EasyRdf_Http::setDefaultHttpClient()

Set the HTTP Client object used to fetch RDF data

Parameters

EasyRdf_Http_Client|Zend_Http_Client $httpClient The new HTTP client object:

Return value

EasyRdf_Http_Client|Zend_Http_Client The new HTTP client object

File

vendor/easyrdf/easyrdf/lib/EasyRdf/Http.php, line 56

Class

EasyRdf_Http
Static class to set the HTTP client used by EasyRdf

Code

public static function setDefaultHttpClient($httpClient) {
  if (!is_object($httpClient) or !($httpClient instanceof Zend_Http_Client or $httpClient instanceof EasyRdf_Http_Client)) {
    throw new InvalidArgumentException("\$httpClient should be an object of class Zend_Http_Client or EasyRdf_Http_Client");
  }
  return self::$defaultHttpClient = $httpClient;
}