\Horde_Mime_Id

Provides methods to manipulate/query MIME IDs.

Summary

Methods
Properties
Constants
__construct()
__toString()
idArithmetic()
isChild()
$id
ID_DOWN
ID_NEXT
ID_PREV
ID_UP
_idArithmetic()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

ID_DOWN

ID_DOWN

ID_NEXT

ID_NEXT

ID_PREV

ID_PREV

ID_UP

ID_UP

Properties

$id

$id : string

MIME ID.

Type

string

Methods

__construct()

__construct(string  $id) 

Constructor.

Parameters

string $id

MIME ID.

__toString()

__toString() 

idArithmetic()

idArithmetic(string  $action, array  $options = array()) : mixed

Performs MIME ID "arithmetic".

Parameters

string $action

One of:

  • ID_DOWN: ID of child. Note: ID_DOWN will first traverse to "$id.0" if given an ID NOT of the form "$id.0". If given an ID of the form "$id.0", ID_DOWN will traverse to "$id.1". This behavior can be avoided if 'no_rfc822' option is set.
  • ID_NEXT: ID of next sibling.
  • ID_PREV: ID of previous sibling.
  • ID_UP: ID of parent. Note: ID_UP will first traverse to "$id.0" if given an ID NOT of the form "$id.0". If given an ID of the form "$id.0", ID_UP will traverse to "$id". This behavior can be avoided if 'no_rfc822' option is set.
array $options

Additional options:

  • count: (integer) How many levels to traverse. DEFAULT: 1
  • no_rfc822: (boolean) Don't traverse RFC 822 sub-levels. DEFAULT: false

Returns

mixed —

The resulting ID string, or null if that ID can not exist.

isChild()

isChild(string  $id) : boolean

Determines if a given MIME ID lives underneath a base ID.

Parameters

string $id

The MIME ID to query.

Returns

boolean —

Whether $id lives under the base ID ($this->id).

_idArithmetic()

_idArithmetic(  $id,   $action,   $options) 

Parameters

$id
$action
$options