Copied!

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 IHeaderPart it is (could be an email address, could be a name, or
could be a group.)

CloneableInstantiable
Methods
public __construct(ZBateson\MbWrapper\MbWrapper $charsetConverter, $value)
 

Initializes a token.

  • param string $value the token's value
public ZBateson\MailMimeParser\Header\Part\HeaderPart::__toString() : string
 

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

  • return string the value
public ZBateson\MailMimeParser\Header\Part\HeaderPart::getValue() : ?string
 

Returns the part's value.

  • return ?string the value of the part
public ignoreSpacesAfter() : bool
 

Returns true if the value is a space.

public ignoreSpacesBefore() : bool
 

Returns true if the value is a space.

public isSpace()
 

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

  • return bool
Properties
protected ZBateson\MailMimeParser\Header\Part\HeaderPart::$charsetConverter = NULL
 
  • var \MbWrapper $charsetConverter the charset converter used for
    converting strings in HeaderPart::convertEncoding
protected ZBateson\MailMimeParser\Header\Part\HeaderPart::$value = NULL
 
  • var string the value of the part
Methods
protected ZBateson\MailMimeParser\Header\Part\HeaderPart::convertEncoding(string $str, string $from = 'ISO-8859-1', bool $force = false) : string
 

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

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'.

  • return string utf-8 string
© 2023 Bruce Wells
Search Namespaces \ Classes
Configuration