You are here

public function EasyRdf_Http_Client::setConfig in Zircon Profile 8.0

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

Set configuration parameters for this HTTP client

Parameters

array $config:

Return value

EasyRdf_Http_Client

Throws

InvalidArgumentException

1 call to EasyRdf_Http_Client::setConfig()
EasyRdf_Http_Client::__construct in vendor/easyrdf/easyrdf/lib/EasyRdf/Http/Client.php
Constructor method. Will create a new HTTP client. Accepts the target URL and optionally configuration array.

File

vendor/easyrdf/easyrdf/lib/EasyRdf/Http/Client.php, line 161

Class

EasyRdf_Http_Client
This class is an implemetation of an HTTP client in PHP. It supports basic HTTP 1.0 and 1.1 requests. For a more complete implementation try Zend_Http_Client.

Code

public function setConfig($config = array()) {
  if ($config == null or !is_array($config)) {
    throw new InvalidArgumentException("\$config should be an array and cannot be null");
  }
  foreach ($config as $k => $v) {
    $this->config[strtolower($k)] = $v;
  }
  return $this;
}