本文整理汇总了PHP中Swift_Mime_Headers_AbstractHeader类的典型用法代码示例。如果您正苦于以下问题:PHP Swift_Mime_Headers_AbstractHeader类的具体用法?PHP Swift_Mime_Headers_AbstractHeader怎么用?PHP Swift_Mime_Headers_AbstractHeader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Swift_Mime_Headers_AbstractHeader类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Creates a new IdentificationHeader with the given $name and $id.
*
* @param string $name
* @param Swift_Mime_Grammar $grammar
*/
public function __construct($name, Swift_Mime_Grammar $grammar)
{
$this->setFieldName($name);
parent::__construct($grammar);
}
示例2: __construct
/**
* Creates a new SimpleHeader with $name.
*
* @param string $name
* @param Swift_Mime_HeaderEncoder $encoder
* @param Swift_Mime_Grammar $grammar
*/
public function __construct($name, Swift_Mime_HeaderEncoder $encoder, Swift_Mime_Grammar $grammar)
{
$this->setFieldName($name);
$this->setEncoder($encoder);
parent::__construct($grammar);
}
示例3: tokenNeedsEncoding
/**
* Redefine the encoding requirements for mailboxes.
*
* Commas and semicolons are used to separate
* multiple addresses, and should therefore be encoded
*
* @param string $token
*
* @return bool
*/
protected function tokenNeedsEncoding($token)
{
return preg_match('/[,;]/', $token) || parent::tokenNeedsEncoding($token);
}
示例4: tokenNeedsEncoding
/**
* Redefine the encoding requirements for mailboxes.
*
* All "specials" must be encoded as the full header value will not be quoted
*
* @see RFC 2822 3.2.1
*
* @param string $token
*
* @return bool
*/
protected function tokenNeedsEncoding($token)
{
return preg_match('/[()<>\\[\\]:;@\\,."]/', $token) || parent::tokenNeedsEncoding($token);
}