本文整理汇总了PHP中IMP_Mailbox::fromBuids方法的典型用法代码示例。如果您正苦于以下问题:PHP IMP_Mailbox::fromBuids方法的具体用法?PHP IMP_Mailbox::fromBuids怎么用?PHP IMP_Mailbox::fromBuids使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IMP_Mailbox
的用法示例。
在下文中一共展示了IMP_Mailbox::fromBuids方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor.
*
* @param mixed Two possible inputs:
* - 1 argument: Horde_Variables object. These GET/POST parameters are
* reserved in IMP:
* - buid: (string) BUID [Browser UID].
* - mailbox: (string) Base64url encoded mailbox.
* - muid: (string) MUID [Mailbox + UID].
* - uid: (string) UID [Actual mail UID].
* - 2 arguments: IMP_Mailbox object, IMP_Indices argument
*/
public function __construct()
{
$args = func_get_args();
switch (func_num_args()) {
case 1:
if ($args[0] instanceof Horde_Variables) {
if (isset($args[0]->mailbox) && strlen($args[0]->mailbox)) {
$this->mailbox = IMP_Mailbox::formFrom($args[0]->mailbox);
if (isset($args[0]->buid)) {
$this->buids = new IMP_Indices($this->mailbox, $args[0]->buid);
parent::__construct($this->mailbox->fromBuids($this->buids));
} elseif (isset($args[0]->uid)) {
parent::__construct($this->mailbox, $args[0]->uid);
}
}
if (isset($args[0]->muid)) {
parent::__construct($args[0]->muid);
}
}
break;
case 2:
if ($args[0] instanceof IMP_Mailbox && $args[1] instanceof IMP_Indices) {
$this->mailbox = $args[0];
$this->buids = $args[0]->toBuids($args[1]);
parent::__construct($args[1]);
}
break;
}
if (!isset($this->buids)) {
$this->buids = new IMP_Indices();
}
if (!isset($this->mailbox)) {
$this->mailbox = IMP_Mailbox::get('INBOX');
}
}
示例2: __construct
/**
* Constructor.
*
* @param mixed Two possible inputs:
* - 1 argument: Horde_Variables object. These GET/POST parameters are
* reserved in IMP:
* - buid: (string) BUID [Browser UID].
* - mailbox: (string) Base64url encoded mailbox.
* - muid: (string) MUID [Mailbox + UID].
* - uid: (string) UID [Actual mail UID].
* - 2 arguments: IMP_Mailbox object, IMP_Indices argument
*/
public function __construct()
{
$args = func_get_args();
switch (func_num_args()) {
case 1:
if ($args[0] instanceof Horde_Variables) {
if (isset($args[0]->mailbox) && strlen($args[0]->mailbox)) {
$this->mailbox = IMP_Mailbox::formFrom($args[0]->mailbox);
if (isset($args[0]->buid)) {
/* BUIDs are always integers. Do conversion here since
* POP3 won't work otherwise. */
$tmp = new Horde_Imap_Client_Ids($args[0]->buid);
$this->buids = new IMP_Indices($this->mailbox, $tmp->ids);
parent::__construct($this->mailbox->fromBuids($this->buids));
} elseif (isset($args[0]->uid)) {
parent::__construct($this->mailbox, $args[0]->uid);
}
}
if (isset($args[0]->muid)) {
parent::__construct($args[0]->muid);
}
}
break;
case 2:
if ($args[0] instanceof IMP_Mailbox && $args[1] instanceof IMP_Indices) {
$this->mailbox = $args[0];
$this->buids = $args[0]->toBuids($args[1]);
parent::__construct($args[1]);
}
break;
}
if (!isset($this->buids)) {
$this->buids = new IMP_Indices($this->_indices);
}
if (!isset($this->mailbox)) {
$this->mailbox = IMP_Mailbox::get('INBOX');
}
}