You are here

public function EasyRdf_Http_Client::setMethod 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::setMethod()

Set the next request's method

Validated the passed method and sets it.

Parameters

string $method:

Return value

EasyRdf_Http_Client

Throws

InvalidArgumentException

1 call to EasyRdf_Http_Client::setMethod()
EasyRdf_Http_Client::request in vendor/easyrdf/easyrdf/lib/EasyRdf/Http/Client.php
Send the HTTP request and return an HTTP response object

File

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

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 setMethod($method) {
  if (!is_string($method) or !preg_match('/^[A-Z]+$/', $method)) {
    throw new InvalidArgumentException("Invalid HTTP request method.");
  }
  $this->method = $method;
  return $this;
}