当前位置: 首页>>代码示例>>PHP>>正文


PHP IMP_Mailbox::hideDeletedMsgs方法代码示例

本文整理汇总了PHP中IMP_Mailbox::hideDeletedMsgs方法的典型用法代码示例。如果您正苦于以下问题:PHP IMP_Mailbox::hideDeletedMsgs方法的具体用法?PHP IMP_Mailbox::hideDeletedMsgs怎么用?PHP IMP_Mailbox::hideDeletedMsgs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IMP_Mailbox的用法示例。


在下文中一共展示了IMP_Mailbox::hideDeletedMsgs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: unseenMessages

 /**
  * Get the list of unseen messages in the mailbox (IMAP UNSEEN flag, with
  * UNDELETED if we're hiding deleted messages).
  *
  * @param integer $results  A Horde_Imap_Client::SEARCH_RESULTS_* constant
  *                          that indicates the desired return type.
  * @param array $opts       Additional options:
  *   - sort: (array) List of sort criteria to use.
  *   - uids: (boolean) Return UIDs instead of sequence numbers (for
  *           $results queries that return message lists).
  *           DEFAULT: false
  *
  * @return mixed  Whatever is requested in $results.
  */
 public function unseenMessages($results, array $opts = array())
 {
     $count = $results == Horde_Imap_Client::SEARCH_RESULTS_COUNT;
     if (empty($this->_sorted)) {
         return $count ? 0 : array();
     }
     $criteria = new Horde_Imap_Client_Search_Query();
     $imp_imap = $this->_mailbox->imp_imap;
     if ($this->_mailbox->hideDeletedMsgs()) {
         $criteria->flag(Horde_Imap_Client::FLAG_DELETED, false);
     } elseif ($count) {
         try {
             $status_res = $imp_imap->status($this->_mailbox, Horde_Imap_Client::STATUS_UNSEEN);
             return $status_res['unseen'];
         } catch (IMP_Imap_Exception $e) {
             return 0;
         }
     }
     $criteria->flag(Horde_Imap_Client::FLAG_SEEN, false);
     try {
         $res = $imp_imap->search($this->_mailbox, $criteria, array('results' => array($results), 'sequence' => empty($opts['uids']), 'sort' => empty($opts['sort']) ? null : $opts['sort']));
         return $count ? $res['count'] : $res;
     } catch (IMP_Imap_Exception $e) {
         return $count ? 0 : array();
     }
 }
开发者ID:DSNS-LAB,项目名称:Dmail,代码行数:40,代码来源:List.php

示例2: moveAfterAction

 /**
  * Increment mailbox index after deleting a message?
  *
  * @param IMP_Mailbox $mailbox  Current mailbox.
  *
  * @return boolean  If true, increments index.
  */
 public function moveAfterAction(IMP_Mailbox $mailbox)
 {
     return !$mailbox->hideDeletedMsgs() && !$GLOBALS['prefs']->getValue('use_trash');
 }
开发者ID:DSNS-LAB,项目名称:Dmail,代码行数:11,代码来源:Ui.php


注:本文中的IMP_Mailbox::hideDeletedMsgs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。