Class rcube_result_index

Description

Class for accessing IMAP's SORT/SEARCH/ESEARCH result

Located in /rcube_result_index.php (line 31)


	
			
Class Constant Summary
Variable Summary
 mixed $mailbox
 mixed $meta
 mixed $order
 mixed $params
 mixed $raw_data
Method Summary
 rcube_result_index __construct ([ $mailbox = null], [ $data = null])
 int count ()
 mixed exists (int $msgid, [bool $get_index = false])
 void filter ([array $ids = array()])
 array get ()
 array get_compressed ()
 int get_element (int|string $index)
 array|string get_parameters ([string $param = null])
 void init ([string $data = null])
 void intersect ([array $ids = array()])
 bool is_empty ()
 bool is_error ()
 int length ()
 int max ()
 int min ()
 void revert ()
 void slice ($offset $offset, $length $length)
Variables
mixed $mailbox (line 34)
  • access: protected
mixed $meta = array() (line 35)
  • access: protected
mixed $order = 'ASC' (line 37)
  • access: protected
mixed $params = array() (line 36)
  • access: protected
mixed $raw_data (line 33)
  • access: protected
Methods
Constructor __construct (line 45)

Object constructor.

  • access: public
rcube_result_index __construct ([ $mailbox = null], [ $data = null])
  • $mailbox
  • $data
count (line 156)

Returns number of elements in the result

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

Returns number of elements in the result.

Alias for count() for compatibility with rcube_result_thread

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

Check if the given message ID exists in the object

  • return: False if message ID doesn't exist, True if exists or index of the element if $get_index=true
  • access: public
mixed 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 238)

Filters data set. Removes elements listed in $ids list.

  • access: public
void filter ([array $ids = array()])
  • array $ids: List of IDs to remove.
get (line 330)

Return all messages in the result.

  • return: List of message IDs
  • access: public
array get ()
get_compressed (line 344)

Return all messages in the result.

  • return: List of message IDs
  • access: public
array get_compressed ()
get_element (line 361)

Return result element at specified index

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

Returns response parameters, e.g. ESEARCH's MIN/MAX/COUNT/ALL/MODSEQ or internal data e.g. MAILBOX, ORDER

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

Initializes object with SORT command response

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

Filters data set. Removes elements not listed in $ids list.

  • access: public
void intersect ([array $ids = array()])
  • array $ids: List of IDs to keep.
is_empty (line 145)

Checks if the result is empty

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

Checks the result from IMAP command

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

Returns length of internal data representation

  • return: Data length
  • access: protected
int length ()
max (line 190)

Returns maximal message identifier in the result

  • return: Maximal message identifier
  • access: public
int max ()
min (line 205)

Returns minimal message identifier in the result

  • return: Minimal message identifier
  • access: public
int min ()
revert (line 268)

Reverts order of elements in the result

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

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())
Class Constants
SEPARATOR_ELEMENT = ' ' (line 39)

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