You are here

public function Session::getResponseHeader in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/behat/mink/src/Session.php \Behat\Mink\Session::getResponseHeader()

Returns specific response header.

Parameters

string $name:

Return value

string|null

File

vendor/behat/mink/src/Session.php, line 185

Class

Session
Mink session.

Namespace

Behat\Mink

Code

public function getResponseHeader($name) {
  $headers = $this->driver
    ->getResponseHeaders();
  $name = strtolower($name);
  $headers = array_change_key_case($headers, CASE_LOWER);
  if (!isset($headers[$name])) {
    return null;
  }
  return is_array($headers[$name]) ? $headers[$name][0] : $headers[$name];
}