\Horde_Imap_Client_Data_BaseSubject

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

Summary

Methods
Properties
Constants
__construct()
__toString()
No public properties found
No constants found
_removeSubjLeader()
_removeBlob()
_removeBlobWhenNonempty()
_removeSubjFwdHdr()
$_subject
N/A
No private methods found
No private properties found
N/A

Properties

$_subject

$_subject : string

The base subject.

Type

string

Methods

__construct()

__construct(string  $str, array  $opts = array()) : string

Constructor.

Parameters

string $str

The subject string.

array $opts

Additional options:

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

Returns

string —

The cleaned up subject string.

__toString()

__toString() : string

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

Returns

string —

The base subject.

_removeSubjLeader()

_removeSubjLeader(  $str, boolean  $keepblob = false) : boolean

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

Parameters

$str
boolean $keepblob

Remove blob information?

Returns

boolean —

True if string was altered.

_removeBlob()

_removeBlob(string  $str, integer  $i) : boolean|integer

Remove "[.

..]" text.

Parameters

string $str

The subject string.

integer $i

Current position.

Returns

boolean|integer —

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

_removeBlobWhenNonempty()

_removeBlobWhenNonempty(  $str) : boolean

Remove "[.

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

Parameters

$str

Returns

boolean —

True if string was altered.

_removeSubjFwdHdr()

_removeSubjFwdHdr(  $str) : boolean

Remove a "[fwd: .

.. ]" string.

Parameters

$str

Returns

boolean —

True if string was altered.