Author: Chris Corbyn
Inheritance: extends Swift_Mime_Headers_AbstractHeader
Exemplo n.º 1
0
 /**
  * Create a new Date header using $timestamp (UNIX time).
  * @param string $name
  * @param int $timestamp
  * @return Swift_Mime_Header
  */
 public function createDateHeader($name, $timestamp = null)
 {
     $header = new Swift_Mime_Headers_DateHeader($name);
     if (isset($timestamp)) {
         $header->setFieldBodyModel($timestamp);
     }
     $this->_setHeaderCharset($header);
     return $header;
 }
 /**
  * Create a new Date header using $dateTime.
  *
  * @param string                 $name
  * @param DateTimeInterface|null $dateTime
  *
  * @return Swift_Mime_Header
  */
 public function createDateHeader($name, DateTimeInterface $dateTime = null)
 {
     $header = new Swift_Mime_Headers_DateHeader($name);
     if (isset($dateTime)) {
         $header->setFieldBodyModel($dateTime);
     }
     $this->setHeaderCharset($header);
     return $header;
 }