Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 81f1234

Browse files
committed
Fixes DocBlocks in Zend_Mime
1 parent 1de1a7f commit 81f1234

File tree

4 files changed

+127
-37
lines changed

4 files changed

+127
-37
lines changed

library/Zend/Mime.php

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,23 @@ class Zend_Mime
4545
const MULTIPART_MIXED = 'multipart/mixed';
4646
const MULTIPART_RELATED = 'multipart/related';
4747

48+
/**
49+
* Boundary
50+
*
51+
* @var null|string
52+
*/
4853
protected $_boundary;
54+
55+
/**
56+
* @var int
57+
*/
4958
protected static $makeUnique = 0;
5059

51-
// lookup-Tables for QuotedPrintable
60+
/**
61+
* Lookup-Tables for QuotedPrintable
62+
*
63+
* @var array
64+
*/
5265
public static $qpKeys = array(
5366
"\x00","\x01","\x02","\x03","\x04","\x05","\x06","\x07",
5467
"\x08","\x09","\x0A","\x0B","\x0C","\x0D","\x0E","\x0F",
@@ -73,6 +86,9 @@ class Zend_Mime
7386
"\xFF"
7487
);
7588

89+
/**
90+
* @var array
91+
*/
7692
public static $qpReplaceValues = array(
7793
"=00","=01","=02","=03","=04","=05","=06","=07",
7894
"=08","=09","=0A","=0B","=0C","=0D","=0E","=0F",
@@ -97,6 +113,9 @@ class Zend_Mime
97113
"=FF"
98114
);
99115

116+
/**
117+
* @var string
118+
*/
100119
public static $qpKeysString =
101120
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF";
102121

@@ -117,9 +136,9 @@ public static function isPrintable($str)
117136
/**
118137
* Encode a given string with the QUOTED_PRINTABLE mechanism and wrap the lines.
119138
*
120-
* @param string $str
121-
* @param int $lineLength Defaults to {@link LINELENGTH}
122-
* @param int $lineEnd Defaults to {@link LINEEND}
139+
* @param string $str
140+
* @param int $lineLength Line length; defaults to {@link LINELENGTH}
141+
* @param string $lineEnd Line end; defaults to {@link LINEEND}
123142
* @return string
124143
*/
125144
public static function encodeQuotedPrintable($str,
@@ -177,10 +196,10 @@ private static function _encodeQuotedPrintable($str)
177196
* Mail headers depend on an extended quoted printable algorithm otherwise
178197
* a range of bugs can occur.
179198
*
180-
* @param string $str
181-
* @param string $charset
182-
* @param int $lineLength Defaults to {@link LINELENGTH}
183-
* @param int $lineEnd Defaults to {@link LINEEND}
199+
* @param string $str
200+
* @param string $charset
201+
* @param int $lineLength Line length; defaults to {@link LINELENGTH}
202+
* @param string $lineEnd Line end; defaults to {@link LINEEND}
184203
* @return string
185204
*/
186205
public static function encodeQuotedPrintableHeader($str, $charset,
@@ -250,10 +269,10 @@ private static function getNextQuotedPrintableToken($str)
250269
/**
251270
* Encode a given string in mail header compatible base64 encoding.
252271
*
253-
* @param string $str
254-
* @param string $charset
255-
* @param int $lineLength Defaults to {@link LINELENGTH}
256-
* @param int $lineEnd Defaults to {@link LINEEND}
272+
* @param string $str
273+
* @param string $charset
274+
* @param int $lineLength Line length; defaults to {@link LINELENGTH}
275+
* @param string $lineEnd Line end; defaults to {@link LINEEND}
257276
* @return string
258277
*/
259278
public static function encodeBase64Header($str,
@@ -275,9 +294,9 @@ public static function encodeBase64Header($str,
275294
* Encode a given string in base64 encoding and break lines
276295
* according to the maximum linelength.
277296
*
278-
* @param string $str
279-
* @param int $lineLength Defaults to {@link LINELENGTH}
280-
* @param int $lineEnd Defaults to {@link LINEEND}
297+
* @param string $str
298+
* @param int $lineLength Line length; defaults to {@link LINELENGTH}
299+
* @param string $lineEnd Line end; defaults to {@link LINEEND}
281300
* @return string
282301
*/
283302
public static function encodeBase64($str,
@@ -291,8 +310,6 @@ public static function encodeBase64($str,
291310
* Constructor
292311
*
293312
* @param null|string $boundary
294-
* @access public
295-
* @return void
296313
*/
297314
public function __construct($boundary = null)
298315
{
@@ -309,7 +326,7 @@ public function __construct($boundary = null)
309326
*
310327
* @param string $str
311328
* @param string $encoding
312-
* @param string $EOL EOL string; defaults to {@link Zend_Mime::LINEEND}
329+
* @param string $EOL Line end; defaults to {@link Zend_Mime::LINEEND}
313330
* @return string
314331
*/
315332
public static function encode($str, $encoding, $EOL = self::LINEEND)
@@ -343,8 +360,7 @@ public function boundary()
343360
/**
344361
* Return a MIME boundary line
345362
*
346-
* @param mixed $EOL Defaults to {@link LINEEND}
347-
* @access public
363+
* @param string $EOL Line end; defaults to {@link LINEEND}
348364
* @return string
349365
*/
350366
public function boundaryLine($EOL = self::LINEEND)
@@ -355,7 +371,7 @@ public function boundaryLine($EOL = self::LINEEND)
355371
/**
356372
* Return MIME ending
357373
*
358-
* @access public
374+
* @param string $EOL Line end; defaults to {@link LINEEND}
359375
* @return string
360376
*/
361377
public function mimeEnd($EOL = self::LINEEND)

library/Zend/Mime/Decode.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,11 @@ public static function splitContentType($type, $wantedPart = null)
181181
/**
182182
* split a header field like content type in its different parts
183183
*
184-
* @param string $type header field
185-
* @param string $wantedPart the wanted part, else an array with all parts is returned
186-
* @param string $firstName key name for the first part
187-
* @return string|array wanted part or all parts as array($firstName => firstPart, partname => value)
184+
* @param string $field
185+
* @param string $wantedPart the wanted part, else an array with all parts is returned
186+
* @param int|string $firstName key name for the first part
188187
* @throws Zend_Exception
188+
* @return string|array wanted part or all parts as array($firstName => firstPart, partname => value)
189189
*/
190190
public static function splitHeaderField($field, $wantedPart = null, $firstName = 0)
191191
{
@@ -234,8 +234,8 @@ public static function splitHeaderField($field, $wantedPart = null, $firstName =
234234
*
235235
* The charset of the returned string depends on your iconv settings.
236236
*
237-
* @param string encoded string
238-
* @return string decoded string
237+
* @param string $string Encoded string
238+
* @return string Decoded string
239239
*/
240240
public static function decodeQuotedPrintable($string)
241241
{

library/Zend/Mime/Message.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,9 @@ public function getPartContent($partnum, $EOL = Zend_Mime::LINEEND)
195195
*
196196
* Parts consist of the header and the body of each MIME part.
197197
*
198-
* @param string $body
199-
* @param string $boundary
198+
* @param string $body
199+
* @param string $boundary
200+
* @throws Zend_Exception
200201
* @return array
201202
*/
202203
protected static function _disassembleMime($body, $boundary)
@@ -235,9 +236,10 @@ protected static function _disassembleMime($body, $boundary)
235236
* Decodes a MIME encoded string and returns a Zend_Mime_Message object with
236237
* all the MIME parts set according to the given string
237238
*
238-
* @param string $message
239-
* @param string $boundary
240-
* @param string $EOL EOL string; defaults to {@link Zend_Mime::LINEEND}
239+
* @param string $message
240+
* @param string $boundary
241+
* @param string $EOL EOL string; defaults to {@link Zend_Mime::LINEEND}
242+
* @throws Zend_Exception
241243
* @return Zend_Mime_Message
242244
*/
243245
public static function createFromMessage($message, $boundary, $EOL = Zend_Mime::LINEEND)

library/Zend/Mime/Part.php

Lines changed: 77 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,87 @@
3434
*/
3535
class Zend_Mime_Part {
3636

37+
/**
38+
* Type
39+
*
40+
* @var string
41+
*/
3742
public $type = Zend_Mime::TYPE_OCTETSTREAM;
43+
44+
/**
45+
* Encoding
46+
*
47+
* @var string
48+
*/
3849
public $encoding = Zend_Mime::ENCODING_8BIT;
50+
51+
/**
52+
* ID
53+
*
54+
* @var string
55+
*/
3956
public $id;
57+
58+
/**
59+
* Disposition
60+
*
61+
* @var string
62+
*/
4063
public $disposition;
64+
65+
/**
66+
* Filename
67+
*
68+
* @var string
69+
*/
4170
public $filename;
71+
72+
/**
73+
* Description
74+
*
75+
* @var string
76+
*/
4277
public $description;
78+
79+
/**
80+
* Character set
81+
*
82+
* @var string
83+
*/
4384
public $charset;
85+
86+
/**
87+
* Boundary
88+
*
89+
* @var string
90+
*/
4491
public $boundary;
92+
93+
/**
94+
* Location
95+
*
96+
* @var string
97+
*/
4598
public $location;
99+
100+
/**
101+
* Language
102+
*
103+
* @var string
104+
*/
46105
public $language;
106+
107+
/**
108+
* Content
109+
*
110+
* @var mixed
111+
*/
47112
protected $_content;
48-
protected $_isStream = false;
49113

114+
/**
115+
* @var bool
116+
*/
117+
protected $_isStream = false;
50118

51119
/**
52120
* create a new Mime Part.
@@ -86,7 +154,7 @@ public function isStream()
86154
* if this was created with a stream, return a filtered stream for
87155
* reading the content. very useful for large file attachments.
88156
*
89-
* @return stream
157+
* @return mixed Stream
90158
* @throws Zend_Mime_Exception if not a stream or unable to append filter
91159
*/
92160
public function getEncodedStream()
@@ -136,7 +204,9 @@ public function getEncodedStream()
136204
/**
137205
* Get the Content of the current Mime Part in the given encoding.
138206
*
139-
* @return String
207+
* @param string $EOL Line end; defaults to {@link Zend_Mime::LINEEND}
208+
* @throws Zend_Mime_Exception
209+
* @return string
140210
*/
141211
public function getContent($EOL = Zend_Mime::LINEEND)
142212
{
@@ -149,6 +219,7 @@ public function getContent($EOL = Zend_Mime::LINEEND)
149219

150220
/**
151221
* Get the RAW unencoded content from this part
222+
*
152223
* @return string
153224
*/
154225
public function getRawContent()
@@ -163,7 +234,7 @@ public function getRawContent()
163234
/**
164235
* Create and return the array of headers for this MIME part
165236
*
166-
* @access public
237+
* @param string $EOL Line end; defaults to {@link Zend_Mime::LINEEND}
167238
* @return array
168239
*/
169240
public function getHeadersArray($EOL = Zend_Mime::LINEEND)
@@ -216,7 +287,8 @@ public function getHeadersArray($EOL = Zend_Mime::LINEEND)
216287
/**
217288
* Return the headers for this part as a string
218289
*
219-
* @return String
290+
* @param string $EOL Line end; defaults to {@link Zend_Mime::LINEEND}
291+
* @return string
220292
*/
221293
public function getHeaders($EOL = Zend_Mime::LINEEND)
222294
{

0 commit comments

Comments
 (0)