正在显示
1 个修改的文件
包含
17 行增加
和
6 行删除
@@ -21,7 +21,7 @@ class Folder extends Request{ | @@ -21,7 +21,7 @@ class Folder extends Request{ | ||
21 | * 未读数量 有的邮箱是不会返回未读数量的 | 21 | * 未读数量 有的邮箱是不会返回未读数量的 |
22 | * @var int | 22 | * @var int |
23 | */ | 23 | */ |
24 | - protected int $seen = 0; | 24 | + protected int $unseen = 0; |
25 | 25 | ||
26 | /** | 26 | /** |
27 | * 总数 | 27 | * 总数 |
@@ -63,6 +63,17 @@ class Folder extends Request{ | @@ -63,6 +63,17 @@ class Folder extends Request{ | ||
63 | } | 63 | } |
64 | 64 | ||
65 | 65 | ||
66 | + /** | ||
67 | + * 文件夹名称 | ||
68 | + * @return string | ||
69 | + * @author:dc | ||
70 | + * @time 2024/9/26 11:06 | ||
71 | + */ | ||
72 | + public function getName(){ | ||
73 | + return $this->folder; | ||
74 | + } | ||
75 | + | ||
76 | + | ||
66 | public function exec(): static | 77 | public function exec(): static |
67 | { | 78 | { |
68 | 79 | ||
@@ -85,7 +96,7 @@ class Folder extends Request{ | @@ -85,7 +96,7 @@ class Folder extends Request{ | ||
85 | } | 96 | } |
86 | // 未读 | 97 | // 未读 |
87 | elseif (preg_match("/^\*.*\[UNSEEN (\d+)\]/i",$item,$m)){ | 98 | elseif (preg_match("/^\*.*\[UNSEEN (\d+)\]/i",$item,$m)){ |
88 | - $this->seen = (int) $m[1]; | 99 | + $this->unseen = (int) $m[1]; |
89 | } | 100 | } |
90 | // tag | 101 | // tag |
91 | elseif (preg_match("/^\* FLAGS \((.*)\)$/i",$item,$m)){ | 102 | elseif (preg_match("/^\* FLAGS \((.*)\)$/i",$item,$m)){ |
@@ -137,9 +148,9 @@ class Folder extends Request{ | @@ -137,9 +148,9 @@ class Folder extends Request{ | ||
137 | * 当前文件夹有多少未读数量 | 148 | * 当前文件夹有多少未读数量 |
138 | * @return int | 149 | * @return int |
139 | */ | 150 | */ |
140 | - public function getSeen(): int | 151 | + public function getUnseen(): int |
141 | { | 152 | { |
142 | - return $this->getData('seen'); | 153 | + return $this->getData('unseen'); |
143 | } | 154 | } |
144 | 155 | ||
145 | 156 | ||
@@ -165,13 +176,13 @@ class Folder extends Request{ | @@ -165,13 +176,13 @@ class Folder extends Request{ | ||
165 | } | 176 | } |
166 | switch ($name){ | 177 | switch ($name){ |
167 | case 'total':{return $this->total;} | 178 | case 'total':{return $this->total;} |
168 | - case 'seen':{return $this->seen;} | 179 | + case 'unseen':{return $this->unseen;} |
169 | case 'recent':{return $this->recent;} | 180 | case 'recent':{return $this->recent;} |
170 | case 'flags':{return $this->flags;} | 181 | case 'flags':{return $this->flags;} |
171 | default:{ | 182 | default:{ |
172 | return [ | 183 | return [ |
173 | 'total'=>$this->total, | 184 | 'total'=>$this->total, |
174 | - 'seen'=>$this->seen, | 185 | + 'unseen'=>$this->unseen, |
175 | 'recent'=> $this->recent, | 186 | 'recent'=> $this->recent, |
176 | 'flags'=> $this->flags | 187 | 'flags'=> $this->flags |
177 | ]; | 188 | ]; |
-
请 注册 或 登录 后发表评论