当前位置: 首页>>代码示例>>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;未经允许,请勿转载。