/** */ protected function _setValue($value) { parent::_setValue(trim($value)); $val = $this->value; $encoding = Horde_String::lower($val); switch ($encoding) { case '7bit': case '8bit': case 'base64': case 'binary': case 'quoted-printable': // Valid encodings break; default: /* RFC 2045 [6.3] - Valid non-standardized encodings must begin * with 'x-'. */ if (substr($encoding, 0, 2) !== 'x-') { $encoding = self::UNKNOWN_ENCODING; } break; } if ($encoding !== $val) { parent::_setValue($encoding); } }
/** */ protected function _setValue($value) { parent::_setValue($value); $val = $this->value; $cid = '<' . ltrim(rtrim($val, '>'), '<') . '>'; if ($cid !== $val) { parent::_setValue($cid); } }