@@ -52,8 +52,7 @@ |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | $iterate($part); |
| 55 | - } |
|
| 56 | - else { |
|
| 55 | + } else { |
|
| 57 | 56 | $parts[] = $part; |
| 58 | 57 | } |
| 59 | 58 | } |
@@ -103,8 +103,7 @@ |
||
| 103 | 103 | $structure, |
| 104 | 104 | [1] |
| 105 | 105 | ); |
| 106 | - } |
|
| 107 | - else { |
|
| 106 | + } else { |
|
| 108 | 107 | foreach ($structure->parts as $n => $part) { |
| 109 | 108 | $this->parts[] = $this->createMessagePart( |
| 110 | 109 | $part, |
@@ -9,6 +9,12 @@ discard block |
||
| 9 | 9 | |
| 10 | 10 | protected $resource; // imap_open() resource |
| 11 | 11 | |
| 12 | + /** |
|
| 13 | + * @param string $server |
|
| 14 | + * @param string $username |
|
| 15 | + * @param string $password |
|
| 16 | + * @param string $mailbox |
|
| 17 | + */ |
|
| 12 | 18 | public function open( $server, $username, $password, $mailbox, array $flags ) { |
| 13 | 19 | if ( !empty($flags) ) { |
| 14 | 20 | $server .= '/' . implode('/', $flags); |
@@ -34,6 +40,9 @@ discard block |
||
| 34 | 40 | return imap_utf8($string); |
| 35 | 41 | } |
| 36 | 42 | |
| 43 | + /** |
|
| 44 | + * @param integer $msgNumber |
|
| 45 | + */ |
|
| 37 | 46 | public function headerinfo( $msgNumber ) { |
| 38 | 47 | return $this->iteratorToLowercaseArray(imap_headerinfo($this->resource, $msgNumber)); |
| 39 | 48 | } |
@@ -46,10 +55,17 @@ discard block |
||
| 46 | 55 | return imap_setflag_full($this->resource, $msgNumber, $flag); |
| 47 | 56 | } |
| 48 | 57 | |
| 58 | + /** |
|
| 59 | + * @param integer $msgNumber |
|
| 60 | + */ |
|
| 49 | 61 | public function fetchstructure( $msgNumber ) { |
| 50 | 62 | return imap_fetchstructure($this->resource, $msgNumber); |
| 51 | 63 | } |
| 52 | 64 | |
| 65 | + /** |
|
| 66 | + * @param integer $msgNumber |
|
| 67 | + * @param string $section |
|
| 68 | + */ |
|
| 53 | 69 | public function fetchbody( $msgNumber, $section ) { |
| 54 | 70 | return quoted_printable_decode(imap_fetchbody($this->resource, $msgNumber, $section, FT_PEEK)); |
| 55 | 71 | } |
@@ -58,6 +74,9 @@ discard block |
||
| 58 | 74 | return imap_expunge($this->resource); |
| 59 | 75 | } |
| 60 | 76 | |
| 77 | + /** |
|
| 78 | + * @param integer $msgNumber |
|
| 79 | + */ |
|
| 61 | 80 | public function delete( $msgNumber ) { |
| 62 | 81 | return imap_delete($this->resource, $msgNumber); |
| 63 | 82 | } |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | interface IMAPTransportInterface { |
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | - * @return rdx\imap\IMAPTransportInterface |
|
| 8 | + * @return IMAPTransport |
|
| 9 | 9 | */ |
| 10 | 10 | public function open( $server, $username, $password, $mailbox, array $flags ); |
| 11 | 11 | |