1 | <?php |
||
5 | class Attachment implements AttachmentInterface |
||
6 | { |
||
7 | protected $path; |
||
8 | protected $name; |
||
9 | protected $content; |
||
10 | protected $mimeType; |
||
11 | |||
12 | /** |
||
13 | * @param string|null $path |
||
14 | * @return AttachmentInterface |
||
15 | */ |
||
16 | public function setPath($path = null) |
||
21 | |||
22 | /** |
||
23 | * @return string|null |
||
24 | */ |
||
25 | public function getPath() |
||
29 | |||
30 | /** |
||
31 | * @param string|null $content |
||
32 | * @return AttachmentInterface |
||
33 | */ |
||
34 | public function setContent($content) |
||
39 | |||
40 | /** |
||
41 | * @return string|null |
||
42 | */ |
||
43 | public function getContent() |
||
47 | |||
48 | /** |
||
49 | * @param string|null $name |
||
50 | * @return AttachmentInterface |
||
51 | */ |
||
52 | public function setName($name) |
||
57 | |||
58 | /** |
||
59 | * @return string|null |
||
60 | */ |
||
61 | public function getName() |
||
69 | |||
70 | /** |
||
71 | * @param string|null $mimeType |
||
72 | * @return AttachmentInterface |
||
73 | */ |
||
74 | public function setMimeType($mimeType) |
||
79 | |||
80 | /** |
||
81 | * @return string|null |
||
82 | */ |
||
83 | public function getMimeType() |
||
87 | } |
||
88 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: