Class rcube_result_thread

Description

Class for accessing IMAP's THREAD result

Located in /rcube_result_thread.php (line 31)


	
			
Class Constant Summary
Variable Summary
 mixed $mailbox
 mixed $meta
 mixed $order
 mixed $raw_data
Method Summary
 rcube_result_thread __construct ([ $mailbox = null], [ $data = null])
 void build_thread ( $items, [ $level = 1], [ &$pos = 0])
 void build_thread_data ( $data,  &$depth,  &$children, [ $level = 0])
 int count ()
 boolean exists (int $msgid, [bool $get_index = false])
 void filter (array $roots)
 array get ()
 array get_compressed ()
 int get_element (int|string $index)
 array|string get_parameters ([string $param = null])
 array get_thread_data ()
 array get_tree ()
 void init ([string $data = null])
 bool is_empty ()
 bool is_error ()
 int max ()
 int min ()
 void parse_thread ( $str, [ $begin = 0], [ $end = 0], [ $depth = 0])
 void revert ()
 void slice ($offset $offset, $length $length)
 void sort (rcube_result_index $index)
Variables
mixed $mailbox (line 34)
  • access: protected
mixed $meta = array() (line 35)
  • access: protected
mixed $order = 'ASC' (line 36)
  • access: protected
mixed $raw_data (line 33)
  • access: protected
Methods
Constructor __construct (line 46)

Object constructor.

  • access: public
rcube_result_thread __construct ([ $mailbox = null], [ $data = null])
  • $mailbox
  • $data
build_thread (line 572)

Converts part of the raw thread into an array

  • access: protected
void build_thread ( $items, [ $level = 1], [ &$pos = 0])
  • $items
  • $level
  • &$pos
build_thread_data (line 556)

Creates 'depth' and 'children' arrays from stored thread 'tree' data.

  • access: protected
void build_thread_data ( $data,  &$depth,  &$children, [ $level = 0])
  • $data
  • &$depth
  • &$children
  • $level
count (line 114)

Returns number of elements (threads) in the result

  • return: Number of elements
  • access: public
int count ()
count_messages (line 138)

Returns number of all messages in the result

  • return: Number of elements
  • access: public
int count_messages ()
exists (line 283)

Check if the given message ID exists in the object

  • return: True on success, False if message ID doesn't exist
  • access: public
boolean exists (int $msgid, [bool $get_index = false])
  • int $msgid: Message ID
  • bool $get_index: When enabled element's index will be returned. Elements are indexed starting with 0
filter (line 209)

Filters data set. Removes threads not listed in $roots list.

  • access: public
void filter (array $roots)
  • array $roots: List of IDs of thread roots.
get (line 323)

Return IDs of all messages in the result. Threaded data will be flattened.

  • return: List of message identifiers
  • access: public
array get ()
get_compressed (line 342)

Return all messages in the result.

  • return: List of message identifiers
  • access: public
array get_compressed ()
get_element (line 359)

Return result element at specified index (all messages, not roots)

  • return: Element value
  • access: public
int get_element (int|string $index)
  • int|string $index: Element's index or "FIRST" or "LAST"
get_parameters (line 429)

Returns response parameters e.g. MAILBOX, ORDER

  • return: Response parameters or parameter value
  • access: public
array|string get_parameters ([string $param = null])
  • string $param: Parameter name
get_thread_data (line 541)

Returns thread depth and children data

  • return: Thread data
  • access: public
array get_thread_data ()
get_tree (line 516)

Returns data as tree

  • return: Data tree
  • access: public
array get_tree ()
init (line 58)

Initializes object with IMAP command response

  • access: public
void init ([string $data = null])
  • string $data: IMAP response string
is_empty (line 103)

Checks if the result is empty

  • return: True if the result is empty, False otherwise
  • access: public
bool is_empty ()
is_error (line 92)

Checks the result from IMAP command

  • return: True if the result is an error, False otherwise
  • access: public
bool is_error ()
max (line 164)

Returns maximum message identifier in the result

  • return: Maximum message identifier
  • access: public
int max ()
min (line 178)

Returns minimum message identifier in the result

  • return: Minimum message identifier
  • access: public
int min ()
parse_thread (line 595)

IMAP THREAD response parser

  • access: protected
void parse_thread ( $str, [ $begin = 0], [ $end = 0], [ $depth = 0])
  • $str
  • $begin
  • $end
  • $depth
revert (line 247)

Reverts order of elements in the result

  • access: public
void revert ()
slice (line 193)

Slices data set.

  • access: public
void slice ($offset $offset, $length $length)
  • $offset $offset: Offset (as for PHP's array_slice())
  • $length $length: Number of elements (as for PHP's array_slice())
sort (line 448)

THREAD=REFS sorting implementation (based on provided index)

  • access: public
void sort (rcube_result_index $index)
Class Constants
SEPARATOR_ELEMENT = ' ' (line 38)
SEPARATOR_ITEM = '~' (line 39)
SEPARATOR_LEVEL = ':' (line 40)

Documentation generated on Wed, 23 May 2012 16:40:52 +0200 by phpDocumentor 1.4.4