Copied!

Holds a running value for an RFC-2231 split header parameter.

ParameterConsumer creates SplitParameterTokens when a split header parameter is first found, and adds subsequent split parts to an already created one if the parameter name matches.

CloneableInstantiable
Methods
public __construct(Psr\Log\LoggerInterface $logger, ZBateson\MbWrapper\MbWrapper $charsetConverter, ZBateson\MailMimeParser\Header\Part\HeaderPartFactory $headerPartFactory, array $children)
 

Initializes a SplitParameterToken.

  • param \ParameterPart[] $children
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\ErrorBag::addError(string $message, string $psrLogLevel, ?Throwable $exception = NULL) : static
public ZBateson\MailMimeParser\ErrorBag::getAllErrors(bool $validate = false, string $minPsrLevel = 'error'Psr\Log\LogLevel::ERROR) : array
public ZBateson\MailMimeParser\Header\Part\ParameterPart::getCharset() : ?string
 

Returns the charset if the part is an RFC-2231 part with a charset set.

public ZBateson\MailMimeParser\Header\Part\ContainerPart::getChildParts() : array
 

Returns the child parts this container part consists of.

  • return \IHeaderPart[]
public ZBateson\MailMimeParser\Header\Part\ContainerPart::getComments() : array
public ZBateson\MailMimeParser\ErrorBag::getErrorLoggingContextName() : string
 

Returns the class name. Override to identify objects in logs.

public ZBateson\MailMimeParser\ErrorBag::getErrors(bool $validate = false, string $minPsrLevel = 'error'Psr\Log\LogLevel::ERROR) : array
public ZBateson\MailMimeParser\Header\Part\ParameterPart::getIndex() : ?int
public ZBateson\MailMimeParser\Header\Part\ParameterPart::getLanguage() : ?string
 

Returns the RFC-1766 (or subset) language tag, if the parameter is an RFC-2231 part with a language tag set.

  • return ?string the language if set, or null if not
public ZBateson\MailMimeParser\Header\Part\NameValuePart::getName() : string
 

Returns the name of the name/value part.

public ZBateson\MailMimeParser\Header\Part\HeaderPart::getValue() : string
 

Returns the part's representative value after any necessary processing has been performed. For the raw value, call getRawValue().

public ZBateson\MailMimeParser\ErrorBag::hasAnyErrors(bool $validate = false, string $minPsrLevel = 'error'Psr\Log\LogLevel::ERROR) : bool
public ZBateson\MailMimeParser\ErrorBag::hasErrors(bool $validate = false, string $minPsrLevel = 'error'Psr\Log\LogLevel::ERROR) : bool
public ZBateson\MailMimeParser\Header\Part\ParameterPart::isUrlEncoded() : bool
Properties
protected bool ZBateson\MailMimeParser\Header\Part\HeaderPart::$canIgnoreSpacesAfter = false
 
  • var bool set to true to ignore spaces after this part
protected bool ZBateson\MailMimeParser\Header\Part\HeaderPart::$canIgnoreSpacesBefore = false
 
  • var bool set to true to ignore spaces before this part
protected ?string ZBateson\MailMimeParser\Header\Part\ParameterPart::$charset = NULL
 
  • var string charset of content if set.
protected ZBateson\MbWrapper\MbWrapper ZBateson\MailMimeParser\Header\Part\HeaderPart::$charsetConverter
 
  • var \MbWrapper $charsetConverter the charset converter used for converting strings in HeaderPart::convertEncoding
protected ZBateson\MailMimeParser\Header\Part\ContainerPart::$children = []
 
  • var \HeaderPart[] parts that were used to create this part, collected for proper error reporting and validation.
protected bool ZBateson\MailMimeParser\Header\Part\ParameterPart::$encoded = false
 
  • var bool true if the part is an RFC-2231 encoded part, and the value needs to be decoded.
protected ?int ZBateson\MailMimeParser\Header\Part\ParameterPart::$index = NULL
 
  • var int the zero-based index of the part if part of a 'continuation' in an RFC-2231 split parameter.
protected bool ZBateson\MailMimeParser\Header\Part\HeaderPart::$isSpace = false
 

True if the part is a space token

protected ?string ZBateson\MailMimeParser\Header\Part\ParameterPart::$language = NULL
 
  • var string the RFC-1766 language tag if set.
protected Psr\Log\LoggerInterface ZBateson\MailMimeParser\ErrorBag::$logger
protected string ZBateson\MailMimeParser\Header\Part\NameValuePart::$name
 
  • var string the name of the part
protected ZBateson\MailMimeParser\Header\Part\HeaderPartFactory $partFactory
 
  • var \HeaderPartFactory used to create combined MimeToken parts.
protected string ZBateson\MailMimeParser\Header\Part\HeaderPart::$value
 
  • var string the representative value of the part after any conversion or processing has been done on it (e.g. removing new lines, converting, whatever else).
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
protected ZBateson\MailMimeParser\Header\Part\ParameterPart::decodePartValue(string $value, ?string $charset = NULL) : string
protected ZBateson\MailMimeParser\Header\Part\ContainerPart::filterIgnoredSpaces(array $parts) : array
 

Filters out ignorable space tokens.

Spaces are removed if parts on either side of it have their canIgnoreSpaceAfter/canIgnoreSpaceBefore properties set to true.

  • param \HeaderPart[] $parts
  • return \HeaderPart[]
protected ZBateson\MailMimeParser\Header\Part\ContainerPart::getErrorBagChildren() : array
 

Returns this part's children, same as getChildParts().

  • return \ErrorBag
protected getNameFromParts(array $parts) : string
protected getValueFromParts(array $parts) : string
protected ZBateson\MailMimeParser\Header\Part\NameValuePart::validate() : void
Methods
private combineAdjacentUnencodedParts(array $parts) : array
private getMimeTokens(string $value) : array
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration