Constants

ALL

ALL

"Special" representation constants.

SEARCH_RES

SEARCH_RES

LARGEST

LARGEST

Properties

$duplicates

$duplicates : boolean

Allow duplicate IDs?

Type

boolean

$all

$all : boolean

Does this represent an ALL message set?

Type

boolean

$ids

$ids : array

The list of IDs.

Type

array

$largest

$largest : boolean

Does this represent the largest ID in use?

Type

boolean

$max

$max : string

The largest ID (@since 2.20.0).

Type

string

$min

$min : string

The smallest ID (@since 2.20.0).

Type

string

$range_string

$range_string : string

Generates a range string consisting of all messages between begin and end of ID list.

Type

string

$search_res

$search_res : boolean

Does this represent a search result?

Type

boolean

$sequence

$sequence : boolean

Are these sequence IDs? If false, these are UIDs.

Type

boolean

$special

$special : boolean

True if this is a "special" ID representation.

Type

boolean

$tostring

$tostring : string

Return the non-sorted string representation.

Type

string

$tostring_sort

$tostring_sort : string

Return the sorted string representation.

Type

string

$_ids

$_ids : mixed

List of IDs.

Type

mixed

$_sequence

$_sequence : boolean

Are IDs message sequence numbers?

Type

boolean

$_sorted

$_sorted : boolean

Are IDs sorted?

Type

boolean

Methods

__construct()

__construct(mixed  $ids = null, boolean  $sequence = false) 

Constructor.

Parameters

mixed $ids

See self::add().

boolean $sequence

Are $ids message sequence numbers?

__get()

__get(  $name) 

Parameters

$name

__toString()

__toString() 

add()

add(mixed  $ids) 

Add IDs to the current object.

Parameters

mixed $ids

Either self::ALL, self::SEARCH_RES, self::LARGEST, Horde_Imap_Client_Ids object, array, or sequence string.

remove()

remove(mixed  $ids) 

Removed IDs from the current object.

Parameters

mixed $ids

Either Horde_Imap_Client_Ids object, array, or sequence string.

isEmpty()

isEmpty() : boolean

Is this object empty (i.e. does not contain IDs)?

Returns

boolean —

True if object is empty.

reverse()

reverse() 

Reverses the order of the IDs.

sort()

sort() 

Sorts the IDs.

split()

split(integer  $length) : array

Split the sequence string at an approximate length.

Parameters

integer $length

Length to split.

Returns

array —

A list containing individual sequence strings.

count()

count() 

current()

current() 

key()

key() 

next()

next() 

rewind()

rewind() 

valid()

valid() 

serialize()

serialize() 

unserialize()

unserialize(  $data) 

Parameters

$data

_sort()

_sort(array  $ids) 

Sorts the IDs numerically.

Parameters

array $ids

The array list.

_resolveIds()

_resolveIds(mixed  $ids) : array

Resolve the $ids input to add() and remove().

Parameters

mixed $ids

Either Horde_Imap_Client_Ids object, array, or sequence string.

Returns

array —

An array of IDs.

_toSequenceString()

_toSequenceString(boolean  $sort = true) : string

Create an IMAP message sequence string from a list of indices.

Index Format: range_start:range_end,uid,uid2,...

Parameters

boolean $sort

Numerically sort the IDs before creating the range?

Returns

string —

The IMAP message sequence string.

_fromSequenceString()

_fromSequenceString(string  $str) : array

Parse an IMAP message sequence string into a list of indices.

Parameters

string $str

The IMAP message sequence string.

Returns

array —

An array of indices.