本文整理汇总了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;
}
}
}
示例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;
}
示例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);
}
}
示例4: getSpecialMailboxes
/**
* Return the list of special mailboxes.
*
* @return @see IMP_Mailbox::getSpecialMailboxes()
*/
public function getSpecialMailboxes()
{
return IMP_Mailbox::getSpecialMailboxes();
}
示例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;
}