XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
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 
11 //@require 'Swift/Mime/MimePart.php';
12 //@require 'Swift/DependencyContainer.php';
13 
21 {
22 
30  public function __construct($body = null, $contentType = null,
31  $charset = null)
32  {
33  call_user_func_array(
34  array($this, 'Swift_Mime_MimePart::__construct'),
36  ->createDependenciesFor('mime.part')
37  );
38 
39  if (!isset($charset))
40  {
42  ->lookup('properties.charset');
43  }
44  $this->setBody($body);
45  $this->setCharset($charset);
46  if ($contentType)
47  {
48  $this->setContentType($contentType);
49  }
50  }
51 
59  public static function newInstance($body = null, $contentType = null,
60  $charset = null)
61  {
62  return new self($body, $contentType, $charset);
63  }
64 
65 }