本文整理汇总了PHP中IMP_Mailbox::getImapMboxOb方法的典型用法代码示例。如果您正苦于以下问题:PHP IMP_Mailbox::getImapMboxOb方法的具体用法?PHP IMP_Mailbox::getImapMboxOb怎么用?PHP IMP_Mailbox::getImapMboxOb使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IMP_Mailbox
的用法示例。
在下文中一共展示了IMP_Mailbox::getImapMboxOb方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __call
/**
* All other calls to this class are routed to the underlying
* Horde_Imap_Client_Base object.
*
* @param string $method Method name.
* @param array $params Method parameters.
*
* @return mixed The return from the requested method.
* @throws BadMethodCallException
* @throws IMP_Imap_Exception
*/
public function __call($method, $params)
{
global $injector;
if (!$this->init) {
/* Fallback for these methods. */
switch ($method) {
case 'getIdsOb':
$ob = new Horde_Imap_Client_Ids();
call_user_func_array(array($ob, 'add'), $params);
return $ob;
}
throw new Horde_Exception_AuthenticationFailure('IMP is marked as authenticated, but no credentials can be found in the session.', Horde_Auth::REASON_SESSION);
}
switch ($method) {
case 'append':
case 'createMailbox':
case 'deleteMailbox':
case 'expunge':
case 'fetch':
case 'getACL':
case 'getMetadata':
case 'getMyACLRights':
case 'getQuota':
case 'getQuotaRoot':
case 'getSyncToken':
case 'setMetadata':
case 'setQuota':
case 'store':
case 'subscribeMailbox':
case 'sync':
case 'thread':
// Horde_Imap_Client_Mailbox: these calls all have the mailbox as
// their first parameter.
$params[0] = IMP_Mailbox::getImapMboxOb($params[0]);
break;
case 'copy':
case 'renameMailbox':
// These calls may hit multiple servers.
$source = IMP_Mailbox::get($params[0]);
$dest = IMP_Mailbox::get($params[1]);
if ($source->remote_account != $dest->remote_account) {
return call_user_func_array(array($this, '_' . $method), $params);
}
// Horde_Imap_Client_Mailbox: these calls all have the mailbox as
// their first two parameters.
$params[0] = $source->imap_mbox_ob;
$params[1] = $dest->imap_mbox_ob;
break;
case 'getNamespaces':
if (isset($this->_temp['ns'])) {
return $this->_temp['ns'];
}
$nsconfig = $this->config->namespace;
$params[0] = is_null($nsconfig) ? array() : $nsconfig;
$params[1] = array('ob_return' => true);
break;
case 'impStatus':
/* Internal method: allows status call with array of mailboxes,
* guaranteeing they are all on this server. */
$params[0] = IMP_Mailbox::getImapMboxOb($params[0]);
$method = 'status';
break;
case 'openMailbox':
$mbox = IMP_Mailbox::get($params[0]);
if ($mbox->search) {
/* Can't open a search mailbox. */
return;
}
$params[0] = $mbox->imap_mbox_ob;
break;
case 'search':
$params = call_user_func_array(array($this, '_search'), $params);
break;
case 'status':
if (is_array($params[0])) {
return $this->_status($params);
}
$params[0] = IMP_Mailbox::getImapMboxOb($params[0]);
break;
default:
if (!method_exists($this->_ob, $method)) {
throw new BadMethodCallException(sprintf('%s: Invalid method call "%s".', __CLASS__, $method));
}
break;
}
try {
$result = call_user_func_array(array($this->_ob, $method), $params);
} catch (Horde_Imap_Client_Exception $e) {
switch ($method) {
//.........这里部分代码省略.........