public function offsetSet($key, $value)
{
if (!isset($this->_sent[$key]) || in_array($key, self::$ALLOWED_DUPLICATES)) {
$this->_sent[$key] = true;
if (!isset($value)) {
return;
} elseif ($value instanceof DateTime) {
$value = $value->format(DateTime::RFC1123);
} else {
$value = "{$value}";
}
$this->_out[] = sprintf(self::$HEADER_FORMAT, $key, $value);
}
return $this->_sent[$key] = $value;
}