Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | declare(strict_types=1); |
| 3 | /** |
| 4 | * Pop PHP Framework (https://www.popphp.org/) |
| 5 | * |
| 6 | * @link https://github.com/popphp/popphp-framework |
| 7 | * @author Nick Sagona, III <dev@noladev.com> |
| 8 | * @copyright Copyright (c) 2009-2027 NOLA Interactive, LLC. |
| 9 | * @license https://www.popphp.org/license New BSD License |
| 10 | */ |
| 11 | |
| 12 | /** |
| 13 | * @namespace |
| 14 | */ |
| 15 | namespace Pop\Mail\Client; |
| 16 | |
| 17 | use Pop\Http; |
| 18 | |
| 19 | /** |
| 20 | * Http client interface |
| 21 | * |
| 22 | * @category Pop |
| 23 | * @package Pop\Mail |
| 24 | * @author Nick Sagona, III <dev@noladev.com> |
| 25 | * @copyright Copyright (c) 2009-2027 NOLA Interactive, LLC. |
| 26 | * @license https://www.popphp.org/license New BSD License |
| 27 | * @version 5.0.0 |
| 28 | */ |
| 29 | interface HttpClientInterface |
| 30 | { |
| 31 | |
| 32 | /** |
| 33 | * Get messages |
| 34 | * |
| 35 | * @param string $folder |
| 36 | * @param array $search |
| 37 | * @param int $limit |
| 38 | * @throws Exception|Http\Exception|Http\Client\Exception|Http\Client\Handler\Exception |
| 39 | * @return mixed |
| 40 | */ |
| 41 | public function getMessages(string $folder = 'Inbox', array $search = [], int $limit = 10): mixed; |
| 42 | |
| 43 | /** |
| 44 | * Get messages |
| 45 | * |
| 46 | * @param string $messageId |
| 47 | * @param bool $raw |
| 48 | * @throws Exception|Http\Exception|Http\Client\Exception|Http\Client\Handler\Exception |
| 49 | * @return mixed |
| 50 | */ |
| 51 | public function getMessage(string $messageId, bool $raw = false): mixed; |
| 52 | |
| 53 | /** |
| 54 | * Get message attachments |
| 55 | * |
| 56 | * @param string $messageId |
| 57 | * @param string $folder |
| 58 | * @throws Exception|Http\Exception|Http\Client\Exception|Http\Client\Handler\Exception |
| 59 | * @return mixed |
| 60 | */ |
| 61 | public function getAttachments(string $messageId, string $folder = 'Inbox'): mixed; |
| 62 | |
| 63 | /** |
| 64 | * Get message attachment |
| 65 | * |
| 66 | * @param string $messageId |
| 67 | * @param string $attachmentId |
| 68 | * @param string $folder |
| 69 | * @throws Exception|Http\Exception|Http\Client\Exception|Http\Client\Handler\Exception |
| 70 | * @return mixed |
| 71 | */ |
| 72 | public function getAttachment(string $messageId, string $attachmentId, string $folder = 'Inbox'): mixed; |
| 73 | |
| 74 | /** |
| 75 | * Mark message as read |
| 76 | * |
| 77 | * @param string $messageId |
| 78 | * @param bool $isRead |
| 79 | * @throws Exception|Http\Exception|Http\Client\Exception|Http\Client\Handler\Exception |
| 80 | * @return HttpClientInterface |
| 81 | */ |
| 82 | public function markAsRead(string $messageId, bool $isRead = true): HttpClientInterface; |
| 83 | |
| 84 | /** |
| 85 | * Mark message as unread |
| 86 | * |
| 87 | * @param string $messageId |
| 88 | * @throws Exception|Http\Exception|Http\Client\Exception|Http\Client\Handler\Exception |
| 89 | * @return HttpClientInterface |
| 90 | */ |
| 91 | public function markAsUnread(string $messageId): HttpClientInterface; |
| 92 | |
| 93 | } |