本文整理汇总了PHP中Swift_Message::getCharset方法的典型用法代码示例。如果您正苦于以下问题:PHP Swift_Message::getCharset方法的具体用法?PHP Swift_Message::getCharset怎么用?PHP Swift_Message::getCharset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Swift_Message
的用法示例。
在下文中一共展示了Swift_Message::getCharset方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderMessageInformation
protected function renderMessageInformation(Swift_Message $message)
{
static $i = 0;
$i++;
$to = null === $message->getTo() ? '' : implode(', ', array_keys($message->getTo()));
$html = array();
$html[] = sprintf('<h3>%s (to: %s) %s</h3>', $message->getSubject(), $to, $this->getToggler('sfWebDebugMailTemplate' . $i));
$html[] = '<div id="sfWebDebugMailTemplate' . $i . '" style="display:' . (1 == $i ? 'block' : 'none') . '">';
$html[] = '<pre>' . htmlentities($message->toString(), ENT_QUOTES, $message->getCharset()) . '</pre>';
$html[] = '</div>';
return implode("\n", $html);
}
示例2: createMessage
/**
* @param Swift_Message $message
*
* @return Swift_Message
*/
protected function createMessage(Swift_Message $message)
{
$mimeEntity = new Swift_Message('', $message->getBody(), $message->getContentType(), $message->getCharset());
$mimeEntity->setChildren($message->getChildren());
$messageHeaders = $mimeEntity->getHeaders();
$messageHeaders->remove('Message-ID');
$messageHeaders->remove('Date');
$messageHeaders->remove('Subject');
$messageHeaders->remove('MIME-Version');
$messageHeaders->remove('To');
$messageHeaders->remove('From');
return $mimeEntity;
}
示例3: getCharset
/**
* Get the charset of the charset to use in the message
* @return string
*/
public function getCharset()
{
return $this->message->getCharset();
}