public function offsetSet($key, $value) { if (empty($key) or !\is_string($key)) { throw new \InvalidArgumentException("Invalid or missing header name"); } $this->container[\strtolower($key)] = HeaderFactory::create($key, $value); }