Skip to content

Commit

Permalink
phpdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Feb 14, 2014
1 parent 0eab65d commit 4e31628
Show file tree
Hide file tree
Showing 15 changed files with 164 additions and 67 deletions.
6 changes: 3 additions & 3 deletions framework/Imap_Client/lib/Horde/Imap/Client/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
*/
abstract class Horde_Imap_Client_Base implements Serializable
{
/* Serialized version. */
/** Serialized version. */
const VERSION = 2;

/* Cache names for miscellaneous data. */
/** Cache names for miscellaneous data. */
const CACHE_MODSEQ = '_m';
const CACHE_SEARCH = '_s';
/* @since 2.9.0 */
const CACHE_SEARCHID = '_i';

/* Cache names used exclusively within this class. @since 2.11.0 */
/** Cache names used exclusively within this class. @since 2.11.0 */
const CACHE_DOWNGRADED = 'HICdg';

/**
Expand Down
2 changes: 1 addition & 1 deletion framework/Imap_Client/lib/Horde/Imap/Client/Base/Debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*/
class Horde_Imap_Client_Base_Debug
{
/* Time, in seconds, to be labeled a slow command. */
/** Time, in seconds, to be labeled a slow command. */
const SLOW_CMD = 5;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
class Horde_Imap_Client_Cache_Backend_Db extends Horde_Imap_Client_Cache_Backend
{
/* Table names. */
/** SQL table names. */
const BASE_TABLE = 'horde_imap_client_data';
const MD_TABLE = 'horde_imap_client_metadata';
const MSG_TABLE = 'horde_imap_client_message';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
class Horde_Imap_Client_Cache_Backend_Mongo extends Horde_Imap_Client_Cache_Backend implements Horde_Mongo_Collection_Index
{
/* Collection names. */
/** Mongo collection names. */
const BASE = 'horde_imap_client_cache_data';
const MD = 'horde_imap_client_cache_metadata';
const MSG = 'horde_imap_client_cache_message';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
class Horde_Imap_Client_Data_AclCommon
{
/* Constants for getString(). */
/** Constants for getString(). */
const RFC_2086 = 1;
const RFC_4314 = 2;

Expand Down
2 changes: 1 addition & 1 deletion framework/Imap_Client/lib/Horde/Imap/Client/Data/Fetch.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
class Horde_Imap_Client_Data_Fetch
{
/* Constants. */
/** Header formatting constants. */
const HEADER_PARSE = 1;
const HEADER_STREAM = 2;

Expand Down
168 changes: 121 additions & 47 deletions framework/Imap_Client/lib/Horde/Imap/Client/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,137 +27,211 @@ class Horde_Imap_Client_Exception extends Horde_Exception_Wrapped
{
/* Error message codes. */

// Unspecified error (default)
/**
* Unspecified error (DEFAULT).
*/
const UNSPECIFIED = 0;

// There was an unrecoverable error in UTF7IMAP -> UTF8 conversion.
/**
* There was an unrecoverable error in UTF7IMAP -> UTF8 conversion.
*/
const UTF7IMAP_CONVERSION = 3;

// The server ended the connection.
/**
* The server ended the connection.
*/
const DISCONNECT = 4;

// The charset used in the search query is not supported on the server.
/**
* The charset used in the search query is not supported on the
* server. */
const BADCHARSET = 5;

// There were errors parsing the MIME/RFC 2822 header of the part.
/**
* There were errors parsing the MIME/RFC 2822 header of the part.
*/
const PARSEERROR = 6;

// The server could not decode the MIME part (see RFC 3516)
/**
* The server could not decode the MIME part (see RFC 3516).
*/
const UNKNOWNCTE = 7;

// The comparator specified by setComparator() was not recognized by the
// IMAP server
/**
* The comparator specified by setComparator() was not recognized by the
* IMAP server
*/
const BADCOMPARATOR = 9;

// RFC 4551 [3.1.2] - All mailboxes are not required to support
// mod-sequences.
/**
* RFC 4551 [3.1.2] - All mailboxes are not required to support
* mod-sequences.
*/
const MBOXNOMODSEQ = 10;

// Thrown if server denies the network connection.
/**
* Thrown if server denies the network connection.
*/
const SERVER_CONNECT = 11;

// Thrown if read error for server response.
/**
* Thrown if read error for server response.
*/
const SERVER_READERROR = 12;

// Thrown if write error in server interaction.
/**
* Thrown if write error in server interaction.
*/
const SERVER_WRITEERROR = 16;

// Thrown on CATENATE if the URL is invalid.
/**
* Thrown on CATENATE if the URL is invalid.
*/
const CATENATE_BADURL = 13;

// Thrown on CATENATE if the message was too big.
/**
* Thrown on CATENATE if the message was too big.
*/
const CATENATE_TOOBIG = 14;

// Thrown on CREATE if special-use attribute is not supported.
/**
* Thrown on CREATE if special-use attribute is not supported.
*/
const USEATTR = 15;

// The user did not have permissions to carry out the operation.
/**
* The user did not have permissions to carry out the operation.
*/
const NOPERM = 17;

// The operation was not successful because another user is holding
// a necessary resource. The operation may succeed if attempted later.
/**
* The operation was not successful because another user is holding
* a necessary resource. The operation may succeed if attempted later.
*/
const INUSE = 18;

// The operation failed because data on the server was corrupt.
/**
* The operation failed because data on the server was corrupt.
*/
const CORRUPTION = 19;

// The operation failed because it exceeded some limit on the server.
/**
* The operation failed because it exceeded some limit on the server.
*/
const LIMIT = 20;

// The operation failed because the user is over their quota.
/**
* The operation failed because the user is over their quota.
*/
const OVERQUOTA = 21;

// The operation failed because the requested creation object already
// exists.
/**
* The operation failed because the requested creation object already
* exists.
*/
const ALREADYEXISTS = 22;

// The operation failed because the requested deletion object did not
// exist.
/**
* The operation failed because the requested deletion object did not
* exist.
*/
const NONEXISTENT = 23;

// Setting metadata failed because the size of its value is too large.
// The maximum octet count the server is willing to accept will be
// in the exception message string.
/**
* Setting metadata failed because the size of its value is too large.
* The maximum octet count the server is willing to accept will be
* in the exception message string.
*/
const METADATA_MAXSIZE = 24;

// Setting metadata failed because the maximum number of allowed
// annotations has already been reached.
/**
* Setting metadata failed because the maximum number of allowed
* annotations has already been reached.
*/
const METADATA_TOOMANY = 25;

// Setting metadata failed because the server does not support private
// annotations on one of the specified mailboxes.
/**
* Setting metadata failed because the server does not support private
* annotations on one of the specified mailboxes.
*/
const METADATA_NOPRIVATE = 26;

// Invalid metadata entry.
/**
* Invalid metadata entry.
*/
const METADATA_INVALID = 27;


// Login failures

// Could not start mandatory TLS connection.
/**
* Could not start mandatory TLS connection.
*/
const LOGIN_TLSFAILURE = 100;

// Could not find an available authentication method.
/**
* Could not find an available authentication method.
*/
const LOGIN_NOAUTHMETHOD = 101;

// Generic authentication failure.
/**
* Generic authentication failure.
*/
const LOGIN_AUTHENTICATIONFAILED = 102;

// Remote server is unavailable.
/**
* Remote server is unavailable.
*/
const LOGIN_UNAVAILABLE = 103;

// Authentication succeeded, but authorization failed.
/**
* Authentication succeeded, but authorization failed.
*/
const LOGIN_AUTHORIZATIONFAILED = 104;

// Authentication is no longer permitted with this passphrase.
/**
* Authentication is no longer permitted with this passphrase.
*/
const LOGIN_EXPIRED = 105;

// Login requires privacy.
/**
* Login requires privacy.
*/
const LOGIN_PRIVACYREQUIRED = 106;


// Mailbox access failures

// Could not open/access mailbox
/**
* Could not open/access mailbox
*/
const MAILBOX_NOOPEN = 200;

// Could not complete the command because the mailbox is read-only
/**
* Could not complete the command because the mailbox is read-only
*/
const MAILBOX_READONLY = 201;


// POP3 specific error codes

// Temporary issue. Generally, there is no need to alarm the user for
// errors of this type.
/**
* Temporary issue. Generally, there is no need to alarm the user for
* errors of this type.
*/
const POP3_TEMP_ERROR = 300;

// Permanent error indicated by server.
/**
* Permanent error indicated by server.
*/
const POP3_PERM_ERROR = 301;


// Unsupported feature error codes

// Function/feature is not supported on this server.
/**
* Function/feature is not supported on this server.
*/
const NOT_SUPPORTED = 400;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@ class Horde_Imap_Client_Exception_Sync extends Horde_Exception_Wrapped
{
/* Error message codes. */

// Token could not be parsed.
/**
* Token could not be parsed.
*/
const BAD_TOKEN = 1;

// UIDVALIDITY of the mailbox changed.
/**
* UIDVALIDITY of the mailbox changed.
*/
const UIDVALIDITY_CHANGED = 2;

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
*/
class Horde_Imap_Client_Fetch_Results implements ArrayAccess, Countable, IteratorAggregate
{
/* Key type constants. */
/**
* Key type constants.
*/
const SEQUENCE = 1;
const UID = 2;

Expand Down
4 changes: 3 additions & 1 deletion framework/Imap_Client/lib/Horde/Imap/Client/Ids.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
*/
class Horde_Imap_Client_Ids implements Countable, Iterator, Serializable
{
/* "Special" representation constants. */
/**
* "Special" representation constants.
*/
const ALL = "\01";
const SEARCH_RES = "\02";
const LARGEST = "\03";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
*/
class Horde_Imap_Client_Interaction_Server
{
/* Response codes (RFC 3501 [7.1]). */
/**
* Response codes (RFC 3501 [7.1]).
*/
const BAD = 1;
const BYE = 2;
const NO = 3;
Expand Down
7 changes: 4 additions & 3 deletions framework/Imap_Client/lib/Horde/Imap/Client/Mailbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ static public function get($mbox, $utf7imap = false)
/**
* Constructor.
*
* @param string $mbox The mailbox name.
* @param mixed $utf7imap Is mailbox UTF7-IMAP encoded (true). Otherwise,
* mailbox is assumed to be UTF-8 encoded.
* @param string $mbox The mailbox name.
* @param boolean $utf7imap Is mailbox UTF7-IMAP encoded (true).
* Otherwise, mailbox is assumed to be UTF-8
* encoded.
*/
public function __construct($mbox, $utf7imap = false)
{
Expand Down

0 comments on commit 4e31628

Please sign in to comment.