[ Index ]

MailPress 7.1

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-includes/composer/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ -> OpenDKIMHeader.php (source)

   1  <?php
   2  
   3  /*
   4   * This file is part of SwiftMailer.
   5   * (c) 2004-2009 Chris Corbyn
   6   *
   7   * For the full copyright and license information, please view the LICENSE
   8   * file that was distributed with this source code.
   9   */
  10  
  11  /**
  12   * An OpenDKIM Specific Header using only raw header datas without encoding.
  13   *
  14   * @author De Cock Xavier <xdecock@gmail.com>
  15   *
  16   * @deprecated since SwiftMailer 6.1.0; use Swift_Signers_DKIMSigner instead.
  17   */
  18  class Swift_Mime_Headers_OpenDKIMHeader implements Swift_Mime_Header
  19  {
  20      /**
  21       * The value of this Header.
  22       *
  23       * @var string
  24       */
  25      private $value;
  26  
  27      /**
  28       * The name of this Header.
  29       *
  30       * @var string
  31       */
  32      private $fieldName;
  33  
  34      /**
  35       * @param string $name
  36       */
  37      public function __construct($name)
  38      {
  39          $this->fieldName = $name;
  40      }
  41  
  42      /**
  43       * Get the type of Header that this instance represents.
  44       *
  45       * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX
  46       * @see TYPE_DATE, TYPE_ID, TYPE_PATH
  47       *
  48       * @return int
  49       */
  50      public function getFieldType()
  51      {
  52          return self::TYPE_TEXT;
  53      }
  54  
  55      /**
  56       * Set the model for the field body.
  57       *
  58       * This method takes a string for the field value.
  59       *
  60       * @param string $model
  61       */
  62      public function setFieldBodyModel($model)
  63      {
  64          $this->setValue($model);
  65      }
  66  
  67      /**
  68       * Get the model for the field body.
  69       *
  70       * This method returns a string.
  71       *
  72       * @return string
  73       */
  74      public function getFieldBodyModel()
  75      {
  76          return $this->getValue();
  77      }
  78  
  79      /**
  80       * Get the (unencoded) value of this header.
  81       *
  82       * @return string
  83       */
  84      public function getValue()
  85      {
  86          return $this->value;
  87      }
  88  
  89      /**
  90       * Set the (unencoded) value of this header.
  91       *
  92       * @param string $value
  93       */
  94      public function setValue($value)
  95      {
  96          $this->value = $value;
  97      }
  98  
  99      /**
 100       * Get the value of this header prepared for rendering.
 101       *
 102       * @return string
 103       */
 104      public function getFieldBody()
 105      {
 106          return $this->value;
 107      }
 108  
 109      /**
 110       * Get this Header rendered as a RFC 2822 compliant string.
 111       *
 112       * @return string
 113       */
 114      public function toString()
 115      {
 116          return $this->fieldName.': '.$this->value."\r\n";
 117      }
 118  
 119      /**
 120       * Set the Header FieldName.
 121       *
 122       * @see Swift_Mime_Header::getFieldName()
 123       */
 124      public function getFieldName()
 125      {
 126          return $this->fieldName;
 127      }
 128  
 129      /**
 130       * Ignored.
 131       */
 132      public function setCharset($charset)
 133      {
 134      }
 135  }


Generated: Mon Mar 11 18:33:33 2019 Cross-referenced by PHPXref 0.7.1