正在显示
1 个修改的文件
包含
9 行增加
和
10 行删除
| @@ -11,7 +11,7 @@ use Lib\Imap\Request\Msg; | @@ -11,7 +11,7 @@ use Lib\Imap\Request\Msg; | ||
| 11 | * Class Messager | 11 | * Class Messager |
| 12 | * @package Lib\Imap\Parse | 12 | * @package Lib\Imap\Parse |
| 13 | */ | 13 | */ |
| 14 | -class Messager implements \IteratorAggregate { | 14 | +class Messager { |
| 15 | 15 | ||
| 16 | /** | 16 | /** |
| 17 | * 原始数据 | 17 | * 原始数据 |
| @@ -52,15 +52,6 @@ class Messager implements \IteratorAggregate { | @@ -52,15 +52,6 @@ class Messager implements \IteratorAggregate { | ||
| 52 | $this->parse(); | 52 | $this->parse(); |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | - /** | ||
| 56 | - * 实现 使用 foreach功能 | ||
| 57 | - * @return \ArrayIterator | ||
| 58 | - * @author:dc | ||
| 59 | - * @time 2024/9/18 10:43 | ||
| 60 | - */ | ||
| 61 | - public function getIterator() { | ||
| 62 | - return new \ArrayIterator($this->item); | ||
| 63 | - } | ||
| 64 | 55 | ||
| 65 | /** | 56 | /** |
| 66 | * 解析 | 57 | * 解析 |
| @@ -197,6 +188,14 @@ class Messager implements \IteratorAggregate { | @@ -197,6 +188,14 @@ class Messager implements \IteratorAggregate { | ||
| 197 | } | 188 | } |
| 198 | 189 | ||
| 199 | 190 | ||
| 191 | + /** | ||
| 192 | + * @return MessageItem[] | ||
| 193 | + * @author:dc | ||
| 194 | + * @time 2024/9/23 14:11 | ||
| 195 | + */ | ||
| 196 | + public function all():array { | ||
| 197 | + return $this->item; | ||
| 198 | + } | ||
| 200 | 199 | ||
| 201 | 200 | ||
| 202 | } | 201 | } |
-
请 注册 或 登录 后发表评论