public function HttpHeaderBag::add in RESTful 7.2
Add a header to the bag.
Parameters
HttpHeaderInterface $header: The header object or an associative array with the name and value.
Throws
ServerConfigurationException
Overrides HttpHeaderBagInterface::add
1 call to HttpHeaderBag::add()
- HttpHeaderBag::append in src/
Http/ HttpHeaderBag.php - Appends the values of the passed in header to if the header already exists.
File
- src/
Http/ HttpHeaderBag.php, line 82 - Contains \Drupal\restful\Http\HttpHeaderBag.
Class
Namespace
Drupal\restful\HttpCode
public function add(HttpHeaderInterface $header) {
$this->values[$header
->getId()] = $header;
}