作者 邓超

x

... ... @@ -87,7 +87,7 @@ class Msg extends Request{
*/
public function uid(array|int $uids):static {
$this->isUid = true;
$this->number = is_array($uids) ? $uids : [$uids];
$this->setNumber($uids);
return $this;
}
... ... @@ -100,11 +100,23 @@ class Msg extends Request{
*/
public function msgno(array|int $msgno):static {
$this->isUid = false;
$this->number = is_array($msgno)?$msgno:[$msgno];
$this->setNumber($msgno);
return $this;
}
/**
* 设置邮件编号
* @param array|int $number
* @author:dc
* @time 2024/11/12 9:23
*/
protected function setNumber(array|int $number){
$this->number = array_map(function ($n){
return intval($n);
},is_array($number) ? $number : [$number]);
}
/**
* 搜索
* @param ImapSearch $search
* @return $this
... ...