IMP_Remote
in package
implements
ArrayAccess, IteratorAggregate
Interface to deal with storing connection details of remote accounts.
Tags
Table of Contents
Interfaces
- ArrayAccess
- IteratorAggregate
Constants
- MBOX_PREFIX = "remotembox\x00"
Properties
- $_accounts : array<string|int, mixed>
- The list of remote accounts.
Methods
- __construct() : mixed
- Constructor.
- getIterator() : Traversable
- getMailboxById() : string
- Return the IMAP mailbox name for the given remote mailbox identifier.
- getRemoteById() : mixed
- Return the remote account for a valid remote mailbox/identifier.
- isRemoteMbox() : bool
- Is the given mailbox a remote mailbox?
- label() : string
- Return the label for the given mailbox.
- offsetExists() : bool
- Does the account ID exist?
- offsetGet() : array<string|int, mixed>
- Retrieve information on a single remote account.
- offsetSet() : mixed
- Add a remote account.
- offsetUnset() : mixed
- Delete a remote account.
- _save() : mixed
- Save the remote accounts list to the prefs backend.
- _strip() : string
- Strip the identifying label from a mailbox ID.
Constants
MBOX_PREFIX
public
mixed
MBOX_PREFIX
= "remotembox\x00"
Properties
$_accounts
The list of remote accounts.
protected
array<string|int, mixed>
$_accounts
Methods
__construct()
Constructor.
public
__construct() : mixed
getIterator()
public
getIterator() : Traversable
Return values
TraversablegetMailboxById()
Return the IMAP mailbox name for the given remote mailbox identifier.
public
getMailboxById(string $id) : string
Parameters
- $id : string
-
The mailbox name/identifier.
Return values
string —The IMAP mailbox name.
getRemoteById()
Return the remote account for a valid remote mailbox/identifier.
public
getRemoteById(string $id) : mixed
Parameters
- $id : string
-
The mailbox name/identifier.
Return values
mixed —Either a IMP_Remote_Account object or null.
isRemoteMbox()
Is the given mailbox a remote mailbox?
public
isRemoteMbox(string $id) : bool
Parameters
- $id : string
-
The mailbox name/identifier.
Return values
bool —Whether the given mailbox name is a remote mailbox.
label()
Return the label for the given mailbox.
public
label(string $id) : string
Parameters
- $id : string
-
The mailbox name/identifier.
Return values
string —The mailbox label.
offsetExists()
Does the account ID exist?
public
offsetExists(string $offset) : bool
Parameters
- $offset : string
-
Account ID.
Return values
bool —True if the account ID exists.
offsetGet()
Retrieve information on a single remote account.
public
offsetGet(string $offset) : array<string|int, mixed>
Parameters
- $offset : string
-
Account ID.
Return values
array<string|int, mixed> —The configuration array, or false if ID not found.
offsetSet()
Add a remote account.
public
offsetSet(string $offset, mixed $value) : mixed
Parameters
- $offset : string
-
Account ID.
- $value : mixed
offsetUnset()
Delete a remote account.
public
offsetUnset(string $offset) : mixed
Parameters
- $offset : string
-
Account ID.
_save()
Save the remote accounts list to the prefs backend.
protected
_save() : mixed
_strip()
Strip the identifying label from a mailbox ID.
protected
_strip(string $id) : string
Parameters
- $id : string
-
The mailbox query ID.
Return values
string —The remote ID, with any IMP specific identifying information stripped off.