Folders.php 668 字节
<?php


namespace Lib\Imap\Request;

use Lib\Imap\Imap;

/**
 * 文件夹列表
 * @author:dc
 * @time 2024/9/19 13:56
 * Class Folders
 * @package Lib\Imap\Request
 */
class Folders extends Request{

    public function __construct(Imap $imap)
    {
        parent::__construct($imap);
        $this->exec();
    }

    public function exec(): static
    {

        $this->cmd('LIST "" *');

        return $this;
    }

    /**
     * @return \Lib\Imap\Parse\Folder\Folders
     * @author:dc
     * @time 2024/9/20 10:24
     */
    public function get():\Lib\Imap\Parse\Folder\Folders {
        return new \Lib\Imap\Parse\Folder\Folders($this->result);
    }

}