Documentation

Horde_Imap_Client_Data_BaseSubject
in package

Determines the "base subject" of a string (RFC 5256 [2.1]).

Tags
author

Timo Sirainen tss@iki.fi

author

Michael Slusarz slusarz@horde.org

category

Horde

copyright

2002-2008 Timo Sirainen

copyright

2011-2017 Horde LLC

license

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

Table of Contents

$_subject  : string
The base subject.
__construct()  : string
Constructor.
__toString()  : string
Return the "base subject" defined in RFC 5256 [2.1].
_removeBlob()  : bool|int
Remove "[...]" text.
_removeBlobWhenNonempty()  : bool
Remove "[...]" text if it doesn't result in the subject becoming empty.
_removeSubjFwdHdr()  : bool
Remove a "[fwd: ... ]" string.
_removeSubjLeader()  : bool
Remove all prefix text of the subject that matches the subj-leader ABNF.

Properties

$_subject

The base subject.

protected string $_subject

Methods

__construct()

Constructor.

public __construct(string $str[, array<string|int, mixed> $opts = array() ]) : string
Parameters
$str : string

The subject string.

$opts : array<string|int, mixed> = array()

Additional options:

  • keepblob: (boolean) Don't remove any "blob" information (i.e. text leading text between square brackets) from string.
Return values
string

The cleaned up subject string.

__toString()

Return the "base subject" defined in RFC 5256 [2.1].

public __toString() : string
Return values
string

The base subject.

_removeBlob()

Remove "[...]" text.

protected _removeBlob(string $str, int $i) : bool|int
Parameters
$str : string

The subject string.

$i : int

Current position.

Return values
bool|int

False if blob was not found, otherwise the string position of the first non-blob char.

_removeBlobWhenNonempty()

Remove "[...]" text if it doesn't result in the subject becoming empty.

protected _removeBlobWhenNonempty(string &$str) : bool
Parameters
$str : string

The subject string.

Return values
bool

True if string was altered.

_removeSubjFwdHdr()

Remove a "[fwd: ... ]" string.

protected _removeSubjFwdHdr(string &$str) : bool
Parameters
$str : string

The subject string.

Return values
bool

True if string was altered.

_removeSubjLeader()

Remove all prefix text of the subject that matches the subj-leader ABNF.

protected _removeSubjLeader(string &$str[, bool $keepblob = false ]) : bool
Parameters
$str : string

The subject string.

$keepblob : bool = false

Remove blob information?

Return values
bool

True if string was altered.

Search results