Class Horde_Imap_Client
Base class for Horde_Imap_Client package. Defines common constants and
provides factory for creating an IMAP client object.
Copyright 2008-2012 Horde LLC (http://www.horde.org/)
See the enclosed file COPYING for license information (LGPL). If you
did not receive this file, see http://www.horde.org/licenses/lgpl21.
Methods summary
public static
Horde_Imap_Client_Base
|
#
factory( string $driver, array $params = array() )
Attempts to return a concrete Horde_Imap_Client instance based on
$driver.
Attempts to return a concrete Horde_Imap_Client instance based on
$driver.
Parameters
- $driver
- The type of concrete subclass to return.
- $params
- Configuration parameters:
<ul>
<li>REQUIRED Parameters
<ul>
<li>password: (string) The IMAP user password.</li>
<li>username: (string) The IMAP username.</li>
</ul>
</li>
<li>Optional Parameters
<ul>
<li>
cache: (array) If set, caches data from fetch(), search(), and
thread() calls. Requires the horde/Cache package to be
installed. The array can contain the following keys (see
Horde_Imap_Client_Cache for default values):
<ul>
<li>
cacheob: [REQUIRED] (Horde_Cache) The cache object to
use.
</li>
<li>
fetch_ignore: (array) A list of mailboxes to ignore when storing
fetch data.
</li>
<li>
fields: (array) The fetch criteria to cache. If not defined, all
cacheable data is cached. The following is a list of
criteria that can be cached:
<ul>
<li>Horde_Imap_Client::FETCH_ENVELOPE</li>
<li>Horde_Imap_Client::FETCH_FLAGS
<ul>
<li>
Only if server supports CONDSTORE extension
</li>
</ul>
</li>
<li>Horde_Imap_Client::FETCH_HEADERS
<ul>
<li>
Only for queries that specifically request caching
</li>
</ul>
</li>
<li>Horde_Imap_Client::FETCH_IMAPDATE</li>
<li>Horde_Imap_Client::FETCH_SIZE</li>
<li>Horde_Imap_Client::FETCH_STRUCTURE</li>
</ul>
</li>
<li>
lifetime: (integer) Lifetime of the cache data (in seconds).
</li>
<li>
slicesize: (integer) The slicesize to use.
</li>
</ul>
</li>
<li>
capability_ignore: (array) A list of IMAP capabilites to ignore,
even if they are supported on the server.
DEFAULT: No supported capabilities are ignored.
</li>
<li>
comparator: (string) The search comparator to use instead of the
default IMAP server comparator. See
Horde_Imap_Client_Base#setComparator() for format.
DEFAULT: Use the server default
</li>
<li>
debug: (string) If set, will output debug information to the stream
provided. The value can be any PHP supported wrapper that
can be opened via fopen().
DEFAULT: No debug output
</li>
<li>
encryptKey: (array) A callback to a function that returns the key
used to encrypt the password. This function MUST be
static.
DEFAULT: No encryption
</li>
<li>
hostspec: (string) The hostname or IP address of the server.
DEFAULT: 'localhost'
</li>
<li>
id: (array) Send ID information to the IMAP server (only if server
supports the ID extension). An array with the keys as the
fields to send and the values being the associated values. See
RFC 2971 [3.3] for a list of defined standard field values.
DEFAULT: No info sent to server
</li>
<li>
lang: (array) A list of languages (in priority order) to be used to
display human readable messages.
DEFAULT: Messages output in IMAP server default language
</li>
<li>
log: (array) A callback to a function that receives a single
parameter: a Horde_Imap_Client_Exception object. This callback
function MUST be static.
DEFAULT: No logging
</li>
<li>
port: (integer) The server port to which we will connect.
DEFAULT: 143 (imap or imap w/TLS) or 993 (imaps)
</li>
<li>
secure: (string) Use SSL or TLS to connect.
VALUES:
<ul>
<li>false</li>
<li>'ssl' (Auto-detect SSL version)</li>
<li>'sslv2' (Force SSL version 2)</li>
<li>'sslv3' (Force SSL version 3)</li>
<li>'tls'</li>
</ul>
DEFAULT: No encryption</li>
</li>
<li>
statuscache: (boolean) Cache STATUS responses?
DEFAULT: False
</li>
<li>
timeout: (integer) Connection timeout, in seconds.
DEFAULT: 30 seconds
</li>
</ul>
</li>
</ul>
Returns
|
Properties summary
public static
array
|
$capability_deps
|
#
array(
'QRESYNC' => array(
'ENABLE'
),
'SEARCHRES' => array(
'ESEARCH'
),
'LANGUAGE' => array(
'NAMESPACE'
),
'SORT=DISPLAY' => array(
'SORT'
)
)
|