/** */ 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); } }
/** */ public function __get($name) { switch ($name) { case 'full_value': case 'value': case 'value_single': return strval($this->_values); } return parent::__get($name); }
/** * Perform sanity checking on a header value. * * @param string $data The header data. * * @return string The cleaned header data. */ protected function _sanityCheck($data) { $date = parent::_sanityCheck($data); if (substr(rtrim($date), -5) === ' 0000') { $date = substr(trim($date), 0, strlen(trim($date)) - 5) . ' +0000'; } /* Check for malformed day-of-week parts */ if (!preg_match("/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun),/", $date)) { $date = trim(preg_replace("/^(\\S*,)/", '', $date)); } return $date; }
/** */ public function __get($name) { switch ($name) { case 'full_value': case 'value': case 'value_single': return implode(',', $this->_values); case 'langs': return $this->_values; } return parent::__get($name); }
/** */ public function __get($name) { switch ($name) { case 'full_value': $tmp = $this->value; foreach ($this->_escapeParams($this->params) as $key => $val) { $tmp .= '; ' . $key . '=' . $val; } return $tmp; case 'params': return $this->_params->getArrayCopy(); } return parent::__get($name); }
/** */ public function __construct($name, $value) { parent::__construct('Content-Description', $value); }
/** */ public function __construct($name, $value) { parent::__construct('Date', $value); }
/** */ public function __construct($name, $value) { parent::__construct('Subject', $value); }
/** */ public function __construct($name, $value) { parent::__construct('User-Agent', $value); }
/** */ public function __construct($name, $value) { parent::__construct('MIME-Version', $value); }