PHP Class IMP_Flags, horde

Author: Michael Slusarz ([email protected])
Inheritance: implements ArrayAccess, implements Serializable
Afficher le fichier Open project: horde/horde

Méthodes publiques

Свойство Type Description
$changed boolean Has the object data changed?

Protected Properties

Свойство Type Description
$_flaghook boolean Does the msglist_flags hook exist?
$_flags array The list of internal flags.
$_userflags array The list of user flags.

Méthodes publiques

Méthode Description
__construct ( ) Constructor.
addFlag ( string $label ) : string Add a user-defined IMAP flag.
changed ( array $flags, boolean $add ) : array Returns a list of flags that have changed due to IMAP flag changes.
getList ( array $opts = [] ) : array Return the raw list of flags.
offsetExists ( $offset )
offsetGet ( $offset )
offsetSet ( $offset, $value )
offsetUnset ( $offset )
parse ( array $opts = [] ) : array Parse a list of flag information.
serialize ( )
unserialize ( $data )
updateFlag ( string $key, string $type, string $data ) Updates flag properties.

Méthodes protégées

Méthode Description
_save ( ) Save the flag list to the prefs backend.

Method Details

__construct() public méthode

Constructor.
public __construct ( )

_save() protected méthode

Save the flag list to the prefs backend.
protected _save ( )

addFlag() public méthode

Add a user-defined IMAP flag.
public addFlag ( string $label ) : string
$label string The label to use for the new flag.
Résultat string The IMAP flag name.

changed() public méthode

Returns a list of flags that have changed due to IMAP flag changes.
public changed ( array $flags, boolean $add ) : array
$flags array The list of IMAP flags added/removed.
$add boolean True if these flags were added, false if they were removed.
Résultat array Array with two keys: 'add' and 'remove'. Each key contains a list of IMP_Flag_Base objects.

getList() public méthode

Return the raw list of flags.
public getList ( array $opts = [] ) : array
$opts array Additional options: - imap: (boolean) If true, only return IMAP flags that can be set by the user. DEFAULT: false - mailbox: (string) A real (not virtual) IMAP mailbox. If set, will determine what flags are available in the mailbox. DEFAULT: '' (no mailbox check)
Résultat array An array of IMP_Flag_Base elements.

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 )

parse() public méthode

Parse a list of flag information.
public parse ( array $opts = [] ) : array
$opts array Options: - flags: (array) IMAP flag info. A lowercase list of flags returned by the IMAP server. - headers: (Horde_Mime_Headers) Determines message information from a headers object. - runhook: (array) Run the msglist_flags hook? If yes, input is return from IMP_Mailbox_List#getMailboxArray(). - personal: (mixed) Personal message info. Either a list of To addresses (Horde_Mail_Rfc822_List object) or the identity that matched the address list. - structure: TODO
Résultat array A list of IMP_Flag_Base objects.

serialize() public méthode

public serialize ( )

unserialize() public méthode

public unserialize ( $data )

updateFlag() public méthode

Updates flag properties.
public updateFlag ( string $key, string $type, string $data )
$key string The flag key.
$type string The property to update. Either 'bgcolor' or 'label'.
$data string The updated data.

Property Details

$_flaghook protected_oe property

Does the msglist_flags hook exist?
protected bool $_flaghook
Résultat boolean

$_flags protected_oe property

The list of internal flags.
protected array $_flags
Résultat array

$_userflags protected_oe property

The list of user flags.
protected array $_userflags
Résultat array

$changed public_oe property

Has the object data changed?
public bool $changed
Résultat boolean