PHP Класс IMP_Ajax_Queue, horde

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

Открытые свойства

Свойство Тип Описание
$ftreeCallback callback Callback method to use for each ftree element.

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

Свойство Тип Описание
$_addr array The list of compose autocompleter address error data.
$_atc array The list of attachments.
$_compose IMP_Compose The compose object.
$_flag array Flag entries to add to response.
$_flagconfig integer Add flag configuration to response.
$_mailboxOpts array Mailbox options.
$_maillog array Maillog queue.
$_messages array Message queue.
$_poll array If null, don't output polled information unless explicitly told to.
$_quota mixed Array w/2 keys: mailbox, force If null, never sends quota information.

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

Метод Описание
add ( IMP_Ajax_Application $ajax ) Generates AJAX response task data from the queue.
attachment ( mixed $ob, integer $type = IMP_Compose::COMPOSE ) Return information about the current attachment(s) for a message.
compose ( IMP_Compose $ob ) Add compose data to the output.
compose_addr ( string $domid, string $itemid, string $class ) Add address autocomplete error info.
flag ( array $flags, boolean $add, IMP_Indices $indices ) Add flag entry to response queue.
flagConfig ( integer $view ) Add flag configuration information to response queue.
flagReplace ( IMP_Indices $indices ) Sends replacement flag information for the indices provided.
maillog ( IMP_Indices $indices ) Add maillog data to output.
message ( IMP_Indices $indices, array $opts = [] ) Add message data to output.
poll ( mixed $mboxes, boolean $explicit = false ) Add poll entry to response queue.
quota ( string | null $mailbox, boolean $force = true ) Add quota entry to response queue.
setMailboxOpt ( array $name, mixed $value ) Add additional options to the mailbox output.

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

Метод Описание
_addFtreeInfo ( IMP_Ajax_Application $ajax ) Add folder tree information.
_addMaillogInfo ( IMP_Ajax_Application $ajax ) Add maillog information.
_ftreeElt ( string $id ) : mixed Create a folder tree element.

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

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

Add folder tree information.
protected _addFtreeInfo ( IMP_Ajax_Application $ajax )
$ajax IMP_Ajax_Application The AJAX object.

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

Add maillog information.
protected _addMaillogInfo ( IMP_Ajax_Application $ajax )
$ajax IMP_Ajax_Application The AJAX object.

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

Create a folder tree element.
protected _ftreeElt ( string $id ) : mixed
$id string Tree element ID.
Результат mixed The element object, or null if the element is not active. Object contains the following properties: - ch: (boolean) [children] Does the mailbox contain children? DEFAULT: no - cl: (string) [class] The CSS class. DEFAULT: 'folderImg' - co: (boolean) [container] Is this mailbox a container element? DEFAULT: no - fs: (boolean) [boolean] Fixed element for sorting purposes. DEFAULT: no - i: (string) [icon] A user defined icon to use. DEFAULT: none - l: (string) [label] The mailbox display label. - m: (string) [mbox] The mailbox value (base64url encoded). - n: (boolean) [non-imap] A non-IMAP element? DEFAULT: no - nc: (boolean) [no children] Does the element not allow children? DEFAULT: no - ns: (boolean) [no sort] Don't sort on browser. DEFAULT: no - pa: (string) [parent] The parent element. DEFAULT: ImpCore.conf.base_mbox - po: (boolean) [polled] Is the element polled? DEFAULT: no - r: (integer) [remote] Is this a "remote" element? 1 is the remote container, 2 is a remote account, and 3 is a remote mailbox. DEFAULT: 0 - s: (boolean) [special] Is this a "special" element? DEFAULT: no - t: (string) [title] Mailbox title. DEFAULT: 'l' val - un: (boolean) [unsubscribed] Is this mailbox unsubscribed? DEFAULT: no - v: (integer) [virtual] Virtual folder? 0 = not vfolder, 1 = system vfolder, 2 = user vfolder DEFAULT: 0

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

For compose autocomplete address error data (key: 'compose-addr'), an array with keys as the autocomplete DOM element and the values as arrays. The value arrays have keys as the autocomplete address ID, and the value is a space-separated list of classnames to add. For compose attachment data (key: 'compose-atc'), an array of objects with these properties: - icon: (string) Data url string containing icon information. - name: (string) The attachment name - num: (integer) The current attachment number - size: (string) The size of the attachment - type: (string) The MIME type of the attachment - view: (boolean) Link to attachment preivew page For compose cacheid data (key: 'compose'), an object with these properties: - atclimit: (integer) If set, the number of further attachments that are allowed. - atcmax: (integer) The maximum size (in bytes) of an attachment. - cacheid: (string) Current cache ID of the compose message. - hmac: (string) HMAC string used to validate draft in case of session timeout. For flag data (key: 'flag'), an array of objects with these properties: - add: (array) The list of flags that were added. - buids: (string) Indices of the messages that have changed (IMAP sequence string; mboxes are base64url encoded). - remove: (array) The list of flags that were removed. - replace: (array) Replace the flag list with these flags. For flag configuration data (key: 'flag-config'), an array containing flag data. All flags returned in dynamic mode; only flags labeled below as [sm] are returned in smartmobile mode: - a: (boolean) Indicates a flag that can be *a*ltered. - b: (string) Background color [sm]. - c: (string) CSS class. - f: (string) Foreground color [sm]. - i: (string) CSS icon [sm]. - id: (string) Flag ID (IMAP flag id). - l: (string) Flag label [sm]. - s: (boolean) Indicates a flag that can be *s*earched for [sm]. - u: (boolean) Indicates a *u*ser flag. For mailbox data (key: 'mailbox'), an array with these keys: - a: (array) Mailboxes that were added (base64url encoded). - all: (integer) If true, all mailboxes should be shown. - base: (string) Base mailbox (base64url encoded). - c: (array) Mailboxes that were changed (base64url encoded). - d: (array) Mailboxes that were deleted (base64url encoded). - expand: (integer) Expand subfolders on load. - switch: (string) Load this mailbox (base64url encoded). For maillog data (key: 'maillog'), an object with these properties: - buid: (integer) BUID. - log: (array) List of log entries. - mbox: (string) Mailbox. For message preview data (key: 'message'), an object with these properties: - buid: (integer) BUID. - data: (object) Message viewport data. - mbox: (string) Mailbox. For poll data (key: 'poll'), an array with keys as base64url encoded mailbox names, values as the number of unseen messages. For quota data (key: 'quota'), an array with these keys: - m: (string) Quota message. - p: (integer) Quota percentage.
public add ( IMP_Ajax_Application $ajax )
$ajax IMP_Ajax_Application The AJAX object.

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

Return information about the current attachment(s) for a message.
public attachment ( mixed $ob, integer $type = IMP_Compose::COMPOSE )
$ob mixed If an IMP_Compose object, return info on all attachments. If an IMP_Compose_Attachment object, only return information on that object.
$type integer The compose type.

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

Add compose data to the output.
public compose ( IMP_Compose $ob )
$ob IMP_Compose The compose object.

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

Add address autocomplete error info.
public compose_addr ( string $domid, string $itemid, string $class )
$domid string The autocomplete DOM ID.
$itemid string The autocomplete address ID.
$class string The classname to add to the address entry.

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

Add flag entry to response queue.
public flag ( array $flags, boolean $add, IMP_Indices $indices )
$flags array List of flags that have changed.
$add boolean Were the flags added?
$indices IMP_Indices Indices object.

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

Add flag configuration information to response queue.
public flagConfig ( integer $view )
$view integer The current view.

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

Sends replacement flag information for the indices provided.
public flagReplace ( IMP_Indices $indices )
$indices IMP_Indices Indices object.

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

Add maillog data to output.
public maillog ( IMP_Indices $indices )
$indices IMP_Indices Indices object.

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

Add message data to output.
public message ( IMP_Indices $indices, array $opts = [] )
$indices IMP_Indices Index of the message.
$opts array Additional options:
  - is_list: (boolean) Do list check?
  - peek: (boolean) Don't set seen flag?
  - user_headers: (boolean) Add user headers?

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

Add poll entry to response queue.
public poll ( mixed $mboxes, boolean $explicit = false )
$mboxes mixed A mailbox name or list of mailbox names.
$explicit boolean If true, explicitly output poll information. Otherwise, add only if not disabled.

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

Add quota entry to response queue.
public quota ( string | null $mailbox, boolean $force = true )
$mailbox string | null Mailbox to query for quota. If null, disables quota output.
$force boolean If true, force output. If false, output based on configured quota interval.

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

Add additional options to the mailbox output.
public setMailboxOpt ( array $name, mixed $value )
$name array Option name.
$value mixed Option value.

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

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

The list of compose autocompleter address error data.
protected array $_addr
Результат array

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

The list of attachments.
protected array $_atc
Результат array

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

The compose object.
protected IMP_Compose $_compose
Результат IMP_Compose

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

Flag entries to add to response.
protected array $_flag
Результат array

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

Add flag configuration to response.
protected int $_flagconfig
Результат integer

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

Mailbox options.
protected array $_mailboxOpts
Результат array

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

Maillog queue.
protected array $_maillog
Результат array

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

Message queue.
protected array $_messages
Результат array

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

If null, don't output polled information unless explicitly told to.
protected array $_poll
Результат array

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

Array w/2 keys: mailbox, force If null, never sends quota information.
protected mixed $_quota
Результат mixed

$ftreeCallback публичное свойство

Callback method to use for each ftree element.
public callback $ftreeCallback
Результат callback