Author: Chris Corbyn
Inheritance: implements Swift_Mime_Header
 /**
  * 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);
 }
 /**
  * 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);
 }
 /**
  * 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);
 }
 /**
  * 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);
 }