/** * Fetches mail ids from server */ protected function fetchMails() { $this->connection->getDriver()->switchMailbox($this->mailbox->getName()); $ids = $this->connection->getDriver()->getMailIds($this->filters, $this->limit, $this->offset, $this->orderBy, $this->orderType); $i = 0; $this->mails = array(); $this->iterator = 0; $this->mailIndexes = array(); foreach ($ids as $id) { $this->mails[$id] = new Mail($this->connection, $this->mailbox, $id); $this->mailIndexes[$i++] = $id; } }
protected function initializeFlags() { $this->connection->getDriver()->switchMailbox($this->mailbox->getName()); $this->flags = $this->connection->getDriver()->getFlags($this->id); }