Documentation

IMP_Ajax_Queue
in package

Defines an AJAX variable queue for IMP. These are variables that may be generated by various IMP code that should be added to the eventual output sent to the browser.

Tags
author

Michael Slusarz slusarz@horde.org

category

Horde

copyright

2011-2017 Horde LLC

license

http://www.horde.org/licenses/gpl GPL

Table of Contents

Properties

$ftreeCallback  : callable
Callback method to use for each ftree element.
$_addr  : array<string|int, mixed>
The list of compose autocompleter address error data.
$_atc  : array<string|int, mixed>
The list of attachments.
$_compose  : IMP_Compose
The compose object.
$_flag  : array<string|int, mixed>
Flag entries to add to response.
$_flagconfig  : int
Add flag configuration to response.
$_mailboxOpts  : array<string|int, mixed>
Mailbox options.
$_maillog  : array<string|int, mixed>
Maillog queue.
$_messages  : array<string|int, mixed>
Message queue.
$_poll  : array<string|int, mixed>
Poll mailboxes.
$_quota  : mixed
Add quota information to response?

Methods

add()  : mixed
Generates AJAX response task data from the queue.
attachment()  : mixed
Return information about the current attachment(s) for a message.
compose()  : mixed
Add compose data to the output.
compose_addr()  : mixed
Add address autocomplete error info.
flag()  : mixed
Add flag entry to response queue.
flagConfig()  : mixed
Add flag configuration information to response queue.
flagReplace()  : mixed
Sends replacement flag information for the indices provided.
maillog()  : mixed
Add maillog data to output.
message()  : mixed
Add message data to output.
poll()  : mixed
Add poll entry to response queue.
quota()  : mixed
Add quota entry to response queue.
setMailboxOpt()  : mixed
Add additional options to the mailbox output.
_addFtreeInfo()  : mixed
Add folder tree information.
_addMaillogInfo()  : mixed
Add maillog information.
_ftreeElt()  : mixed
Create a folder tree element.

Properties

$ftreeCallback

Callback method to use for each ftree element.

public callable $ftreeCallback

$_addr

The list of compose autocompleter address error data.

protected array<string|int, mixed> $_addr = array()

$_atc

The list of attachments.

protected array<string|int, mixed> $_atc = array()

$_flag

Flag entries to add to response.

protected array<string|int, mixed> $_flag = array()

$_flagconfig

Add flag configuration to response.

protected int $_flagconfig = 0

$_mailboxOpts

Mailbox options.

protected array<string|int, mixed> $_mailboxOpts = array()

$_maillog

Maillog queue.

protected array<string|int, mixed> $_maillog = array()

$_messages

Message queue.

protected array<string|int, mixed> $_messages = array()

$_poll

Poll mailboxes.

protected array<string|int, mixed> $_poll = array()

If null, don't output polled information unless explicitly told to.

$_quota

Add quota information to response?

protected mixed $_quota = \false

Array w/2 keys: mailbox, force If null, never sends quota information.

Methods

add()

Generates AJAX response task data from the queue.

public add(IMP_Ajax_Application $ajax) : mixed

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 altered.
  • 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 searched for [sm].
  • u: (boolean) Indicates a user 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.
Parameters
$ajax : IMP_Ajax_Application

The AJAX object.

attachment()

Return information about the current attachment(s) for a message.

public attachment(mixed $ob[, int $type = IMP_Compose::COMPOSE ]) : mixed
Parameters
$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 : int = IMP_Compose::COMPOSE

The compose type.

compose_addr()

Add address autocomplete error info.

public compose_addr(string $domid, string $itemid, string $class) : mixed
Parameters
$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<string|int, mixed> $flags, bool $add, IMP_Indices $indices) : mixed
Parameters
$flags : array<string|int, mixed>

List of flags that have changed.

$add : bool

Were the flags added?

$indices : IMP_Indices

Indices object.

flagConfig()

Add flag configuration information to response queue.

public flagConfig(int $view) : mixed
Parameters
$view : int

The current view.

flagReplace()

Sends replacement flag information for the indices provided.

public flagReplace(IMP_Indices $indices) : mixed
Parameters
$indices : IMP_Indices

Indices object.

message()

Add message data to output.

public message(IMP_Indices $indices[, array<string|int, mixed> $opts = array() ]) : mixed
Parameters
$indices : IMP_Indices

Index of the message.

$opts : array<string|int, mixed> = 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[, bool $explicit = false ]) : mixed
Parameters
$mboxes : mixed

A mailbox name or list of mailbox names.

$explicit : bool = false

If true, explicitly output poll information. Otherwise, add only if not disabled.

quota()

Add quota entry to response queue.

public quota(string|null $mailbox[, bool $force = true ]) : mixed
Parameters
$mailbox : string|null

Mailbox to query for quota. If null, disables quota output.

$force : bool = true

If true, force output. If false, output based on configured quota interval.

setMailboxOpt()

Add additional options to the mailbox output.

public setMailboxOpt(array<string|int, mixed> $name, mixed $value) : mixed
Parameters
$name : array<string|int, mixed>

Option name.

$value : mixed

Option value.

_ftreeElt()

Create a folder tree element.

protected _ftreeElt(string $id) : mixed
Parameters
$id : string

Tree element ID.

Return values
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

        
On this page

Search results