Class Swift_Mime_Headers_ParameterizedHeader
Inheritance | Swift_Mime_Headers_ParameterizedHeader » Swift_Mime_Headers_UnstructuredHeader » Swift_Mime_Headers_AbstractHeader |
---|---|
Implements | Swift_Mime_Header, Swift_Mime_ParameterizedHeader |
An abstract base MIME Header.
Public Methods
Protected Methods
Method | Description | Defined 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
Constant | Value | Description | Defined 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
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 |
Get the value of this header prepared for rendering.
public string getFieldBody ( ) |
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 ( ) |
Get the value of $parameter.
public string getParameter ( $parameter ) | ||
$parameter | string |
Returns an associative array of parameter names mapped to values.
public string[] getParameters ( ) |
Set the character set used in this Header.
public void setCharset ( $charset ) | ||
$charset | string |
Set the value of $parameter.
public void setParameter ( $parameter, $value ) | ||
$parameter | string | |
$value | string |
Set an associative array of parameter names mapped to values.
public void setParameters ( array $parameters ) | ||
$parameters | string[] |
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 |
---|