Skip to content

Shouldn't setMsgn actually be called setSequenceNumber? #222

Open
@HelloSebastian

Description

Hi @Webklex,

I am confused by the naming of setMsgn or also getMesgn. In the method the position of a message inside the mailbox is set. According to the name in RFC 3501 this number is called "sequence number".

Is there a background why the method was named like this?

As mentioned in #219 (comment), I would like to make this call for getUID "lazy". This will save us from building the uid_cache. This could then be done directly with the name change.

I'm excited to hear your thoughts on this :)

php-imap/src/Message.php

Lines 1380 to 1395 in 6e76b35

/**
* Set the message number
* @param int $msgn
* @param int|null $msglist
*
* @return $this
* @throws Exceptions\MessageNotFoundException
* @throws Exceptions\ConnectionFailedException
*/
public function setMsgn(int $msgn, int $msglist = null): Message {
$this->msgn = $msgn;
$this->msglist = $msglist;
$this->uid = $this->client->getConnection()->getUid($this->msgn);
return $this;
}

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions