You are here

private function Response::assertHeaders in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-diactoros/src/Response.php \Zend\Diactoros\Response::assertHeaders()

Ensure header names and values are valid.

Parameters

array $headers:

Throws

InvalidArgumentException

1 call to Response::assertHeaders()
Response::__construct in vendor/zendframework/zend-diactoros/src/Response.php

File

vendor/zendframework/zend-diactoros/src/Response.php, line 195

Class

Response
HTTP response encapsulation.

Namespace

Zend\Diactoros

Code

private function assertHeaders(array $headers) {
  foreach ($headers as $name => $headerValues) {
    HeaderSecurity::assertValidName($name);
    array_walk($headerValues, __NAMESPACE__ . '\\HeaderSecurity::assertValid');
  }
}