You are here

private function RequestTrait::assertHeaders in Zircon Profile 8.0

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

Ensure header names and values are valid.

Parameters

array $headers:

Throws

InvalidArgumentException

1 call to RequestTrait::assertHeaders()
RequestTrait::initialize in vendor/zendframework/zend-diactoros/src/RequestTrait.php
Initialize request state.

File

vendor/zendframework/zend-diactoros/src/RequestTrait.php, line 302

Class

RequestTrait
Trait with common request behaviors.

Namespace

Zend\Diactoros

Code

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