Completed
Push — master ( aab6ae...03b37f )
by Zaahid
04:44
created

NonMimePart::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
/**
3
 * This file is part of the ZBateson\MailMimeParser project.
4
 *
5
 * @license http://opensource.org/licenses/bsd-license.php BSD
6
 */
7
namespace ZBateson\MailMimeParser;
8
9
use ZBateson\MailMimeParser\Header\HeaderFactory;
10
11
/**
12
 * Represents part of a non-mime message.  The part could either be a plain text
13
 * part or a uuencoded attachment and could be extended for other pre-mime
14
 * message encoding types.
15
 * 
16
 * This allows clients to handle all messages as mime messages by providing a
17
 * Content-Type header.  NonMimePart returns text/plain.
18
 * 
19
 * @author Zaahid Bateson <[email protected]>
20
 */
21
class NonMimePart extends MimePart
22
{
23
    /**
24
     * Sets up a default Content-Type header of text/plain.
25
     * 
26
     * @param HeaderFactory $headerFactory
27
     */
28
    public function __construct(HeaderFactory $headerFactory)
29
    {
30
        parent::__construct($headerFactory);
31
        $this->setRawHeader('Content-Type', 'text/plain');
32
    }
33
}
34