Passed
Push — 1.0.0 ( a1adee...bca153 )
by Zaahid
03:20
created

Configuration::getContentCharset()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
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\Util;
8
9
/**
10
 * Holds global configuration options.
11
 *
12
 * @author Zaahid Bateson
13
 */
14
class Configuration
15
{
16
    /**
17
     * @var string the charset used for returning content strings, e.g.
18
     *      $part->getContent or $part->getResourceContentHandle
19
     */
20
    private $contentCharset;
21
    
22
    /**
23
     * Sets the charset of returned strings in content returned from calls to
24
     * MimePart (e.g. getContent or getContentResourceHandle)
25
     * 
26
     * @param string $contentCharset
27
     */
28
    public function setContentCharset($contentCharset)
29
    {
30
        $this->contentCharset = $contentCharset;
31
    }
32
33
    /**
34
     * Returns the charset for returned strings in content returned from calls
35
     * to MimePart (e.g. getContent or getContentResourceHandle)
36
     * 
37
     * @return string
38
     */
39
    public function getContentCharset()
40
    {
41
        return $this->contentCharset;
42
    }
43
}
44