PHP Class IMP_Indices, horde

Author: Michael Slusarz ([email protected])
Inheritance: implements ArrayAccess, implements Countable, implements Iterator
Afficher le fichier Open project: horde/horde Class Usage Examples

Protected Properties

Свойство Type Description
$_indices array The indices list.

Méthodes publiques

Méthode Description
__construct ( ) Constructor.
__toString ( ) : string String representation of the object.
add ( ) Add indices.
copy ( string $targetMbox, string $action, array $opts = [] ) : boolean Copies or moves a list of messages to a new mailbox.
count ( ) : integer Index count.
current ( ) * Iterator methods.
delete ( array $opts = [] ) : integer | boolean Deletes a list of messages.
flag ( array $add = [], array $remove = [], array $opts = [] ) : boolean Sets or clears a given flag for a list of messages.
getSingle ( $all = false ) : array Returns mailbox/UID information for the first index.
indices ( ) : array Return a copy of the indices array.
key ( )
mdnCheck ( Horde_Mime_Headers $headers, boolean $confirmed = false ) : boolean Check if we need to send a MDN, and send if needed.
next ( )
offsetExists ( $offset )
offsetGet ( $offset )
offsetSet ( $offset, $value )
offsetUnset ( $offset )
rewind ( )
stripPart ( string $partid = null ) : IMP_Indices Strips one or all MIME parts out of a message.
toArray ( ) : array Returns an array containing compressed UID values.
valid ( )

Méthodes protégées

Méthode Description
_fromSequenceString ( string $str ) : array Parse an IMAP message sequence string into a list of indices.
_toSequenceString ( array $in ) : string Create an IMAP message sequence string from a list of indices.

Method Details

__construct() public méthode

Parameters are the same as add().
See also: add()
public __construct ( )

__toString() public méthode

String representation of the object.
public __toString ( ) : string
Résultat string String representation (IMAP sequence string).

_fromSequenceString() protected méthode

Extends Horde_Imap_Client_Ids by allowing mailbox information to appear in the string.
protected _fromSequenceString ( string $str ) : array
$str string The IMAP message sequence string.
Résultat array An array of indices. If string contains mailbox info, return value will be an array of arrays, with keys as mailbox names and values as IDs. Otherwise, return the list of IDs.

_toSequenceString() protected méthode

Extends Horde_Imap_Client_Ids by allowing mailbox information to appear in the string.
protected _toSequenceString ( array $in ) : string
$in array An array of indices.
Résultat string The message sequence string.

add() public méthode

Input format:
1 argument:
-----------
+ Array
  Either:
    KEYS: Mailbox names
    VALUES: UIDs -or- Horde_Imap_Client_Ids object
 -or-
    VALUES: IMAP sequence strings
+ IMP_Compose object
+ IMP_Contents object
+ IMP_Indices object
+ String
  Format: IMAP sequence string

2 arguments:
------------
1st argument: Mailbox name -or- IMP_Mailbox object
2nd argument: Either a single UID, array of UIDs, or a
              Horde_Imap_Client_Ids object.
public add ( )

copy() public méthode

Also handles moves to the tasklist and/or notepad applications.
public copy ( string $targetMbox, string $action, array $opts = [] ) : boolean
$targetMbox string The mailbox to move/copy messages to (UTF-8).
$action string Either 'copy' or 'move'.
$opts array Additional options:
  - create: (boolean) Should the target mailbox be created?
            DEFAULT: false
Résultat boolean True if successful, false if not.

count() public méthode

Index count.
public count ( ) : integer
Résultat integer The number of indices.

current() public méthode

* Iterator methods.
public current ( )

delete() public méthode

Deletes a list of messages.
public delete ( array $opts = [] ) : integer | boolean
$opts array Additional options:
  - keeplog: (boolean) Should any history information of the message be
             kept?
             DEFAULT: false
  - nuke: (boolean) Override user preferences and nuke (i.e.
          permanently delete) the messages instead?
          DEFAULT: false
Résultat integer | boolean The number of messages deleted if successful, false if not successful.

flag() public méthode

Sets or clears a given flag for a list of messages.
public flag ( array $add = [], array $remove = [], array $opts = [] ) : boolean
$add array A list of IMAP flag(s) to add.
$remove array A list of IMAP flag(s) to remove.
$opts array Additional options:
  - silent: (boolean) Don't output notification messages.
            DEFAULT: false
  - unchangedsince: (array) The unchangedsince value to pass to the
                    IMAP store command. Keys are mailbox names, values
                    are the unchangedsince values to use for that
                    mailbox.
                    DEFAULT: array()
Résultat boolean True if successful, false if not.

getSingle() public méthode

Returns mailbox/UID information for the first index.
public getSingle ( $all = false ) : array
Résultat array $all If true, returns all UIDs for the first index in an array. If false, returns the first UID for the first index as a string.

indices() public méthode

Return a copy of the indices array.
public indices ( ) : array
Résultat array The indices array (keys are mailbox names, values are arrays of UIDs).

key() public méthode

public key ( )

mdnCheck() public méthode

Check if we need to send a MDN, and send if needed.
public mdnCheck ( Horde_Mime_Headers $headers, boolean $confirmed = false ) : boolean
$headers Horde_Mime_Headers The headers of the message.
$confirmed boolean Has the MDN request been confirmed?
Résultat boolean True if the MDN request needs to be confirmed.

next() public méthode

public next ( )

offsetExists() public méthode

public offsetExists ( $offset )

offsetGet() public méthode

public offsetGet ( $offset )

offsetSet() public méthode

public offsetSet ( $offset, $value )

offsetUnset() public méthode

public offsetUnset ( $offset )

rewind() public méthode

public rewind ( )

stripPart() public méthode

Strips one or all MIME parts out of a message.
public stripPart ( string $partid = null ) : IMP_Indices
$partid string The MIME ID of the part to strip. All parts are stripped if null.
Résultat IMP_Indices Returns the new indices object.

toArray() public méthode

Returns an array containing compressed UID values.
public toArray ( ) : array
Résultat array Keys are base64 encoded mailbox names, values are sequence strings.

valid() public méthode

public valid ( )

Property Details

$_indices protected_oe property

The indices list.
protected array $_indices
Résultat array