PHP Класс IMP_Indices, horde

Автор: Michael Slusarz ([email protected])
Наследование: implements ArrayAccess, implements Countable, implements Iterator
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_indices array The indices list.

Открытые методы

Метод Описание
__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 ( )

Защищенные методы

Метод Описание
_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.

Описание методов

__construct() публичный Метод

Parameters are the same as add().
См. также: add()
public __construct ( )

__toString() публичный Метод

String representation of the object.
public __toString ( ) : string
Результат string String representation (IMAP sequence string).

_fromSequenceString() защищенный Метод

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.
Результат 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() защищенный Метод

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.
Результат string The message sequence string.

add() публичный Метод

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() публичный Метод

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
Результат boolean True if successful, false if not.

count() публичный Метод

Index count.
public count ( ) : integer
Результат integer The number of indices.

current() публичный Метод

* Iterator methods.
public current ( )

delete() публичный Метод

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
Результат integer | boolean The number of messages deleted if successful, false if not successful.

flag() публичный Метод

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()
Результат boolean True if successful, false if not.

getSingle() публичный Метод

Returns mailbox/UID information for the first index.
public getSingle ( $all = false ) : array
Результат 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() публичный Метод

Return a copy of the indices array.
public indices ( ) : array
Результат array The indices array (keys are mailbox names, values are arrays of UIDs).

key() публичный Метод

public key ( )

mdnCheck() публичный Метод

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?
Результат boolean True if the MDN request needs to be confirmed.

next() публичный Метод

public next ( )

offsetExists() публичный Метод

public offsetExists ( $offset )

offsetGet() публичный Метод

public offsetGet ( $offset )

offsetSet() публичный Метод

public offsetSet ( $offset, $value )

offsetUnset() публичный Метод

public offsetUnset ( $offset )

rewind() публичный Метод

public rewind ( )

stripPart() публичный Метод

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.
Результат IMP_Indices Returns the new indices object.

toArray() публичный Метод

Returns an array containing compressed UID values.
public toArray ( ) : array
Результат array Keys are base64 encoded mailbox names, values are sequence strings.

valid() публичный Метод

public valid ( )

Описание свойств

$_indices защищенное свойство

The indices list.
protected array $_indices
Результат array