PHP Class Horde_Imap_Client_Socket_Pop3, horde

It is an abstraction layer allowing POP3 commands to be used based on IMAP equivalents. This driver implements the following POP3-related RFCs:
  - STD 53/RFC 1939: POP3 specification
  - RFC 2195: CRAM-MD5 authentication
  - RFC 2449: POP3 extension mechanism
  - RFC 2595/4616: PLAIN authentication
  - RFC 2831: DIGEST-MD5 SASL Authentication (obsoleted by RFC 6331)
  - RFC 3206: AUTH/SYS response codes
  - RFC 4616: AUTH=PLAIN
  - RFC 5034: POP3 SASL
  - RFC 5802: AUTH=SCRAM-SHA-1
  - RFC 6856: UTF8, LANG
Author: Richard Heyes ([email protected])
Author: Michael Slusarz ([email protected])
Inheritance: extends Horde_Imap_Client_Base
Datei anzeigen Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_defaultPorts array The default ports to use for a connection.
$_deleted array The list of deleted messages.
$_fetchDataClass string This object returns POP3 Fetch data objects.

Public Methods

Method Description
__get ( $name )
getIdsOb ( $ids = null, $sequence = false )
resolveIds ( Horde_Imap_Client_Mailbox $mailbox, Horde_Imap_Client_Ids $ids, $convert )

Protected Methods

Method Description
_append ( Horde_Imap_Client_Mailbox $mailbox, $data, $options )
_check ( )
_close ( $options )
_connect ( ) Connects to the server.
_copy ( Horde_Imap_Client_Mailbox $dest, $options )
_createMailbox ( Horde_Imap_Client_Mailbox $mailbox, $opts )
_deleteACL ( Horde_Imap_Client_Mailbox $mailbox, $identifier )
_deleteMailbox ( Horde_Imap_Client_Mailbox $mailbox )
_expunge ( array $options )
_fetch ( Horde_Imap_Client_Fetch_Results $results, $queries )
_fetchCmd ( Horde_Imap_Client_Fetch_Results $results, array $options ) Fetch data for a given fetch query.
_getACL ( Horde_Imap_Client_Mailbox $mailbox )
_getComparator ( )
_getID ( ) Return implementation information from the POP3 server (RFC 2449 [6.9]).
_getLanguage ( $list )
_getMetadata ( Horde_Imap_Client_Mailbox $mailbox, $entries, $options )
_getMyACLRights ( Horde_Imap_Client_Mailbox $mailbox )
_getNamespaces ( )
_getQuota ( Horde_Imap_Client_Mailbox $root )
_getQuotaRoot ( Horde_Imap_Client_Mailbox $mailbox )
_getResponse ( mixed $multiline = false ) : array Gets a line from the stream and parses it.
_getSearchCache ( $type, $options )
_getSeqIds ( Horde_Imap_Client_Ids $ids ) : array Returns a list of sequence IDs.
_initCache ( $current = false )
_initCapability ( )
_listACLRights ( Horde_Imap_Client_Mailbox $mailbox, $identifier )
_listMailboxes ( $pattern, $mode, $options )
_login ( )
_logout ( )
_noop ( )
_openMailbox ( Horde_Imap_Client_Mailbox $mailbox, $mode )
_parseResponseCode ( string $text ) : object Parses response text for response codes (RFC 2449 [8]).
_pop3Cache ( string $type, integer $index = self::MBOX_CACHE, mixed $data = null ) : mixed Retrieve locally cached message data.
_processString ( string $str, array $opts ) : string Process a string response based on criteria options.
_renameMailbox ( Horde_Imap_Client_Mailbox $old, Horde_Imap_Client_Mailbox $new )
_search ( $query, $options )
_sendID ( $info )
_sendLine ( string $cmd, array $options = [] ) : array Perform a command on the server. A connection to the server must have already been made.
_setACL ( Horde_Imap_Client_Mailbox $mailbox, $identifier, $options )
_setComparator ( $comparator )
_setLanguage ( $langs )
_setMetadata ( Horde_Imap_Client_Mailbox $mailbox, $data )
_setQuota ( Horde_Imap_Client_Mailbox $root, $options )
_status ( $mboxes, integer $flags )
_store ( array $options )
_subscribeMailbox ( Horde_Imap_Client_Mailbox $mailbox, $subscribe )
_thread ( $options )
_tryLogin ( string $method ) Authenticate to the POP3 server.
_vanished ( $modseq, Horde_Imap_Client_Ids $ids )

Method Details

__get() public method

public __get ( $name )

_append() protected method

protected _append ( Horde_Imap_Client_Mailbox $mailbox, $data, $options )
$mailbox Horde_Imap_Client_Mailbox

_check() protected method

protected _check ( )

_close() protected method

protected _close ( $options )

_connect() protected method

Connects to the server.
protected _connect ( )

_copy() protected method

protected _copy ( Horde_Imap_Client_Mailbox $dest, $options )
$dest Horde_Imap_Client_Mailbox

_createMailbox() protected method

protected _createMailbox ( Horde_Imap_Client_Mailbox $mailbox, $opts )
$mailbox Horde_Imap_Client_Mailbox

_deleteACL() protected method

protected _deleteACL ( Horde_Imap_Client_Mailbox $mailbox, $identifier )
$mailbox Horde_Imap_Client_Mailbox

_deleteMailbox() protected method

protected _deleteMailbox ( Horde_Imap_Client_Mailbox $mailbox )
$mailbox Horde_Imap_Client_Mailbox

_expunge() protected method

protected _expunge ( array $options )
$options array Additional options. 'ids' has no effect in this driver.

_fetch() protected method

protected _fetch ( Horde_Imap_Client_Fetch_Results $results, $queries )
$results Horde_Imap_Client_Fetch_Results

_fetchCmd() protected method

Fetch data for a given fetch query.
protected _fetchCmd ( Horde_Imap_Client_Fetch_Results $results, array $options )
$results Horde_Imap_Client_Fetch_Results Fetch results.
$options array Fetch query options.

_getACL() protected method

protected _getACL ( Horde_Imap_Client_Mailbox $mailbox )
$mailbox Horde_Imap_Client_Mailbox

_getComparator() protected method

protected _getComparator ( )

_getID() protected method

Return implementation information from the POP3 server (RFC 2449 [6.9]).
protected _getID ( )

_getLanguage() protected method

protected _getLanguage ( $list )

_getMetadata() protected method

protected _getMetadata ( Horde_Imap_Client_Mailbox $mailbox, $entries, $options )
$mailbox Horde_Imap_Client_Mailbox

_getMyACLRights() protected method

protected _getMyACLRights ( Horde_Imap_Client_Mailbox $mailbox )
$mailbox Horde_Imap_Client_Mailbox

_getNamespaces() protected method

protected _getNamespaces ( )

_getQuota() protected method

protected _getQuota ( Horde_Imap_Client_Mailbox $root )
$root Horde_Imap_Client_Mailbox

_getQuotaRoot() protected method

protected _getQuotaRoot ( Horde_Imap_Client_Mailbox $mailbox )
$mailbox Horde_Imap_Client_Mailbox

_getResponse() protected method

Gets a line from the stream and parses it.
protected _getResponse ( mixed $multiline = false ) : array
$multiline mixed 'array', 'none', 'stream', or null.
return array An array with the following keys: - data: (mixed) Stream, array, or null. - resp: (string) The server response text.

_getSearchCache() protected method

protected _getSearchCache ( $type, $options )

_getSeqIds() protected method

Returns a list of sequence IDs.
protected _getSeqIds ( Horde_Imap_Client_Ids $ids ) : array
$ids Horde_Imap_Client_Ids The ID list.
return array A list of sequence IDs.

_initCache() protected method

protected _initCache ( $current = false )

_initCapability() protected method

protected _initCapability ( )

_listACLRights() protected method

protected _listACLRights ( Horde_Imap_Client_Mailbox $mailbox, $identifier )
$mailbox Horde_Imap_Client_Mailbox

_listMailboxes() protected method

protected _listMailboxes ( $pattern, $mode, $options )

_login() protected method

protected _login ( )

_logout() protected method

protected _logout ( )

_noop() protected method

protected _noop ( )

_openMailbox() protected method

protected _openMailbox ( Horde_Imap_Client_Mailbox $mailbox, $mode )
$mailbox Horde_Imap_Client_Mailbox

_parseResponseCode() protected method

Parses response text for response codes (RFC 2449 [8]).
protected _parseResponseCode ( string $text ) : object
$text string The response text.
return object An object with the following properties: - code: (string) The response code, if it exists. - data: (string) The response code data, if it exists. - text: (string) The human-readable response text.

_pop3Cache() protected method

Retrieve locally cached message data.
protected _pop3Cache ( string $type, integer $index = self::MBOX_CACHE, mixed $data = null ) : mixed
$type string Either 'hdr', 'hdrob', 'msg', 'size', 'stat', 'top', or 'uidl'.
$index integer The message index.
$data mixed Additional information needed.
return mixed The cached data. 'msg' returns a stream resource. All other types return strings.

_processString() protected method

Process a string response based on criteria options.
protected _processString ( string $str, array $opts ) : string
$str string The original string.
$opts array The criteria options.
return string The requested string.

_renameMailbox() protected method

protected _renameMailbox ( Horde_Imap_Client_Mailbox $old, Horde_Imap_Client_Mailbox $new )
$old Horde_Imap_Client_Mailbox
$new Horde_Imap_Client_Mailbox

_sendID() protected method

protected _sendID ( $info )

_sendLine() protected method

Perform a command on the server. A connection to the server must have already been made.
protected _sendLine ( string $cmd, array $options = [] ) : array
$cmd string The command to execute.
$options array Additional options:
  - debug: (string) When debugging, send this string instead of the
           actual command/data sent.
           DEFAULT: Raw data output to debug stream.
  - multiline: (mixed) 'array', 'none', or 'stream'.
return array See _getResponse().

_setACL() protected method

protected _setACL ( Horde_Imap_Client_Mailbox $mailbox, $identifier, $options )
$mailbox Horde_Imap_Client_Mailbox

_setComparator() protected method

protected _setComparator ( $comparator )

_setLanguage() protected method

protected _setLanguage ( $langs )

_setMetadata() protected method

protected _setMetadata ( Horde_Imap_Client_Mailbox $mailbox, $data )
$mailbox Horde_Imap_Client_Mailbox

_setQuota() protected method

protected _setQuota ( Horde_Imap_Client_Mailbox $root, $options )
$root Horde_Imap_Client_Mailbox

_status() protected method

protected _status ( $mboxes, integer $flags )
$flags integer This driver only supports the options listed under Horde_Imap_Client::STATUS_ALL.

_store() protected method

protected _store ( array $options )
$options array Additional options. This driver does not support 'unchangedsince'.

_subscribeMailbox() protected method

protected _subscribeMailbox ( Horde_Imap_Client_Mailbox $mailbox, $subscribe )
$mailbox Horde_Imap_Client_Mailbox

_thread() protected method

protected _thread ( $options )

_tryLogin() protected method

Authenticate to the POP3 server.
protected _tryLogin ( string $method )
$method string POP3 login method.

_vanished() protected method

protected _vanished ( $modseq, Horde_Imap_Client_Ids $ids )
$ids Horde_Imap_Client_Ids

getIdsOb() public method

public getIdsOb ( $ids = null, $sequence = false )

resolveIds() public method

public resolveIds ( Horde_Imap_Client_Mailbox $mailbox, Horde_Imap_Client_Ids $ids, $convert )
$mailbox Horde_Imap_Client_Mailbox
$ids Horde_Imap_Client_Ids

Property Details

$_defaultPorts protected_oe property

The default ports to use for a connection.
protected array $_defaultPorts
return array

$_deleted protected_oe property

The list of deleted messages.
protected array $_deleted
return array

$_fetchDataClass protected_oe property

This object returns POP3 Fetch data objects.
protected string $_fetchDataClass
return string