A literal header string part. The value of the part is stripped of CR and LF characters, but otherwise not transformed or changed in any way.

author Zaahid Bateson
package MailMimeParser
inherited_from \ZBateson\MailMimeParser\Header\Part\HeaderPart

 Methods

Creates a LiteralPart out of the passed string token

__construct(\ZBateson\MbWrapper\MbWrapper $charsetConverter, string $token = null
inherited_from \ZBateson\MailMimeParser\Header\Part\HeaderPart::__construct()

Parameters

$charsetConverter

\ZBateson\MbWrapper\MbWrapper

$token

string

Sets up dependencies.

__construct(\ZBateson\MbWrapper\MbWrapper $charsetConverter) 
Inherited

Parameters

$charsetConverter

\ZBateson\MbWrapper\MbWrapper

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

__toString() : string
Inherited

Returns

stringthe value

Returns the part's value.

getValue() : string
Inherited

Returns

stringthe value of the part

Returns true if spaces after this part should be ignored. True is only returned for MimeLiterals if the part ends with a mime-encoded string Tokens if the Token's value is a single space, and for CommentParts.

ignoreSpacesAfter() : boolean
Inherited

Returns

boolean

Returns true if spaces before this part should be ignored. True is only returned for MimeLiterals if the part begins with a mime-encoded string, Tokens if the Token's value is a single space, and for CommentParts.

ignoreSpacesBefore() : boolean
Inherited

Returns

boolean

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

convertEncoding(string $str, string $from = 'ISO-8859-1', boolean $force = false) : string
Inherited

The method does nothing if the passed $from charset is UTF-8 already, or if $force is set to false and mb_check_encoding for $str returns true for 'UTF-8'.

Parameters

$str

string

$from

string

$force

boolean

Returns

stringutf-8 string

 Properties

 

the charset converter used for converting strings in HeaderPart::convertEncoding

$charsetConverter : \ZBateson\MbWrapper\MbWrapper

Default

 

the value of the part

$value : string

Default