Swift_MimePart::__construct PHP Method

__construct() public method

Details may be optionally passed into the constructor.
public __construct ( string $body = null, string $contentType = null, string $charset = null )
$body string
$contentType string
$charset string
    public function __construct($body = null, $contentType = null, $charset = null)
    {
        call_user_func_array(array($this, 'Swift_Mime_MimePart::__construct'), Swift_DependencyContainer::getInstance()->createDependenciesFor('mime.part'));
        if (!isset($charset)) {
            $charset = Swift_DependencyContainer::getInstance()->lookup('properties.charset');
        }
        $this->setBody($body);
        $this->setCharset($charset);
        if ($contentType) {
            $this->setContentType($contentType);
        }
    }