PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / trunk
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress vtrunk
11.1.1 11.1.0 11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 All 62 releases
acymailing / vendor / zbateson / mail-mime-parser / src / Message / NonMimePart.php

NonMimePart.php in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress trunk, at vendor/zbateson/mail-mime-parser/src/Message/NonMimePart.php

86 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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
8 namespace ZBateson\MailMimeParser\Message;
9
10 /**
11 * Represents part of a non-mime message.
12 *
13 * @author Zaahid Bateson
14 */
15 abstract class NonMimePart extends MessagePart
16 {
17 /**
18 * Returns true.
19 *
20 */
21 public function isTextPart() : bool
22 {
23 return true;
24 }
25
26 /**
27 * Returns text/plain
28 *
29 * @return string
30 */
31 public function getContentType(string $default = 'text/plain') : ?string
32 {
33 return $default;
34 }
35
36 /**
37 * Returns ISO-8859-1
38 *
39 * @return string
40 */
41 public function getCharset() : ?string
42 {
43 return 'ISO-8859-1';
44 }
45
46 /**
47 * Returns 'inline'.
48 *
49 * @return string
50 */
51 public function getContentDisposition(?string $default = 'inline') : ?string
52 {
53 return 'inline';
54 }
55
56 /**
57 * Returns '7bit'.
58 *
59 * @return string
60 */
61 public function getContentTransferEncoding(?string $default = '7bit') : ?string
62 {
63 return '7bit';
64 }
65
66 /**
67 * Returns false.
68 *
69 */
70 public function isMime() : bool
71 {
72 return false;
73 }
74
75 /**
76 * Returns the Content ID of the part.
77 *
78 * NonMimeParts do not have a Content ID, and so this simply returns null.
79 *
80 */
81 public function getContentId() : ?string
82 {
83 return null;
84 }
85 }
86