1 | <?php |
||
16 | class Swift_Mime_Headers_PathHeader extends Swift_Mime_Headers_AbstractHeader |
||
|
|||
17 | { |
||
18 | /** |
||
19 | * The address in this Header (if specified). |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | private $_address; |
||
24 | |||
25 | /** |
||
26 | * The strict EmailValidator |
||
27 | * |
||
28 | * @var Swift_EmailValidatorBridge |
||
29 | */ |
||
30 | private $_emailValidator; |
||
31 | |||
32 | /** |
||
33 | * Creates a new PathHeader with the given $name. |
||
34 | * |
||
35 | * @param string $name |
||
36 | * @param Swift_EmailValidatorBridge $emailValidator |
||
37 | */ |
||
38 | 41 | public function __construct($name, $emailValidator) |
|
44 | |||
45 | /** |
||
46 | * Get the type of Header that this instance represents. |
||
47 | * |
||
48 | * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX |
||
49 | * @see TYPE_DATE, TYPE_ID, TYPE_PATH |
||
50 | * |
||
51 | * @return int |
||
52 | */ |
||
53 | 1 | public function getFieldType() |
|
57 | |||
58 | /** |
||
59 | * Set the model for the field body. |
||
60 | * This method takes a string for an address. |
||
61 | * |
||
62 | * @param string $model |
||
63 | * |
||
64 | * @throws Swift_RfcComplianceException |
||
65 | */ |
||
66 | 32 | public function setFieldBodyModel($model) |
|
70 | |||
71 | /** |
||
72 | * Get the model for the field body. |
||
73 | * This method returns a string email address. |
||
74 | * |
||
75 | * @return mixed |
||
76 | */ |
||
77 | 2 | public function getFieldBodyModel() |
|
81 | |||
82 | /** |
||
83 | * Set the Address which should appear in this Header. |
||
84 | * |
||
85 | * @param string $address |
||
86 | * |
||
87 | * @throws Swift_RfcComplianceException |
||
88 | */ |
||
89 | 38 | public function setAddress($address) |
|
102 | |||
103 | /** |
||
104 | * Get the address which is used in this Header (if any). |
||
105 | * |
||
106 | * Null is returned if no address is set. |
||
107 | * |
||
108 | * @return string |
||
109 | */ |
||
110 | 4 | public function getAddress() |
|
114 | |||
115 | /** |
||
116 | * Get the string value of the body in this Header. |
||
117 | * |
||
118 | * This is not necessarily RFC 2822 compliant since folding white space will |
||
119 | * not be added at this stage (see {@link toString()} for that). |
||
120 | * |
||
121 | * @see toString() |
||
122 | * |
||
123 | * @return string |
||
124 | */ |
||
125 | 33 | public function getFieldBody() |
|
135 | |||
136 | /** |
||
137 | * Throws an Exception if the address passed does not comply with RFC 2822. |
||
138 | * |
||
139 | * @param string $address |
||
140 | * |
||
141 | * @throws Swift_RfcComplianceException If address is invalid |
||
142 | */ |
||
143 | 35 | private function _assertValidAddress($address) |
|
149 | } |
||
150 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.