[ Index ]

MailPress 544

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

title

Body

[close]

/mp-includes/Swiftmailer/classes/Swift/ -> MimePart.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   * A MIME part, in a multipart message.
  13   *
  14   * @author Chris Corbyn
  15   */
  16  class Swift_MimePart extends Swift_Mime_MimePart
  17  {
  18      /**
  19       * Create a new MimePart.
  20       *
  21       * Details may be optionally passed into the constructor.
  22       *
  23       * @param string $body
  24       * @param string $contentType
  25       * @param string $charset
  26       */
  27      public function __construct($body = null, $contentType = null, $charset = null)
  28      {
  29          call_user_func_array(
  30              array($this, 'Swift_Mime_MimePart::__construct'),
  31              Swift_DependencyContainer::getInstance()
  32                  ->createDependenciesFor('mime.part')
  33              );
  34  
  35          if (!isset($charset)) {
  36              $charset = Swift_DependencyContainer::getInstance()
  37                  ->lookup('properties.charset');
  38          }
  39          $this->setBody($body);
  40          $this->setCharset($charset);
  41          if ($contentType) {
  42              $this->setContentType($contentType);
  43          }
  44      }
  45  
  46      /**
  47       * Create a new MimePart.
  48       *
  49       * @param string $body
  50       * @param string $contentType
  51       * @param string $charset
  52       *
  53       * @return Swift_Mime_MimePart
  54       */
  55      public static function newInstance($body = null, $contentType = null, $charset = null)
  56      {
  57          return new self($body, $contentType, $charset);
  58      }
  59  }


Generated: Thu Apr 28 18:38:52 2016 Cross-referenced by PHPXref 0.7.1