MailMimeParser 0.4

Token extends HeaderPart

Holds a string value token that will require additional processing by a consumer prior to returning to a client.

A Token is meant to hold a value for further processing -- for instance when consuming an address list header (like From or To) -- before it's known what type of HeaderPart it is (could be an email address, could be a name, or could be a group.)

Tags
author

Zaahid Bateson

Table of Contents

$value  : string
__construct()  : mixed
Initializes a token.
__toString()  : string
Returns the value of the part (which is a string).
getValue()  : string
Returns the part's value.
ignoreSpacesAfter()  : bool
Returns true if the value is a space.
ignoreSpacesBefore()  : bool
Returns true if the value is a space.
isSpace()  : bool
Returns true if the value of the token is equal to a single space.
convertEncoding()  : string
Ensures the encoding of the passed string is set to UTF-8.

Properties

Methods

__construct()

Initializes a token.

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

the token's value

Return values
mixed

__toString()

Returns the value of the part (which is a string).

public __toString() : string
Return values
string

the value

getValue()

Returns the part's value.

public getValue() : string
Return values
string

the value of the part

ignoreSpacesAfter()

Returns true if the value is a space.

public ignoreSpacesAfter() : bool
Return values
bool

ignoreSpacesBefore()

Returns true if the value is a space.

public ignoreSpacesBefore() : bool
Return values
bool

isSpace()

Returns true if the value of the token is equal to a single space.

public isSpace() : bool
Return values
bool

convertEncoding()

Ensures the encoding of the passed string is set to UTF-8.

protected convertEncoding(string $str) : string
Parameters
$str : string
Return values
string

utf-8 string

Search results