/**
* Attempts to return a concrete Horde_Imap_Client instance based on
* $driver.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $driver The type of concrete Horde_Imap_Client subclass
* to return.
* @param array $params A hash containing any additional configuration or
* connection parameters a subclass might need.
*
- * @return Horde_Imap_Client_Base The newly created Horde_Imap_Client instance.
+ * @return Horde_Imap_Client_Base The newly created Horde_Imap_Client
+ * instance.
+ * @throws Horde_Imap_Client_Exception
*/
static public function getInstance($driver, $params = array())
{
/**
* Constructs a new Horde_Imap_Client object.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $params A hash containing configuration parameters.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
public function __construct($params = array())
{
/**
* Initialize the Horde_Imap_Client_Cache object, if necessary.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @return boolean Returns true if caching is enabled.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _initCache()
{
/**
* Get CAPABILITY information from the IMAP server.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @return array The capability array.
+ * @throws Horde_Imap_Client_Exception
*/
public function capability()
{
/**
* Get CAPABILITY information from the IMAP server.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @return array The capability array.
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _capability();
/**
* Send a NOOP command (RFC 3501 [6.1.2]).
- * Throws a Horde_Imap_Client_Exception on error.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
public function noop()
{
/**
* Send a NOOP command.
- * Throws a Horde_Imap_Client_Exception on error.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _noop();
/**
* Get the NAMESPACE information from the IMAP server (RFC 2342).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $additional If the server supports namespaces, any
* additional namespaces to add to the
* 'type' - (string) The namespace type (either 'personal', 'other' or
* 'shared').
* </pre>
+ * @throws Horde_Imap_Client_Exception
*/
public function getNamespaces($additional = array())
{
/**
* Get the NAMESPACE information from the IMAP server.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @return array An array of namespace information.
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _getNamespaces();
/**
* Login to the IMAP server.
- * Throws a Horde_Imap_Client_Exception on error.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
public function login()
{
/**
* Login to the IMAP server.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @return boolean Return true if global login tasks should be run.
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _login();
/**
* Send ID information to the IMAP server (RFC 2971).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $info Overrides the value of the 'id' param and sends
* this information instead.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
public function sendID($info = null)
{
/**
* Send ID information to the IMAP server (RFC 2971).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $info The information to send to the server.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _sendID($info);
/**
* Return ID information from the IMAP server (RFC 2971).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @return array An array of information returned, with the keys as the
* 'field' and the values as the 'value'.
+ * @throws Horde_Imap_Client_Exception
*/
public function getID()
{
/**
* Return ID information from the IMAP server (RFC 2971).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @return array An array of information returned, with the keys as the
* 'field' and the values as the 'value'.
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _getID();
/**
* Sets the preferred language for server response messages (RFC 5255).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $info Overrides the value of the 'lang' param and sends
* this list of preferred languages instead. The
*
* @return string The language accepted by the server, or null if the
* default language is used.
+ * @throws Horde_Imap_Client_Exception
*/
public function setLanguage($langs = null)
{
/**
* Sets the preferred language for server response messages (RFC 5255).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $info The preferred list of languages.
*
* @return string The language accepted by the server, or null if the
* default language is used.
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _setLanguage($langs);
/**
* Gets the preferred language for server response messages (RFC 5255).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $list If true, return the list of available languages.
*
* @return mixed If $list is true, the list of languages available on the
* server (may be empty). If false, the language used by
* the server, or null if the default language is used.
+ * @throws Horde_Imap_Client_Exception
*/
public function getLanguage($list = false)
{
/**
* Gets the preferred language for server response messages (RFC 5255).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $list If true, return the list of available languages.
*
* @return mixed If $list is true, the list of languages available on the
* server (may be empty). If false, the language used by
* the server, or null if the default language is used.
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _getLanguage($list);
/**
* Open a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to open. Either in UTF7-IMAP or
* UTF-8.
* Horde_Imap_Client::OPEN_READONLY,
* Horde_Imap_Client::OPEN_READWRITE, or
* Horde_Imap_Client::OPEN_AUTO.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
public function openMailbox($mailbox, $mode = Horde_Imap_Client::OPEN_AUTO)
{
/**
* Open a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to open (UTF7-IMAP).
* @param integer $mode The access mode.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _openMailbox($mailbox, $mode);
/**
* Return the currently opened mailbox and access mode.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $options Additional options:
* <pre>
*
* @return mixed Either an array with two elements - 'mailbox' and
* 'mode' - or null if no mailbox selected.
+ * @throws Horde_Imap_Client_Exception
*/
public function currentMailbox($options = array())
{
/**
* Create a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to create. Either in UTF7-IMAP or
* UTF-8.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
public function createMailbox($mailbox)
{
/**
* Create a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to create (UTF7-IMAP).
+ *
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _createMailbox($mailbox);
/**
* Delete a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to delete. Either in UTF7-IMAP or
* UTF-8.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
public function deleteMailbox($mailbox)
{
/**
* Delete a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to delete (UTF7-IMAP).
+ *
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _deleteMailbox($mailbox);
/**
* Rename a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $old The old mailbox name. Either in UTF7-IMAP or
* UTF-8.
* @param string $new The new mailbox name. Either in UTF7-IMAP or
* UTF-8.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
public function renameMailbox($old, $new)
{
/**
* Rename a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $old The old mailbox name (UTF7-IMAP).
* @param string $new The new mailbox name (UTF7-IMAP).
+ *
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _renameMailbox($old, $new);
/**
* Manage subscription status for a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to [un]subscribe to. Either in
* UTF7-IMAP or UTF-8.
* @param boolean $subscribe True to subscribe, false to unsubscribe.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
public function subscribeMailbox($mailbox, $subscribe = true)
{
/**
* Manage subscription status for a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to [un]subscribe to (UTF7-IMAP).
* @param boolean $subscribe True to subscribe, false to unsubscribe.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _subscribeMailbox($mailbox, $subscribe);
/**
* Obtain a list of mailboxes matching a pattern.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @todo RFC 5258 extensions
*
* with the following keys: 'mailbox', 'attributes' (only
* if 'attributes' option is true), and 'delimiter' (only
* if 'delimiter' option is true).
+ * @throws Horde_Imap_Client_Exception
*/
public function listMailboxes($pattern, $mode = Horde_Imap_Client::MBOX_ALL,
$options = array())
/**
* Obtain a list of mailboxes matching a pattern.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $pattern The mailbox search pattern (UTF7-IMAP).
* @param integer $mode Which mailboxes to return.
* @param array $options Additional options.
*
* @return array See self::listMailboxes().
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _listMailboxes($pattern, $mode, $options);
/**
* Obtain status information for a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to query. Either in UTF7-IMAP or
* or UTF-8.
* </pre>
*
* @return array An array with the requested keys (see above).
+ * @throws Horde_Imap_Client_Exception
*/
public function status($mailbox, $flags = Horde_Imap_Client::STATUS_ALL)
{
/**
* Obtain status information for a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to query (UTF7-IMAP).
* @param string $flags A bitmask of information requested from the
* server.
*
* @return array See self::status().
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _status($mailbox, $flags);
/**
* Append message(s) to a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to append the message(s) to. Either
* in UTF7-IMAP or UTF-8.
* @return mixed An array of the UIDs of the appended messages (if server
* supports UIDPLUS extension or 'messageid' is defined)
* or true.
+ * @throws Horde_Imap_Client_Exception
*/
public function append($mailbox, $data, $options = array())
{
/**
* Append message(s) to a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to append the message(s) to
* (UTF7-IMAP).
*
* @return mixed An array of the UIDs of the appended messages (if server
* supports UIDPLUS extension) or true.
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _append($mailbox, $data, $options);
/**
* Request a checkpoint of the currently selected mailbox (RFC 3501
* [6.4.1]).
- * Throws a Horde_Imap_Client_Exception on error.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
public function check()
{
/**
* Request a checkpoint of the currently selected mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _check();
/**
* Close the connection to the currently selected mailbox, optionally
* expunging all deleted messages (RFC 3501 [6.4.2]).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $options Additional options:
* <pre>
* 'expunge' - (boolean) Expunge all messages flagged as deleted?
* DEFAULT: No
* </pre>
+ *
+ * @throws Horde_Imap_Client_Exception
*/
public function close($options = array())
{
/**
* Close the connection to the currently selected mailbox, optionally
* expunging all deleted messages (RFC 3501 [6.4.2]).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $options Additional options.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _close($options);
/**
* Expunge deleted messages from the given mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to expunge. Either in UTF7-IMAP
* or UTF-8.
* 'sequence' - (boolean) If true, 'ids' is an array of sequence numbers.
* DEFAULT: 'sequence' is an array of UIDs.
* </pre>
+ *
+ * @throws Horde_Imap_Client_Exception
*/
public function expunge($mailbox, $options = array())
{
/**
* Expunge all deleted messages from the given mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $options Additional options.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _expunge($options);
/**
* Search a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to search. Either in UTF7-IMAP
* or UTF-8.
* (if 'sequence' is true) that match $criteria.
* Returned if 'sort' is true.
* </pre>
+ * @throws Horde_Imap_Client_Exception
*/
public function search($mailbox, $query = null, $options = array())
{
/**
* Search a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param object $query The search query.
* @param array $options Additional options. The '_query' key contains
*
* @return array An array of UIDs (default) or an array of message
* sequence numbers (if 'sequence' is true).
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _search($query, $options);
/**
* Set the comparator to use for searching/sorting (RFC 5255).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $comparator The comparator string (see RFC 4790 [3.1] -
* "collation-id" - for format). The reserved
* string 'default' can be used to select
* the default comparator.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
public function setComparator($comparator = null)
{
/**
* Set the comparator to use for searching/sorting (RFC 5255).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $comparator The comparator string (see RFC 4790 [3.1] -
* "collation-id" - for format). The reserved
* string 'default' can be used to select
* the default comparator.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _setComparator($comparator);
/**
* Get the comparator used for searching/sorting (RFC 5255).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @return mixed Null if the default comparator is being used, or an
* array of comparator information (see RFC 5255 [4.8]).
+ * @throws Horde_Imap_Client_Exception
*/
public function getComparator()
{
/**
* Get the comparator used for searching/sorting (RFC 5255).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @return mixed Null if the default comparator is being used, or an
* array of comparator information (see RFC 5255 [4.8]).
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _getComparator();
/**
* Thread sort a given list of messages (RFC 5256).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to search. Either in UTF7-IMAP
* or UTF-8.
* </pre>
*
* @return Horde_Imap_Client_Thread A Horde_Imap_Client_Thread object.
+ * @throws Horde_Imap_Client_Exception
*/
public function thread($mailbox, $options = array())
{
/**
* Thread sort a given list of messages (RFC 5256).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $options Additional options.
*
* 'level' - (integer) The thread level of this message (1 = base).
* 'uid' - (integer) The UID of the message.
* </pre>
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _thread($options);
/**
* Fetch message data (see RFC 3501 [6.4.5]).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to fetch messages from. Either in
* UTF7-IMAP or UTF-8.
* keys that correspond to 'ids', and values that
* contain the array of fetched information as requested
* in criteria.
+ * @throws Horde_Imap_Client_Exception
*/
public function fetch($mailbox, $criteria, $options = array())
{
/**
* Fetch message data.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $criteria The fetch criteria.
* @param array $options Additional options.
*
* @return array See self::fetch().
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _fetch($criteria, $options);
/**
* Store message flag data (see RFC 3501 [6.4.6]).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox containing the messages to modify.
* Either in UTF7-IMAP or UTF-8.
* @return array If 'unchangedsince' is set, this is a list of UIDs or
* sequence numbers (if 'sequence' is true) that failed
* the 'unchangedsince' test. Else, an empty array.
+ * @throws Horde_Imap_Client_Exception
*/
public function store($mailbox, $options = array())
{
/**
* Store message flag data.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $options Additional options.
*
* @return array See self::store().
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _store($options);
/**
* Copy messages to another mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $source The source mailbox. Either in UTF7-IMAP
* or UTF-8.
* @return mixed An array mapping old UIDs (keys) to new UIDs (values) on
* success (if the IMAP server and/or driver support the
* UIDPLUS extension) or true.
+ * @throws Horde_Imap_Client_Exception
*/
public function copy($source, $dest, $options = array())
{
/**
* Copy messages to another mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $dest The destination mailbox (UTF7-IMAP).
* @param array $options Additional options.
* @return mixed An array mapping old UIDs (keys) to new UIDs (values) on
* success (if the IMAP server and/or driver support the
* UIDPLUS extension) or true.
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _copy($dest, $options);
/**
* Set quota limits. The server must support the IMAP QUOTA extension
* (RFC 2087).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $root The quota root. Either in UTF7-IMAP or UTF-8.
* @param array $options Additional options:
* storage size.
* DEFAULT: No limit set.
* </pre>
+ *
+ * @throws Horde_Imap_Client_Exception
*/
public function setQuota($root, $options = array())
{
/**
* Set quota limits.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $root The quota root (UTF7-IMAP).
* @param array $options Additional options.
*
* @return boolean True on success.
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _setQuota($root, $options);
/**
* Get quota limits. The server must support the IMAP QUOTA extension
* (RFC 2087).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $root The quota root. Either in UTF7-IMAP or UTF-8.
*
* @return mixed An array with these possible keys: 'messages' and
* 'storage'; each key holds an array with 2 values:
* 'limit' and 'usage'.
+ * @throws Horde_Imap_Client_Exception
*/
public function getQuota($root)
{
/**
* Get quota limits.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $root The quota root (UTF7-IMAP).
*
* @return mixed An array with these possible keys: 'messages' and
* 'storage'; each key holds an array with 2 values:
* 'limit' and 'usage'.
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _getQuota($root);
/**
* Get quota limits for a mailbox. The server must support the IMAP QUOTA
* extension (RFC 2087).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox. Either in UTF7-IMAP or UTF-8.
*
* holds an array with two possible keys: 'messages' and
* 'storage'; each of these keys holds an array with 2
* values: 'limit' and 'usage'.
+ * @throws Horde_Imap_Client_Exception
*/
public function getQuotaRoot($mailbox)
{
/**
* Get quota limits for a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox (UTF7-IMAP).
*
* holds an array with two possible keys: 'messages' and
* 'storage'; each of these keys holds an array with 2
* values: 'limit' and 'usage'.
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _getQuotaRoot($mailbox);
/**
* Get the ACL rights for a given mailbox. The server must support the
* IMAP ACL extension (RFC 2086/4314).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox. Either in UTF7-IMAP or UTF-8.
*
* @return array An array with identifiers as the keys and an array of
* rights as the values.
+ * @throws Horde_Imap_Client_Exception
*/
public function getACL($mailbox)
{
/**
* Get ACL rights for a given mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox (UTF7-IMAP).
*
* @return array An array with identifiers as the keys and an array of
* rights as the values.
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _getACL($mailbox);
/**
* Set ACL rights for a given mailbox/identifier.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox. Either in UTF7-IMAP or UTF-8.
* @param string $identifier The identifier to alter. Either in UTF7-IMAP
* 'rights' - (string) The rights to alter.
* DEFAULT: No rights are altered.
* </pre>
+ *
+ * @throws Horde_Imap_Client_Exception
*/
public function setACL($mailbox, $identifier, $options)
{
/**
* Set ACL rights for a given mailbox/identifier.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox (UTF7-IMAP).
* @param string $identifier The identifier to alter (UTF7-IMAP).
* @param array $options Additional options.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _setACL($mailbox, $identifier, $options);
/**
* List the ACL rights for a given mailbox/identifier. The server must
* support the IMAP ACL extension (RFC 2086/4314).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox. Either in UTF7-IMAP or UTF-8.
* @param string $identifier The identifier to alter. Either in UTF7-IMAP
* identifier can be granted in the mailbox; these rights
* may be grouped together to indicate that they are tied
* to each other).
+ * @throws Horde_Imap_Client_Exception
*/
public function listACLRights($mailbox, $identifier)
{
/**
* Get ACL rights for a given mailbox/identifier.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox (UTF7-IMAP).
* @param string $identifier The identifier to alter (UTF7-IMAP).
*
* @return array An array of rights (keys: 'required' and 'optional').
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _listACLRights($mailbox, $identifier);
/**
* Get the ACL rights for the current user for a given mailbox. The
* server must support the IMAP ACL extension (RFC 2086/4314).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox. Either in UTF7-IMAP or UTF-8.
*
* @return array An array of rights.
+ * @throws Horde_Imap_Client_Exception
*/
public function getMyACLRights($mailbox)
{
/**
* Get the ACL rights for the current user for a given mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox (UTF7-IMAP).
*
* @return array An array of rights.
+ * @throws Horde_Imap_Client_Exception
*/
abstract protected function _getMyACLRights($mailbox);
/**
* Store FETCH data in cache.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $data The data array.
* @param array $options Additional options:
* 'uidvalid' - (integer) The UID Validity number.
* DEFAULT: UIDVALIDITY discovered via a status() call.
* </pre>
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _updateCache($data, $options = array())
{
/**
* Constructor.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $params The configuration parameters.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
public function __construct($params = array())
{
/**
* Get information from the cache.
- * Throws a Horde_Imap_Cache_Exception on error.
*
* @param string $mailbox An IMAP mailbox string.
* @param array $uids The list of message UIDs to retrieve
* key (if found) and the fields as values (will be
* undefined if not found). If $uids is empty, returns the
* full list of cached UIDs.
+ * @throws Horde_Imap_Client_Exception
*/
public function get($mailbox, $uids = array(), $fields = array(),
$uidvalid = null)
/**
* Delete messages in the cache.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox An IMAP mailbox string.
* @param array $uids The list of message UIDs to delete.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
public function deleteMsgs($mailbox, $uids)
{
/**
* Load the given mailbox by regenerating from the cache.
- * Throws a Horde_Imap_Client_Exception on error (only if $uidvalid is
- * set).
+ * Throws a Horde_Imap_Client_Exception on error ONLY if $uidvalid is
+ * set.
*
* @param string $mailbox The mailbox to load.
* @param array $uids The UIDs to load.
* @param integer $uidvalid The IMAP uidvalidity value of the mailbox.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _loadMailbox($mailbox, $uids, $uidvalid = null)
{
/**
* Given a list of UIDs, determine the slices that need to be loaded.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox.
* @param array $uids A list of UIDs.
* @param boolean $set Set the slice information in $_slicemap?
*
* @return array UIDs as the keys, the slice number as the value.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getCacheSlices($mailbox, $uids, $set = false)
{
/**
* Get CAPABILITY info from the IMAP server.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @return array The capability array.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _capability()
{
/**
* Send a NOOP command.
- * Throws a Horde_Imap_Client_Exception on error.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _noop()
{
/**
* Get the NAMESPACE information from the IMAP server.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @return array An array of namespace information.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getNamespaces()
{
/**
* Login to the IMAP server.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @return boolean Return true if global login tasks should be run.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _login()
{
/**
* Send ID information to the IMAP server (RFC 2971).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $info The information to send to the server.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _sendID($info)
{
/**
* Return ID information from the IMAP server (RFC 2971).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @return array An array of information returned, with the keys as the
* 'field' and the values as the 'value'.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getID()
{
/**
* Sets the preferred language for server response messages (RFC 5255).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $info The preferred list of languages.
*
* @return string The language accepted by the server, or null if the
* default language is used.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _setLanguage($langs)
{
/**
* Gets the preferred language for server response messages (RFC 5255).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $list If true, return the list of available languages.
*
* @return mixed If $list is true, the list of languages available on the
* server (may be empty). If false, the language used by
* the server, or null if the default language is used.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getLanguage($list)
{
/**
* Open a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to open (UTF7-IMAP).
* @param integer $mode The access mode.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _openMailbox($mailbox, $mode)
{
/**
* Create a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to create (UTF7-IMAP).
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _createMailbox($mailbox)
{
/**
* Delete a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to delete (UTF7-IMAP).
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _deleteMailbox($mailbox)
{
/**
* Rename a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $old The old mailbox name (UTF7-IMAP).
* @param string $new The new mailbox name (UTF7-IMAP).
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _renameMailbox($old, $new)
{
/**
* Manage subscription status for a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to [un]subscribe to (UTF7-IMAP).
* @param boolean $subscribe True to subscribe, false to unsubscribe.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _subscribeMailbox($mailbox, $subscribe)
{
/**
* Obtain a list of mailboxes matching a pattern.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $pattern The mailbox search pattern.
* @param integer $mode Which mailboxes to return.
* </pre>
*
* @return array See Horde_Imap_Client_Base::listMailboxes().
+ * @throws Horde_Imap_Client_Exception
*/
protected function _listMailboxes($pattern, $mode, $options)
{
/**
* Obtain status information for a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to query (UTF7-IMAP).
* @param string $flags A bitmask of information requested from the
* server.
*
* @return array See Horde_Imap_Client_Base::status().
+ * @throws Horde_Imap_Client_Exception
*/
protected function _status($mailbox, $flags)
{
/**
* Append message(s) to a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to append the message(s) to
* (UTF7-IMAP).
* @param array $options Additional options.
*
* @return mixed Returns true.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _append($mailbox, $data, $options)
{
/**
* Request a checkpoint of the currently selected mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _check()
{
/**
* Close the connection to the currently selected mailbox, optionally
* expunging all deleted messages (RFC 3501 [6.4.2]).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $options Additional options.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _close($options)
{
/**
* Expunge deleted messages from the given mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $options Additional options.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _expunge($options)
{
/**
* Search a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param object $query The search string.
* @param array $options Additional options. The '_query' key contains
*
* @return array An array of UIDs (default) or an array of message
* sequence numbers (if 'sequence' is true).
+ * @throws Horde_Imap_Client_Exception
*/
protected function _search($query, $options)
{
/**
* Set the comparator to use for searching/sorting (RFC 5255).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $comparator The comparator string (see RFC 4790 [3.1] -
* "collation-id" - for format). The reserved
* string 'default' can be used to select
* the default comparator.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _setComparator($comparator)
{
/**
* Get the comparator used for searching/sorting (RFC 5255).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @return mixed Null if the default comparator is being used, or an
* array of comparator information (see RFC 5255 [4.8]).
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getComparator()
{
/**
* Thread sort a given list of messages (RFC 5256).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $options Additional options.
*
* @return array See Horde_Imap_Client_Base::_thread().
+ * @throws Horde_Imap_Client_Exception
*/
protected function _thread($options)
{
/**
* Fetch message data.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $criteria The fetch criteria.
* @param array $options Additional options.
*
* @return array See self::fetch().
+ * @throws Horde_Imap_Client_Exception
*/
protected function _fetch($criteria, $options)
{
/**
* Store message flag data.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $options Additional options.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _store($options)
{
/**
* Copy messages to another mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $dest The destination mailbox (UTF7-IMAP).
* @param array $options Additional options.
*
* @return boolean True on success (this driver does not support
* returning the UIDs).
+ * @throws Horde_Imap_Client_Exception
*/
protected function _copy($dest, $options)
{
/**
* Set quota limits.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $root The quota root (UTF7-IMAP).
* @param array $options Additional options.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _setQuota($root, $options)
{
/**
* Get quota limits.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $root The quota root (UTF7-IMAP).
*
* @return mixed An array with these possible keys: 'messages' and
* 'storage'; each key holds an array with 2 values:
* 'limit' and 'usage'.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getQuota($root)
{
/**
* Get quota limits for a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox (UTF7-IMAP).
*
* holds an array with two possible keys: 'messages' and
* 'storage'; each of these keys holds an array with 2
* values: 'limit' and 'usage'.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getQuotaRoot($mailbox)
{
/**
* Set ACL rights for a given mailbox/identifier.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox (UTF7-IMAP).
* @param string $identifier The identifier to alter (UTF7-IMAP).
* @param array $options Additional options.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _setACL($mailbox, $identifier, $options)
{
/**
* Get ACL rights for a given mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox (UTF7-IMAP).
*
* @return array An array with identifiers as the keys and an array of
* rights as the values.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getACL($mailbox)
{
/**
* Get ACL rights for a given mailbox/identifier.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox (UTF7-IMAP).
* @param string $identifier The identifier (UTF-8).
*
* @return array An array of rights (keys: 'required' and 'optional').
+ * @throws Horde_Imap_Client_Exception
*/
protected function _listACLRights($mailbox, $identifier)
{
/**
* Get the ACL rights for the current user for a given mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox (UTF7-IMAP).
*
* @return array An array of rights.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getMyACLRights($mailbox)
{
/**
* Get CAPABILITY info from the IMAP server.
- * Throws a Horde_Imap_Client_Exception on error.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _capability()
{
/**
* Get the NAMESPACE information from the IMAP server.
- * Throws a Horde_Imap_Client_Exception on error.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getNamespaces()
{
/**
* Send ID information to the IMAP server (RFC 2971).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $info The information to send to the server.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _sendID($info)
{
/**
* Return ID information from the IMAP server (RFC 2971).
- * Throws a Horde_Imap_Client_Exception on error.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getID()
{
/**
* Sets the preferred language for server response messages (RFC 5255).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $info The preferred list of languages.
*
* @return string The language accepted by the server, or null if the
* default language is used.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _setLanguage($langs)
{
/**
* Gets the preferred language for server response messages (RFC 5255).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $list If true, return the list of available languages.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getLanguage($list)
{
/**
* Open a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to open (UTF7-IMAP).
* @param integer $mode The access mode.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _openMailbox($mailbox, $mode)
{
/**
* Create a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to create (UTF7-IMAP).
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _createMailbox($mailbox)
{
/**
* Delete a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to delete (UTF7-IMAP).
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _deleteMailbox($mailbox)
{
/**
* Rename a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $old The old mailbox name (UTF7-IMAP).
* @param string $new The new mailbox name (UTF7-IMAP).
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _renameMailbox($old, $new)
{
/**
* Manage subscription status for a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to [un]subscribe to (UTF7-IMAP).
* @param boolean $subscribe True to subscribe, false to unsubscribe.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _subscribeMailbox($mailbox, $subscribe)
{
/**
* Unsubscribe to a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to unsubscribe to (UTF7-IMAP).
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _unsubscribeMailbox($mailbox)
{
/**
* Obtain a list of mailboxes matching a pattern.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $pattern The mailbox search pattern.
* @param integer $mode Which mailboxes to return.
* @param array $options Additional options.
*
* @return array See Horde_Imap_Client_Base::listMailboxes().
+ * @throws Horde_Imap_Client_Exception
*/
protected function _listMailboxes($pattern, $mode, $options)
{
/**
* Obtain status information for a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to query (UTF7-IMAP).
* @param string $flags A bitmask of information requested from the
* server.
*
* @return array See Horde_Imap_Client_Base::status().
+ * @throws Horde_Imap_Client_Exception
*/
protected function _status($mailbox, $flags)
{
/**
* Search a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param object $query The search string.
* @param array $options Additional options.
*
* @return array An array of UIDs (default) or an array of message
* sequence numbers (if 'sequence' is true).
+ * @throws Horde_Imap_Client_Exception
*/
protected function _search($query, $options)
{
/**
* Set the comparator to use for searching/sorting (RFC 5255).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $comparator The comparator string (see RFC 4790 [3.1] -
* "collation-id" - for format). The reserved
* string 'default' can be used to select
* the default comparator.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _setComparator($comparator)
{
/**
* Get the comparator used for searching/sorting (RFC 5255).
- * Throws a Horde_Imap_Client_Exception on error.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getComparator()
{
/**
* Thread sort a given list of messages (RFC 5256).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $options Additional options.
*
* @return array See Horde_Imap_Client_Base::thread().
+ * @throws Horde_Imap_Client_Exception
*/
protected function _thread($options)
{
/**
* Append a message to the mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $mailbox The mailboxes to append the messages to
* (UTF7-IMAP).
* @param array $data The message data.
* @param array $options Additional options.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _append($mailbox, $data, $options)
{
/**
* Fetch message data.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $criteria The fetch criteria.
* @param array $options Additional options.
*
* @return array See self::fetch().
+ * @throws Horde_Imap_Client_Exception
*/
protected function _fetch($criteria, $options)
{
/**
* Store message flag data.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $options Additional options.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _store($options)
{
/**
* Copy messages to another mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $dest The destination mailbox (UTF7-IMAP).
* @param array $options Additional options.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _copy($dest, $options)
{
/**
* Set quota limits.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $root The quota root (UTF7-IMAP).
* @param array $options Additional options.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _setQuota($root, $options)
{
/**
* Get quota limits.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $root The quota root (UTF7-IMAP).
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getQuota($root)
{
/**
* Get quota limits for a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox (UTF7-IMAP).
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getQuotaRoot($mailbox)
{
/**
* Set ACL rights for a given mailbox/identifier.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox (UTF7-IMAP).
* @param string $identifier The identifier to alter (UTF7-IMAP).
* @param array $options Additional options.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _setACL($mailbox, $identifier, $options)
{
/**
* Get ACL rights for a given mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox (UTF7-IMAP).
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getACL($mailbox)
{
/**
* Get ACL rights for a given mailbox/identifier.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox (UTF7-IMAP).
* @param string $identifier The identifier (UTF7-IMAP).
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _listACLRights($mailbox, $identifier)
{
/**
* Get the ACL rights for the current user for a given mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox (UTF7-IMAP).
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getMyACLRights($mailbox)
{
/**
* Get CAPABILITY info from the IMAP server.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @return array The capability array.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _capability()
{
/**
* Send a NOOP command.
- * Throws a Horde_Imap_Client_Exception on error.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _noop()
{
/**
* Get the NAMESPACE information from the IMAP server (RFC 2342).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @return array An array of namespace information.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getNamespaces()
{
/**
* Login to the IMAP server.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @return boolean Return true if global login tasks should be run.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _login()
{
/**
* Connects to the IMAP server.
- * Throws a Horde_Imap_Client_Exception on error.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _connect()
{
/**
* Authenticate to the IMAP server.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $method IMAP login method.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _tryLogin($method)
{
/**
* Send ID information to the IMAP server (RFC 2971).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $info The information to send to the server.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _sendID($info)
{
/**
* Return ID information from the IMAP server (RFC 2971).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @return array An array of information returned, with the keys as the
* 'field' and the values as the 'value'.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getID()
{
/**
* Sets the preferred language for server response messages (RFC 5255).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $info The preferred list of languages.
*
* @return string The language accepted by the server, or null if the
* default language is used.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _setLanguage($langs)
{
/**
* Gets the preferred language for server response messages (RFC 5255).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $list If true, return the list of available languages.
*
* @return mixed If $list is true, the list of languages available on the
* server (may be empty). If false, the language used by
* the server, or null if the default language is used.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getLanguage($list)
{
/**
* Enable an IMAP extension (see RFC 5161).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $exts The extensions to enable.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _enable($exts)
{
/**
* Open a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to open (UTF7-IMAP).
* @param integer $mode The access mode.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _openMailbox($mailbox, $mode)
{
/**
* Create a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to create (UTF7-IMAP).
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _createMailbox($mailbox)
{
/**
* Delete a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to delete (UTF7-IMAP).
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _deleteMailbox($mailbox)
{
/**
* Rename a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
- * @param string $old The old mailbox name (UTF7-IMAP).
- * @param string $new The new mailbox name (UTF7-IMAP).
+ * @param string $old The old mailbox name (UTF7-IMAP).
+ * @param string $new The new mailbox name (UTF7-IMAP).
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _renameMailbox($old, $new)
{
/**
* Manage subscription status for a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to [un]subscribe to (UTF7-IMAP).
* @param boolean $subscribe True to subscribe, false to unsubscribe.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _subscribeMailbox($mailbox, $subscribe)
{
/**
* Obtain a list of mailboxes matching a pattern.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $pattern The mailbox search pattern.
* @param integer $mode Which mailboxes to return.
* @param array $options Additional options.
*
* @return array See self::listMailboxes().
+ * @throws Horde_Imap_Client_Exception
*/
protected function _listMailboxes($pattern, $mode, $options)
{
/**
* Obtain a list of mailboxes matching a pattern.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $pattern The mailbox search pattern.
* @param integer $mode Which mailboxes to return.
* @param array $subscribed A list of subscribed mailboxes.
*
* @return array See self::listMailboxes(().
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getMailboxList($pattern, $mode, $options,
$subscribed = null)
/**
* Parse a LIST/LSUB response (RFC 3501 [7.2.2 & 7.2.3]).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $data The server response (includes type as first
* element).
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _parseList($data)
{
/**
* Obtain status information for a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to query (UTF7-IMAP).
* @param string $flags A bitmask of information requested from the
* server.
*
* @return array See Horde_Imap_Client_Base::status().
+ * @throws Horde_Imap_Client_Exception
*/
protected function _status($mailbox, $flags)
{
/**
* Append message(s) to a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox The mailbox to append the message(s) to
* (UTF7-IMAP).
*
* @return mixed An array of the UIDs of the appended messages (if server
* supports UIDPLUS extension) or true.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _append($mailbox, $data, $options)
{
/**
* Request a checkpoint of the currently selected mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _check()
{
/**
* Close the connection to the currently selected mailbox, optionally
* expunging all deleted messages (RFC 3501 [6.4.2]).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $options Additional options.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _close($options)
{
/**
* Expunge deleted messages from the given mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $options Additional options.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _expunge($options)
{
/**
* Search a mailbox. This driver supports all IMAP4rev1 search criteria
* as defined in RFC 3501.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param object $query The search query.
* @param array $options Additional options. The '_query' key contains
*
* @return array An array of UIDs (default) or an array of message
* sequence numbers (if 'sequence' is true).
+ * @throws Horde_Imap_Client_Exception
*/
protected function _search($query, $options)
{
/**
* If server does not support the SORT IMAP extension (RFC 5256), we need
* to do sorting on the client side.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $res The search results.
* @param array $opts The options to search().
*
* @return array The sort results.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _clientSort($res, $opts)
{
/**
* Set the comparator to use for searching/sorting (RFC 5255).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $comparator The comparator string (see RFC 4790 [3.1] -
* "collation-id" - for format). The reserved
* string 'default' can be used to select
* the default comparator.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _setComparator($comparator)
{
/**
* Get the comparator used for searching/sorting (RFC 5255).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @return mixed Null if the default comparator is being used, or an
* array of comparator information (see RFC 5255 [4.8]).
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getComparator()
{
/**
* Thread sort a given list of messages (RFC 5256).
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $options Additional options.
*
* @return array See Horde_Imap_Client_Base::_thread().
+ * @throws Horde_Imap_Client_Exception
*/
protected function _thread($options)
{
/**
* Fetch message data.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @todo Provide a function that would allow streaming of large data
* items like bodytext.
* @param array $options Additional options.
*
* @return array See self::fetch().
+ * @throws Horde_Imap_Client_Exception
*/
protected function _fetch($criteria, $options)
{
/**
* Store message flag data.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param array $options Additional options.
*
* @return array See Horde_Imap_Client::store().
+ * @throws Horde_Imap_Client_Exception
*/
protected function _store($options)
{
/**
* Copy messages to another mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $dest The destination mailbox (UTF7-IMAP).
* @param array $options Additional options.
* @return mixed An array mapping old UIDs (keys) to new UIDs (values) on
* success (if the IMAP server and/or driver support the
* UIDPLUS extension) or true.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _copy($dest, $options)
{
/**
* Set quota limits.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $root The quota root (UTF7-IMAP).
* @param array $options Additional options.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _setQuota($root, $options)
{
/**
* Get quota limits.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $root The quota root (UTF7-IMAP).
*
* @return mixed An array with these possible keys: 'messages' and
* 'storage'; each key holds an array with 2 values:
* 'limit' and 'usage'.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getQuota($root)
{
/**
* Get quota limits for a mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox (UTF7-IMAP).
*
* holds an array with two possible keys: 'messages' and
* 'storage'; each of these keys holds an array with 2
* values: 'limit' and 'usage'.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getQuotaRoot($mailbox)
{
/**
* Set ACL rights for a given mailbox/identifier.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox (UTF7-IMAP).
* @param string $identifier The identifier to alter (UTF7-IMAP).
* @param array $options Additional options.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _setACL($mailbox, $identifier, $options)
{
/**
* Get ACL rights for a given mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox (UTF7-IMAP).
*
* @return array An array with identifiers as the keys and an array of
* rights as the values.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getACL($mailbox)
{
/**
* Get ACL rights for a given mailbox/identifier.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox (UTF7-IMAP).
* @param string $identifier The identifier (US-ASCII).
*
* @return array An array of rights (keys: 'required' and 'optional').
+ * @throws Horde_Imap_Client_Exception
*/
protected function _listACLRights($mailbox, $identifier)
{
/**
* Get the ACL rights for the current user for a given mailbox.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $mailbox A mailbox (UTF7-IMAP).
*
* @return array An array of rights.
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getMyACLRights($mailbox)
{
/**
* Perform a command on the IMAP server. A connection to the server must
* have already been made.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @todo RFC 3501 allows the sending of multiple commands at once. For
* simplicity of implementation at this time, we will execute
* response).
* DEFAULT: false
* </pre>
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _sendLine($query, $options = array())
{
/**
* Gets a line from the IMAP stream and parses it.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @return array An array with the following keys:
* <pre>
* with no response code).
* 'type' - (string) Either 'tagged', 'untagged', or 'continuation'.
* </pre>
+ * @throws Horde_Imap_Client_Exception
*/
protected function _getLine()
{
/**
* Parse all untagged and tagged responses for a given command.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string $tag The IMAP tag of the current command.
+ *
+ * @throws Horde_Imap_Client_Exception
*/
protected function _parseResponse($tag)
{
/**
* Convert a string from UTF7-IMAP to UTF-8.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string The UTF7-IMAP string.
*
* @return string The converted UTF-8 string.
+ * @throws Horde_Imap_Client_Exception
*/
public static function Utf7ImapToUtf8($str)
{
/**
* Convert a string from UTF-8 to UTF7-IMAP.
- * Throws a Horde_Imap_Client_Exception on error.
*
* @param string The UTF-8 string.
*
* @return string The converted UTF7-IMAP string.
+ * @throws Horde_Imap_Client_Exception
*/
public static function Utf8ToUtf7Imap($str)
{