PHP Класс IMP_Imap, horde

Автор: Michael Slusarz ([email protected])
Наследование: implements Serializable
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_backends array Cached backend configuration.
$_changed boolean Has this object changed?
$_config IMP_Imap_Config Backend config.
$_id string Object identifier.
$_ob Horde_Imap_Client_Base The IMAP client object.
$_temp array Temporary data cache (destroyed at end of request).

Открытые методы

Метод Описание
__call ( string $method, array $params ) : mixed All other calls to this class are routed to the underlying Horde_Imap_Client_Base object.
__construct ( string $id ) Constructor.
__get ( $key )
__toString ( )
access ( integer $right ) : boolean Checks access rights for a server.
accessCompose ( integer $right, integer $data ) : boolean Checks compose access rights for a server.
createBaseImapObject ( string $username, string $password, string $skey ) : Horde_Imap_Client_Base Create the base Horde_Imap_Client object (from an entry in backends.php).
createImapObject ( array $config, boolean $imap = true ) : Horde_Imap_Client_Base Create a Horde_Imap_Client object.
doPostLoginTasks ( ) Perform post-login tasks.
getCacheId ( string $mailbox, array $addl = [] ) : string Return the cache ID for this mailbox.
getNamespace ( string $mailbox, boolean $personal = false ) : mixed Get namespace info for a full mailbox path.
getSlices ( string $mbox, Horde_Imap_Client_Ids $ids, integer $size = 5242880 ) : array Returns a list of messages, split into slices based on the total message size.
isImap ( ) : boolean Determine if this is a connection to an IMAP server.
isPop3 ( ) : boolean Determine if this is a connection to an IMAP server.
loadServerConfig ( string $server = null ) : mixed Loads the IMP server configuration from backends.php.
parseCacheId ( string $id ) : array Parses the cache ID for this mailbox.
serialize ( )
unserialize ( $data )
updateFetchIgnore ( ) Update the list of mailboxes to ignore when caching FETCH data in the IMAP client object.

Защищенные методы

Метод Описание
_copy ( ) Handle copy() calls that hit multiple servers.
_getPerm ( string $perm ) : string Get the full permission name for a permission.
_renameMailbox ( ) Handle copy() calls. This call may hit multiple servers, so need to handle separately from other IMAP calls.
_search ( string $mailbox, Horde_Imap_Client_Search_Query $query = null, array $opts = [] ) : array Prepares an IMAP search query. Needed because certain configuration parameters may need to be dynamically altered before passed to the Imap_Client object.
_status ( $args ) Handle status() calls. This call may hit multiple servers.

Описание методов

__call() публичный Метод

All other calls to this class are routed to the underlying Horde_Imap_Client_Base object.
public __call ( string $method, array $params ) : mixed
$method string Method name.
$params array Method parameters.
Результат mixed The return from the requested method.

__construct() публичный Метод

Constructor.
public __construct ( string $id )
$id string Object identifier.

__get() публичный Метод

public __get ( $key )

__toString() публичный Метод

public __toString ( )

_copy() защищенный Метод

Handle copy() calls that hit multiple servers.
protected _copy ( )

_getPerm() защищенный Метод

Get the full permission name for a permission.
protected _getPerm ( string $perm ) : string
$perm string The permission.
Результат string The full (backend-specific) permission name.

_renameMailbox() защищенный Метод

Handle copy() calls. This call may hit multiple servers, so need to handle separately from other IMAP calls.
protected _renameMailbox ( )

_status() защищенный Метод

Handle status() calls. This call may hit multiple servers.
protected _status ( $args )

access() публичный Метод

Checks access rights for a server.
public access ( integer $right ) : boolean
$right integer Access right.
Результат boolean Does the access right exist?

accessCompose() публичный Метод

Checks compose access rights for a server.
public accessCompose ( integer $right, integer $data ) : boolean
$right integer Access right.
$data integer Data required to check the rights: - ACCESS_COMPOSE_BODYSIZE The size of the body data. - ACCESS_COMPOSE_RECIPIENTS - ACCESS_COMPOSE_TIMELIMIT The number of e-mail recipients.
Результат boolean Is the access allowed?

createBaseImapObject() публичный Метод

Create the base Horde_Imap_Client object (from an entry in backends.php).
public createBaseImapObject ( string $username, string $password, string $skey ) : Horde_Imap_Client_Base
$username string The username to authenticate with.
$password string The password to authenticate with.
$skey string Create a new object using this server key.
Результат Horde_Imap_Client_Base Client object.

createImapObject() публичный Метод

Create a Horde_Imap_Client object.
public createImapObject ( array $config, boolean $imap = true ) : Horde_Imap_Client_Base
$config array The IMAP configuration.
$imap boolean True if IMAP connection, false if POP3.
Результат Horde_Imap_Client_Base Client object.

doPostLoginTasks() публичный Метод

Perform post-login tasks.
public doPostLoginTasks ( )

getCacheId() публичный Метод

Return the cache ID for this mailbox.
public getCacheId ( string $mailbox, array $addl = [] ) : string
$mailbox string The mailbox name (UTF-8).
$addl array Local IMP metadata to add to the cache ID.
Результат string The cache ID.

getNamespace() публичный Метод

Get namespace info for a full mailbox path.
public getNamespace ( string $mailbox, boolean $personal = false ) : mixed
$mailbox string The mailbox path. (self:NS_DEFAULT will return the default personal namespace.)
$personal boolean If true, will return empty namespace only if it is a personal namespace.
Результат mixed The namespace info for the mailbox path or null if the path doesn't exist.

getSlices() публичный Метод

Returns a list of messages, split into slices based on the total message size.
public getSlices ( string $mbox, Horde_Imap_Client_Ids $ids, integer $size = 5242880 ) : array
$mbox string IMAP mailbox.
$ids Horde_Imap_Client_Ids ID list.
$size integer Maximum size of a slice.
Результат array An array of Horde_Imap_Client_Ids objects.

isImap() публичный Метод

Determine if this is a connection to an IMAP server.
public isImap ( ) : boolean
Результат boolean True if connected to IMAP server.

isPop3() публичный Метод

Determine if this is a connection to an IMAP server.
public isPop3 ( ) : boolean
Результат boolean True if connected to IMAP server.

loadServerConfig() публичный статический Метод

Loads the IMP server configuration from backends.php.
public static loadServerConfig ( string $server = null ) : mixed
$server string Returns this labeled entry only.
Результат mixed If $server is set return this entry; else, return the entire servers array. Returns false on error.

parseCacheId() публичный Метод

Parses the cache ID for this mailbox.
public parseCacheId ( string $id ) : array
$id string Cache ID generated by getCacheId().
Результат array Two element array: - date: (integer) Date information (day of year), if embedded in cache ID. - token: (string) Mailbox sync token.

serialize() публичный Метод

public serialize ( )

unserialize() публичный Метод

public unserialize ( $data )

updateFetchIgnore() публичный Метод

Update the list of mailboxes to ignore when caching FETCH data in the IMAP client object.
public updateFetchIgnore ( )

Описание свойств

$_backends защищенное статическое свойство

Cached backend configuration.
protected static array $_backends
Результат array

$_changed защищенное свойство

Has this object changed?
protected bool $_changed
Результат boolean

$_config защищенное свойство

Backend config.
protected IMP_Imap_Config $_config
Результат IMP_Imap_Config

$_id защищенное свойство

Object identifier.
protected string $_id
Результат string

$_ob защищенное свойство

The IMAP client object.
protected Horde_Imap_Client_Base $_ob
Результат Horde_Imap_Client_Base

$_temp защищенное свойство

Temporary data cache (destroyed at end of request).
protected array $_temp
Результат array