Exemplo n.º 1
0
 /**
  * @return int
  */
 public function GetFolderXListType()
 {
     $aFlags = $this->oImapFolder->FlagsLowerCase();
     $iXListType = EFolderType::Custom;
     if (is_array($aFlags)) {
         switch (true) {
             case in_array('\\inbox', $aFlags):
                 $iXListType = EFolderType::Inbox;
                 break;
             case in_array('\\sent', $aFlags):
                 $iXListType = EFolderType::Sent;
                 break;
             case in_array('\\drafts', $aFlags):
                 $iXListType = EFolderType::Drafts;
                 break;
             case in_array('\\junk', $aFlags):
             case in_array('\\spam', $aFlags):
                 $iXListType = EFolderType::Spam;
                 break;
             case in_array('\\bin', $aFlags):
             case in_array('\\trash', $aFlags):
                 $iXListType = EFolderType::Trash;
                 break;
                 //				case in_array('\important', $aFlags):
                 //				case in_array('\starred', $aFlags):
                 //				case in_array('\all', $aFlags):
                 //				case in_array('\archive', $aFlags):
                 //				case in_array('\allmail', $aFlags):
                 //					break;
         }
     }
     return $iXListType;
 }
Exemplo n.º 2
0
 /**
  * @return int
  */
 public function GetFolderListType()
 {
     $aFlags = $this->oImapFolder->FlagsLowerCase();
     $iListType = \MailSo\Imap\Enumerations\FolderType::USER;
     if (\is_array($aFlags)) {
         switch (true) {
             case \in_array('\\inbox', $aFlags) || 'INBOX' === \strtoupper($this->FullNameRaw()):
                 $iListType = \MailSo\Imap\Enumerations\FolderType::INBOX;
                 break;
             case \in_array('\\sent', $aFlags):
             case \in_array('\\sentmail', $aFlags):
                 $iListType = \MailSo\Imap\Enumerations\FolderType::SENT;
                 break;
             case \in_array('\\drafts', $aFlags):
                 $iListType = \MailSo\Imap\Enumerations\FolderType::DRAFTS;
                 break;
             case \in_array('\\junk', $aFlags):
             case \in_array('\\spam', $aFlags):
                 $iListType = \MailSo\Imap\Enumerations\FolderType::JUNK;
                 break;
             case \in_array('\\trash', $aFlags):
             case \in_array('\\bin', $aFlags):
                 $iListType = \MailSo\Imap\Enumerations\FolderType::TRASH;
                 break;
             case \in_array('\\important', $aFlags):
                 $iListType = \MailSo\Imap\Enumerations\FolderType::IMPORTANT;
                 break;
             case \in_array('\\flagged', $aFlags):
             case \in_array('\\starred', $aFlags):
                 $iListType = \MailSo\Imap\Enumerations\FolderType::FLAGGED;
                 break;
             case \in_array('\\all', $aFlags):
             case \in_array('\\allmail', $aFlags):
             case \in_array('\\archive', $aFlags):
                 $iListType = \MailSo\Imap\Enumerations\FolderType::ALL;
                 break;
         }
     }
     return $iListType;
 }
Exemplo n.º 3
0
 /**
  * @return int
  */
 public function GetFolderXListType()
 {
     $aFlags = $this->oImapFolder->FlagsLowerCase();
     $iXListType = \MailSo\Imap\Enumerations\FolderType::USER;
     if (\is_array($aFlags)) {
         switch (true) {
             case \in_array('\\inbox', $aFlags):
                 $iXListType = \MailSo\Imap\Enumerations\FolderType::INBOX;
                 break;
             case \in_array('\\sent', $aFlags):
                 $iXListType = \MailSo\Imap\Enumerations\FolderType::SENT;
                 break;
             case \in_array('\\drafts', $aFlags):
                 $iXListType = \MailSo\Imap\Enumerations\FolderType::DRAFTS;
                 break;
             case \in_array('\\spam', $aFlags):
                 $iXListType = \MailSo\Imap\Enumerations\FolderType::SPAM;
                 break;
             case \in_array('\\bin', $aFlags):
             case \in_array('\\trash', $aFlags):
                 $iXListType = \MailSo\Imap\Enumerations\FolderType::TRASH;
                 break;
             case \in_array('\\important', $aFlags):
                 $iXListType = \MailSo\Imap\Enumerations\FolderType::IMPORTANT;
                 break;
             case \in_array('\\starred', $aFlags):
                 $iXListType = \MailSo\Imap\Enumerations\FolderType::STARRED;
                 break;
             case \in_array('\\all', $aFlags):
             case \in_array('\\archive', $aFlags):
             case \in_array('\\allmail', $aFlags):
                 $iXListType = \MailSo\Imap\Enumerations\FolderType::ARCHIVE;
                 break;
         }
     }
     return $iXListType;
 }