public function Response::getInfo

Get a cURL transfer information

@link http://www.php.net/manual/en/function.curl-getinfo.php

Parameters

string $key A single statistic to check:

Return value

array|string|null Returns all stats if no key is set, a single stat if a key is set, or null if a key is set and not found

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Message/Response.php, line 255

Class

Response
Guzzle HTTP response object

Namespace

Guzzle\Http\Message

Code

public function getInfo($key = null) {
  if ($key === null) {
    return $this->info;
  }
  elseif (array_key_exists($key, $this->info)) {
    return $this->info[$key];
  }
  else {
    return null;
  }
}