Horde_Imap_Client_Ids
in package
implements
Countable, Iterator, Serializable
An object that provides a way to identify a list of IMAP indices.
Tags
Interfaces, Classes, Traits and Enums
- Countable
- Iterator
- Serializable
Table of Contents
- ALL = "\x01"
- "Special" representation constants.
- LARGEST = "\x03"
- SEARCH_RES = "\x02"
- $all : bool
- $duplicates : bool
- Allow duplicate IDs?
- $ids : array<string|int, mixed>
- $largest : bool
- $max : string
- $min : string
- $range_string : string
- $search_res : bool
- $sequence : bool
- $special : bool
- $tostring : string
- $tostring_sort : string
- $_ids : mixed
- List of IDs.
- $_sequence : bool
- Are IDs message sequence numbers?
- $_sorted : bool
- Are IDs sorted?
- __construct() : mixed
- Constructor.
- __get() : mixed
- __serialize() : array<string|int, mixed>
- __toString() : mixed
- __unserialize() : mixed
- add() : mixed
- Add IDs to the current object.
- count() : mixed
- current() : mixed
- isEmpty() : bool
- Is this object empty (i.e. does not contain IDs)?
- key() : mixed
- next() : mixed
- remove() : mixed
- Removed IDs from the current object.
- reverse() : mixed
- Reverses the order of the IDs.
- rewind() : mixed
- serialize() : mixed
- sort() : mixed
- Sorts the IDs.
- split() : array<string|int, mixed>
- Split the sequence string at an approximate length.
- unserialize() : mixed
- valid() : mixed
- _fromSequenceString() : array<string|int, mixed>
- Parse an IMAP message sequence string into a list of indices.
- _resolveIds() : array<string|int, mixed>
- Resolve the $ids input to add() and remove().
- _sort() : mixed
- Sorts the IDs numerically.
- _toSequenceString() : string
- Create an IMAP message sequence string from a list of indices.
Constants
ALL
"Special" representation constants.
public
mixed
ALL
= "\x01"
LARGEST
public
mixed
LARGEST
= "\x03"
SEARCH_RES
public
mixed
SEARCH_RES
= "\x02"
Properties
$all read-only
public
bool
$all
Does this represent an ALL message set?
$duplicates
Allow duplicate IDs?
public
bool
$duplicates
= \false
$ids read-only
public
array<string|int, mixed>
$ids
The list of IDs.
$largest read-only
public
bool
$largest
Does this represent the largest ID in use?
$max read-only
public
string
$max
The largest ID (@since 2.20.0).
$min read-only
public
string
$min
The smallest ID (@since 2.20.0).
$range_string read-only
public
string
$range_string
Generates a range string consisting of all messages between begin and end of ID list.
$search_res read-only
public
bool
$search_res
Does this represent a search result?
$sequence read-only
public
bool
$sequence
Are these sequence IDs? If false, these are UIDs.
$special read-only
public
bool
$special
True if this is a "special" ID representation.
$tostring read-only
public
string
$tostring
Return the non-sorted string representation.
$tostring_sort read-only
public
string
$tostring_sort
Return the sorted string representation.
$_ids
List of IDs.
protected
mixed
$_ids
= array()
$_sequence
Are IDs message sequence numbers?
protected
bool
$_sequence
= \false
$_sorted
Are IDs sorted?
protected
bool
$_sorted
= \false
Methods
__construct()
Constructor.
public
__construct([mixed $ids = null ][, bool $sequence = false ]) : mixed
Parameters
- $ids : mixed = null
-
See self::add().
- $sequence : bool = false
-
Are $ids message sequence numbers?
Return values
mixed —__get()
public
__get(mixed $name) : mixed
Parameters
- $name : mixed
Return values
mixed —__serialize()
public
__serialize() : array<string|int, mixed>
Return values
array<string|int, mixed> —__toString()
public
__toString() : mixed
Return values
mixed —__unserialize()
public
__unserialize(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
Return values
mixed —add()
Add IDs to the current object.
public
add(mixed $ids) : mixed
Parameters
- $ids : mixed
-
Either self::ALL, self::SEARCH_RES, self::LARGEST, Horde_Imap_Client_Ids object, array, or sequence string.
Return values
mixed —count()
public
count() : mixed
Return values
mixed —current()
public
current() : mixed
Return values
mixed —isEmpty()
Is this object empty (i.e. does not contain IDs)?
public
isEmpty() : bool
Return values
bool —True if object is empty.
key()
public
key() : mixed
Return values
mixed —next()
public
next() : mixed
Return values
mixed —remove()
Removed IDs from the current object.
public
remove(mixed $ids) : mixed
Parameters
- $ids : mixed
-
Either Horde_Imap_Client_Ids object, array, or sequence string.
Tags
Return values
mixed —reverse()
Reverses the order of the IDs.
public
reverse() : mixed
Return values
mixed —rewind()
public
rewind() : mixed
Return values
mixed —serialize()
public
serialize() : mixed
Return values
mixed —sort()
Sorts the IDs.
public
sort() : mixed
Return values
mixed —split()
Split the sequence string at an approximate length.
public
split(int $length) : array<string|int, mixed>
Parameters
- $length : int
-
Length to split.
Tags
Return values
array<string|int, mixed> —A list containing individual sequence strings.
unserialize()
public
unserialize(mixed $data) : mixed
Parameters
- $data : mixed
Return values
mixed —valid()
public
valid() : mixed
Return values
mixed —_fromSequenceString()
Parse an IMAP message sequence string into a list of indices.
protected
_fromSequenceString(string $str) : array<string|int, mixed>
Parameters
- $str : string
-
The IMAP message sequence string.
Tags
Return values
array<string|int, mixed> —An array of indices.
_resolveIds()
Resolve the $ids input to add() and remove().
protected
_resolveIds(mixed $ids) : array<string|int, mixed>
Parameters
- $ids : mixed
-
Either Horde_Imap_Client_Ids object, array, or sequence string.
Return values
array<string|int, mixed> —An array of IDs.
_sort()
Sorts the IDs numerically.
protected
_sort(array<string|int, mixed> &$ids) : mixed
Parameters
- $ids : array<string|int, mixed>
-
The array list.
Return values
mixed —_toSequenceString()
Create an IMAP message sequence string from a list of indices.
protected
_toSequenceString([bool $sort = true ]) : string
Index Format: range_start:range_end,uid,uid2,...
Parameters
- $sort : bool = true
-
Numerically sort the IDs before creating the range?
Return values
string —The IMAP message sequence string.