PHP Class Horde_Imap_Client_Ids, horde

Author: Michael Slusarz ([email protected])
Inheritance: implements Countable, implements Iterator, implements Serializable
Show file Open project: horde/horde Class Usage Examples

Public Properties

Property Type Description
$duplicates boolean Allow duplicate IDs?

Protected Properties

Property Type Description
$_ids mixed List of IDs.
$_sequence boolean Are IDs message sequence numbers?
$_sorted boolean Are IDs sorted?

Public Methods

Method Description
__construct ( mixed $ids = null, boolean $sequence = false ) Constructor.
__get ( $name )
__toString ( )
add ( mixed $ids ) Add IDs to the current object.
count ( )
current ( )
isEmpty ( ) : boolean Is this object empty (i.e. does not contain IDs)?
key ( )
next ( )
remove ( mixed $ids ) Removed IDs from the current object.
reverse ( ) Reverses the order of the IDs.
rewind ( )
serialize ( )
sort ( ) Sorts the IDs.
split ( integer $length ) : array Split the sequence string at an approximate length.
unserialize ( $data )
valid ( )

Protected Methods

Method Description
_fromSequenceString ( string $str ) : array Parse an IMAP message sequence string into a list of indices.
_resolveIds ( mixed $ids ) : array Resolve the $ids input to add() and remove().
_sort ( array &$ids ) Sorts the IDs numerically.
_toSequenceString ( boolean $sort = true ) : string Create an IMAP message sequence string from a list of indices.

Method Details

__construct() public method

Constructor.
public __construct ( mixed $ids = null, boolean $sequence = false )
$ids mixed See self::add().
$sequence boolean Are $ids message sequence numbers?

__get() public method

public __get ( $name )

__toString() public method

public __toString ( )

_fromSequenceString() protected method

Parse an IMAP message sequence string into a list of indices.
See also: _toSequenceString()
protected _fromSequenceString ( string $str ) : array
$str string The IMAP message sequence string.
return array An array of indices.

_resolveIds() protected method

Resolve the $ids input to add() and remove().
protected _resolveIds ( mixed $ids ) : array
$ids mixed Either Horde_Imap_Client_Ids object, array, or sequence string.
return array An array of IDs.

_sort() protected method

Sorts the IDs numerically.
protected _sort ( array &$ids )
$ids array The array list.

_toSequenceString() protected method

Index Format: range_start:range_end,uid,uid2,...
protected _toSequenceString ( boolean $sort = true ) : string
$sort boolean Numerically sort the IDs before creating the range?
return string The IMAP message sequence string.

add() public method

Add IDs to the current object.
public add ( mixed $ids )
$ids mixed Either self::ALL, self::SEARCH_RES, self::LARGEST, Horde_Imap_Client_Ids object, array, or sequence string.

count() public method

public count ( )

current() public method

public current ( )

isEmpty() public method

Is this object empty (i.e. does not contain IDs)?
public isEmpty ( ) : boolean
return boolean True if object is empty.

key() public method

public key ( )

next() public method

public next ( )

remove() public method

Removed IDs from the current object.
Since: 2.17.0
public remove ( mixed $ids )
$ids mixed Either Horde_Imap_Client_Ids object, array, or sequence string.

reverse() public method

Reverses the order of the IDs.
public reverse ( )

rewind() public method

public rewind ( )

serialize() public method

public serialize ( )

sort() public method

Sorts the IDs.
public sort ( )

split() public method

Split the sequence string at an approximate length.
Since: 2.7.0
public split ( integer $length ) : array
$length integer Length to split.
return array A list containing individual sequence strings.

unserialize() public method

public unserialize ( $data )

valid() public method

public valid ( )

Property Details

$_ids protected property

List of IDs.
protected mixed $_ids
return mixed

$_sequence protected property

Are IDs message sequence numbers?
protected bool $_sequence
return boolean

$_sorted protected property

Are IDs sorted?
protected bool $_sorted
return boolean

$duplicates public property

Allow duplicate IDs?
public bool $duplicates
return boolean