TYPO3  7.6
MimePart.php
Go to the documentation of this file.
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 
17 {
27  public function __construct($body = null, $contentType = null, $charset = null)
28  {
29  call_user_func_array(
30  array($this, 'Swift_Mime_MimePart::__construct'),
32  ->createDependenciesFor('mime.part')
33  );
34 
35  if (!isset($charset)) {
37  ->lookup('properties.charset');
38  }
39  $this->setBody($body);
40  $this->setCharset($charset);
41  if ($contentType) {
42  $this->setContentType($contentType);
43  }
44  }
45 
55  public static function newInstance($body = null, $contentType = null, $charset = null)
56  {
57  return new self($body, $contentType, $charset);
58  }
59 }