Documentation

Horde_Mime_Id
in package

Provides methods to manipulate/query MIME IDs.

Tags
author

Michael Slusarz slusarz@horde.org

category

Horde

copyright

2014-2017 Horde LLC

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

since
2.5.0

Table of Contents

ID_DOWN  = 1
ID_NEXT  = 2
ID_PREV  = 3
ID_UP  = 4
$id  : string
MIME ID.
__construct()  : mixed
Constructor.
__toString()  : mixed
idArithmetic()  : mixed
Performs MIME ID "arithmetic".
isChild()  : bool
Determines if a given MIME ID lives underneath a base ID.
_idArithmetic()  : mixed

Constants

ID_DOWN

public mixed ID_DOWN = 1

ID_NEXT

public mixed ID_NEXT = 2

ID_PREV

public mixed ID_PREV = 3

ID_UP

public mixed ID_UP = 4

Properties

$id

MIME ID.

public string $id

Methods

__construct()

Constructor.

public __construct(string $id) : mixed
Parameters
$id : string

MIME ID.

Return values
mixed

__toString()

public __toString() : mixed
Return values
mixed

idArithmetic()

Performs MIME ID "arithmetic".

public idArithmetic(string $action[, array<string|int, mixed> $options = array() ]) : mixed
Parameters
$action : string

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.
$options : array<string|int, mixed> = array()

Additional options:

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

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

isChild()

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

public isChild(string $id) : bool
Parameters
$id : string

The MIME ID to query.

Return values
bool

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

_idArithmetic()

protected _idArithmetic(mixed $id, mixed $action, mixed $options) : mixed
Parameters
$id : mixed
$action : mixed
$options : mixed
Tags
see
idArithmetic()
Return values
mixed

Search results