Documentation

Horde_Mime_Related
in package
implements IteratorAggregate

This class parses a multipart/related MIME part (RFC 2387) to provide information on the part contents.

Tags
author

Michael Slusarz slusarz@horde.org

category

Horde

copyright

2012-2017 Horde LLC

license

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

Interfaces, Classes, Traits and Enums

IteratorAggregate

Table of Contents

$_cids  : array<string|int, mixed>
Content IDs.
$_start  : string
Start ID.
__construct()  : mixed
Constructor.
cidReplace()  : Horde_Domhtml
Scan for CID strings in HTML data and replace with data returned from a callback method.
cidSearch()  : string
Search for a CID in the related part.
getIterator()  : mixed
startId()  : string
Return the start ID.
_cidReplace()  : mixed

Properties

$_cids

Content IDs.

protected array<string|int, mixed> $_cids = array()

$_start

Start ID.

protected string $_start

Methods

__construct()

Constructor.

public __construct(Horde_Mime_Part $mime_part) : mixed
Parameters
$mime_part : Horde_Mime_Part

A MIME part object. Must be of type multipart/related.

Return values
mixed

cidReplace()

Scan for CID strings in HTML data and replace with data returned from a callback method.

public cidReplace(mixed $text, callable $callback[, string $charset = 'UTF-8' ]) : Horde_Domhtml
Parameters
$text : mixed

The HTML text (can be Horde_Domhtml object).

$callback : callable

Callback method. Receives three arguments: MIME ID, the attribute name containing the content ID, and the node object. Expects return value of URL to display the data.

$charset : string = 'UTF-8'

HTML data charset.

Return values
Horde_Domhtml

A Horde_Domhtml object.

cidSearch()

Search for a CID in the related part.

public cidSearch(string $cid) : string
Parameters
$cid : string

The CID to search for.

Return values
string

The MIME ID or false if not found.

getIterator()

public getIterator() : mixed
Return values
mixed

startId()

Return the start ID.

public startId() : string
Return values
string

The start ID.

_cidReplace()

protected _cidReplace(mixed $node, mixed $attribute, mixed $callback) : mixed
Parameters
$node : mixed
$attribute : mixed
$callback : mixed
Return values
mixed

Search results