1 | <?php |
||
14 | abstract class HeaderPart |
||
15 | { |
||
16 | /** |
||
17 | * @var string the value of the part |
||
18 | */ |
||
19 | protected $value; |
||
20 | |||
21 | /** |
||
22 | * Returns the part's value. |
||
23 | * |
||
24 | * @return string the value of the part |
||
25 | */ |
||
26 | 13 | public function getValue() |
|
30 | |||
31 | /** |
||
32 | * Returns the value of the part (which is a string). |
||
33 | * |
||
34 | * @return string the value |
||
35 | */ |
||
36 | 2 | public function __toString() |
|
40 | |||
41 | /** |
||
42 | * Returns true if spaces before this part should be ignored. True is only |
||
43 | * returned for MimeLiterals if the part begins with a mime-encoded string, |
||
44 | * Tokens if the Token's value is a single space, and for CommentParts. |
||
45 | * |
||
46 | * @return bool |
||
47 | */ |
||
48 | 1 | public function ignoreSpacesBefore() |
|
49 | { |
||
50 | 1 | return false; |
|
51 | } |
||
52 | |||
53 | /** |
||
54 | * Returns true if spaces after this part should be ignored. True is only |
||
55 | * returned for MimeLiterals if the part ends with a mime-encoded string |
||
56 | * Tokens if the Token's value is a single space, and for CommentParts. |
||
57 | * |
||
58 | * @return bool |
||
59 | */ |
||
60 | 1 | public function ignoreSpacesAfter() |
|
64 | |||
65 | /** |
||
66 | * Ensures the encoding of the passed string is set to UTF-8. |
||
67 | * |
||
68 | * @param string $str |
||
69 | * @return string utf-8 string |
||
70 | */ |
||
71 | 18 | protected function convertEncoding($str) |
|
78 | } |
||
79 |