Class Swift_Mime_Headers_ParameterizedHeader

InheritanceSwift_Mime_Headers_ParameterizedHeader » Swift_Mime_Headers_UnstructuredHeader » Swift_Mime_Headers_AbstractHeader
ImplementsSwift_Mime_Header, Swift_Mime_ParameterizedHeader

An abstract base MIME Header.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Creates a new ParameterizedHeader with $name. Swift_Mime_Headers_ParameterizedHeader
__toString() Returns a string representation of this object. Swift_Mime_Headers_AbstractHeader
getCharset() Get the character set used in this Header. Swift_Mime_Headers_AbstractHeader
getEncoder() Get the encoder used for encoding this Header. Swift_Mime_Headers_AbstractHeader
getFieldBody() Get the value of this header prepared for rendering. Swift_Mime_Headers_ParameterizedHeader
getFieldBodyModel() Get the model for the field body. Swift_Mime_Header
getFieldName() Get the name of this header (e.g. charset). Swift_Mime_Headers_AbstractHeader
getFieldType() Get the type of Header that this instance represents. Swift_Mime_Headers_ParameterizedHeader
getGrammar() Get the grammar used for this Header. Swift_Mime_Headers_AbstractHeader
getLanguage() Get the language used in this Header. Swift_Mime_Headers_AbstractHeader
getMaxLineLength() Get the maximum permitted length of lines in this Header. Swift_Mime_Headers_AbstractHeader
getParameter() Get the value of $parameter. Swift_Mime_Headers_ParameterizedHeader
getParameters() Returns an associative array of parameter names mapped to values. Swift_Mime_Headers_ParameterizedHeader
getValue() Get the (unencoded) value of this header. Swift_Mime_Headers_UnstructuredHeader
setCharset() Set the character set used in this Header. Swift_Mime_Headers_ParameterizedHeader
setEncoder() Set the encoder used for encoding the header. Swift_Mime_Headers_AbstractHeader
setFieldBodyModel() Set the model for the field body. Swift_Mime_Header
setGrammar() Set the grammar used for the header. Swift_Mime_Headers_AbstractHeader
setLanguage() Set the language used in this Header. Swift_Mime_Headers_AbstractHeader
setMaxLineLength() Set the maximum length of lines in the header (excluding EOL). Swift_Mime_Headers_AbstractHeader
setParameter() Set the value of $parameter. Swift_Mime_Headers_ParameterizedHeader
setParameters() Set an associative array of parameter names mapped to values. Swift_Mime_Headers_ParameterizedHeader
setValue() Set the (unencoded) value of this header. Swift_Mime_Headers_UnstructuredHeader
toString() Get this Header rendered as a RFC 2822 compliant string. Swift_Mime_Headers_AbstractHeader

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
clearCachedValueIf() Clear the cached value if $condition is met. Swift_Mime_Headers_AbstractHeader
createPhrase() Produces a compliant, formatted RFC 2822 'phrase' based on the string given. Swift_Mime_Headers_AbstractHeader
encodeWords() Encode needed word tokens within a string of input. Swift_Mime_Headers_AbstractHeader
generateTokenLines() Generates tokens from the given string which include CRLF as individual tokens. Swift_Mime_Headers_AbstractHeader
getCachedValue() Get the value in the cache. Swift_Mime_Headers_AbstractHeader
getEncodableWordTokens() Splits a string into tokens in blocks of words which can be encoded quickly. Swift_Mime_Headers_AbstractHeader
getTokenAsEncodedWord() Get a token as an encoded word for safe insertion into headers. Swift_Mime_Headers_AbstractHeader
setCachedValue() Set a value into the cache. Swift_Mime_Headers_AbstractHeader
setFieldName() Set the name of this Header field. Swift_Mime_Headers_AbstractHeader
toTokens() Generate a list of all tokens in the final header. Swift_Mime_Headers_ParameterizedHeader
tokenNeedsEncoding() Test if a token needs to be encoded or not. Swift_Mime_Headers_AbstractHeader

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
TOKEN_REGEX '(?:[\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7E]+)' RFC 2231's definition of a token. Swift_Mime_Headers_ParameterizedHeader

Method Details

__construct() public method

Creates a new ParameterizedHeader with $name.

public void __construct ( $name, Swift_Mime_HeaderEncoder $encoder, Swift_Encoder $paramEncoder null, Swift_Mime_Grammar $grammar )
$name string
$encoder Swift_Mime_HeaderEncoder
$paramEncoder
$grammar Swift_Mime_Grammar
getFieldBody() public method

Get the value of this header prepared for rendering.

public string getFieldBody ( )
getFieldType() public method

Get the type of Header that this instance represents.

See also:

  • [[TYPE_TEXT,]] TYPE_PARAMETERIZED, TYPE_MAILBOX.
  • [[TYPE_DATE,]] TYPE_ID, TYPE_PATH.
public int getFieldType ( )
getParameter() public method

Get the value of $parameter.

public string getParameter ( $parameter )
$parameter string
getParameters() public method

Returns an associative array of parameter names mapped to values.

public string[] getParameters ( )
setCharset() public method

Set the character set used in this Header.

public void setCharset ( $charset )
$charset string
setParameter() public method

Set the value of $parameter.

public void setParameter ( $parameter, $value )
$parameter string
$value string
setParameters() public method

Set an associative array of parameter names mapped to values.

public void setParameters ( array $parameters )
$parameters string[]
toTokens() protected method

Generate a list of all tokens in the final header.

This doesn't need to be overridden in theory, but it is for implementation reasons to prevent potential breakage of attributes.

protected array toTokens ( $string null )
$string string

The string to tokenize

return array

An array of tokens as strings