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.
- author Zaahid Bateson
Methods |
public __construct(ZBateson Initializes a SplitParameterToken.
|
public addPart( $value, $isEncoded, $index) Adds the passed part to the running array of values. If $isEncoded is true, language and charset info is extracted from the The value of the parameter is sorted based on the passed $index
|
public getLanguage() Returns the language of the parameter if set, or null if not. |
public getName() Returns the name of the parameter. |
public getValue() Reconstructs the value of the split parameter into a single UTF-8 string |
Properties |
protected $charset
|
protected $encodedParts
|
protected $language
|
protected $literalParts
|
protected $name
|
Methods |
protected extractMetaInformationAndValue( $value, $index) Extracts charset and language from an encoded value, setting them on the
|
Methods |
private getNextEncodedValue() Traverses $this->encodedParts until a non-sequential key is found, or the This allows encoded parts of a split parameter to be split anywhere and The returned string is converted to UTF-8 before being returned. |