當前位置: 首頁>>代碼示例>>PHP>>正文


PHP IMP_Mailbox::getSpecialMailboxes方法代碼示例

本文整理匯總了PHP中IMP_Mailbox::getSpecialMailboxes方法的典型用法代碼示例。如果您正苦於以下問題:PHP IMP_Mailbox::getSpecialMailboxes方法的具體用法?PHP IMP_Mailbox::getSpecialMailboxes怎麽用?PHP IMP_Mailbox::getSpecialMailboxes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在IMP_Mailbox的用法示例。


在下文中一共展示了IMP_Mailbox::getSpecialMailboxes方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: execute

 /**
  * Autocreate special mailboxes on login.
  */
 public function execute()
 {
     foreach (IMP_Mailbox::getSpecialMailboxes() as $key => $val) {
         if (is_null($val)) {
             continue;
         }
         switch ($key) {
             case IMP_Mailbox::SPECIAL_COMPOSETEMPLATES:
                 $val->create();
                 break;
             case IMP_Mailbox::SPECIAL_DRAFTS:
                 $val->create(array('special_use' => array(Horde_Imap_Client::SPECIALUSE_DRAFTS)));
                 break;
             case IMP_Mailbox::SPECIAL_SENT:
                 foreach ($val as $mbox) {
                     $mbox->create(array('special_use' => array(Horde_Imap_Client::SPECIALUSE_SENT)));
                 }
                 break;
             case IMP_Mailbox::SPECIAL_SPAM:
                 $val->create(array('special_use' => array(Horde_Imap_Client::SPECIALUSE_JUNK)));
                 break;
             case IMP_Mailbox::SPECIAL_TRASH:
                 $val->create(array('special_use' => array(Horde_Imap_Client::SPECIALUSE_TRASH)));
                 break;
         }
     }
 }
開發者ID:DSNS-LAB,項目名稱:Dmail,代碼行數:30,代碼來源:Autocreate.php

示例2: searchMailboxes

 /**
  * Return the mailboxes that can be searched to find the sent message.
  *
  * @return array  Array of mailboxes to search in order of priority.
  */
 public function searchMailboxes()
 {
     $special = IMP_Mailbox::getSpecialMailboxes();
     /* Check for sent-mail mailbox(es) first. */
     $out = $special[IMP_Mailbox::SPECIAL_SENT];
     /* Add trash mailbox as backup. */
     if (!empty($special[IMP_Mailbox::SPECIAL_TRASH]) && !$special[IMP_Mailbox::SPECIAL_TRASH]->vtrash) {
         $out[] = $special[IMP_Mailbox::SPECIAL_TRASH];
     }
     return $out;
 }
開發者ID:raz0rsdge,項目名稱:horde,代碼行數:16,代碼來源:Sentmail.php

示例3: updateFetchIgnore

 /**
  * Update the list of mailboxes to ignore when caching FETCH data in the
  * IMAP client object.
  */
 public function updateFetchIgnore()
 {
     if ($this->isImap()) {
         $special = IMP_Mailbox::getSpecialMailboxes();
         $cache = $this->_ob->getParam('cache');
         $cache['fetch_ignore'] = array_filter(array(strval($special[IMP_Mailbox::SPECIAL_SPAM]), strval($special[IMP_Mailbox::SPECIAL_TRASH])));
         $this->_ob->setParam('cache', $cache);
     }
 }
開發者ID:jubinpatel,項目名稱:horde,代碼行數:13,代碼來源:Imap.php

示例4: getSpecialMailboxes

 /**
  * Return the list of special mailboxes.
  *
  * @return @see IMP_Mailbox::getSpecialMailboxes()
  */
 public function getSpecialMailboxes()
 {
     return IMP_Mailbox::getSpecialMailboxes();
 }
開發者ID:raz0rsdge,項目名稱:horde,代碼行數:9,代碼來源:Api.php

示例5: searchMailboxes

 /**
  * Return the mailboxes that can be searched to find the sent message.
  *
  * @return array  Array of mailboxes to search in order of priority.
  */
 public function searchMailboxes()
 {
     $special = IMP_Mailbox::getSpecialMailboxes();
     /* Check for sent-mail mailbox(es) first. */
     $out = array();
     if ($this->folder) {
         $out[] = new IMP_Mailbox($this->folder);
     }
     $out = array_unique(array_merge($out, $special[IMP_Mailbox::SPECIAL_SENT]));
     /* Add trash mailbox as backup. */
     if (!empty($special[IMP_Mailbox::SPECIAL_TRASH]) && !$special[IMP_Mailbox::SPECIAL_TRASH]->vtrash) {
         $out[] = $special[IMP_Mailbox::SPECIAL_TRASH];
     }
     return $out;
 }
開發者ID:horde,項目名稱:horde,代碼行數:20,代碼來源:Sentmail.php


注:本文中的IMP_Mailbox::getSpecialMailboxes方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。