[ Index ]

MailPress 7.2

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

title

Body

[close]

/mp-includes/composer/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/ -> RawContentEncoder.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   * Handles raw Transfer Encoding in Swift Mailer.
  13   *
  14   * When sending 8-bit content over SMTP, you should use
  15   * Swift_Transport_Esmtp_EightBitMimeHandler to enable the 8BITMIME SMTP
  16   * extension.
  17   *
  18   * @author Sebastiaan Stok <s.stok@rollerscapes.net>
  19   */
  20  class Swift_Mime_ContentEncoder_RawContentEncoder implements Swift_Mime_ContentEncoder
  21  {
  22      /**
  23       * Encode a given string to produce an encoded string.
  24       *
  25       * @param string $string
  26       * @param int    $firstLineOffset ignored
  27       * @param int    $maxLineLength   ignored
  28       *
  29       * @return string
  30       */
  31      public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0)
  32      {
  33          return $string;
  34      }
  35  
  36      /**
  37       * Encode stream $in to stream $out.
  38       *
  39       * @param int $firstLineOffset ignored
  40       * @param int $maxLineLength   ignored
  41       */
  42      public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0)
  43      {
  44          while (false !== ($bytes = $os->read(8192))) {
  45              $is->write($bytes);
  46          }
  47      }
  48  
  49      /**
  50       * Get the name of this encoding scheme.
  51       *
  52       * @return string
  53       */
  54      public function getName()
  55      {
  56          return 'raw';
  57      }
  58  
  59      /**
  60       * Not used.
  61       */
  62      public function charsetChanged($charset)
  63      {
  64      }
  65  }


Generated: Tue May 19 15:55:14 2020 Cross-referenced by PHPXref 0.7.1