function __construct(MessageCache $cache, Imap $imap) { $this->cache = $cache; $this->imap = $imap; $this->folder = $imap->getConnection()->getMailbox()->getFolder(); }