Method | Description | |
---|---|---|
__construct ( Swift_Mime_Grammar $grammar ) | Creates a new Header. | |
__toString ( ) : string | Returns a string representation of this object. | |
getCharset ( ) : string | Get the character set used in this Header. | |
getEncoder ( ) : Swift_Mime_HeaderEncoder | Get the encoder used for encoding this Header. | |
getFieldName ( ) : string | Get the name of this header (e.g. charset). | |
getGrammar ( ) : Swift_Mime_Grammar | Get the grammar used for this Header. | |
getLanguage ( ) : string | Get the language used in this Header. | |
getMaxLineLength ( ) : integer | Get the maximum permitted length of lines in this Header. | |
setCharset ( string $charset ) | Set the character set used in this Header. | |
setEncoder ( Swift_Mime_HeaderEncoder $encoder ) | Set the encoder used for encoding the header. | |
setGrammar ( Swift_Mime_Grammar $grammar ) | Set the grammar used for the header. | |
setLanguage ( string $lang ) | Set the language used in this Header. | |
setMaxLineLength ( integer $lineLength ) | Set the maximum length of lines in the header (excluding EOL). | |
toString ( ) : string | Get this Header rendered as a RFC 2822 compliant string. |
Method | Description | |
---|---|---|
clearCachedValueIf ( boolean $condition ) | Clear the cached value if $condition is met. | |
createPhrase ( Swift_Mime_Header $header, string $string, string $charset, Swift_Mime_HeaderEncoder $encoder = null, boolean $shorten = false ) : string | Produces a compliant, formatted RFC 2822 'phrase' based on the string given. | |
encodeWords ( Swift_Mime_Header $header, string $input, string $usedLength ) : string | Encode needed word tokens within a string of input. | |
generateTokenLines ( string $token ) : string[] | Generates tokens from the given string which include CRLF as individual tokens. | |
getCachedValue ( ) : string | Get the value in the cache. | |
getEncodableWordTokens ( string $string ) : string[] | Splits a string into tokens in blocks of words which can be encoded quickly. | |
getTokenAsEncodedWord ( string $token, integer $firstLineOffset ) : string | Get a token as an encoded word for safe insertion into headers. | |
setCachedValue ( string $value ) | Set a value into the cache. | |
setFieldName ( string $name ) | Set the name of this Header field. | |
toTokens ( string $string = null ) : array | Generate a list of all tokens in the final header. | |
tokenNeedsEncoding ( string $token ) : boolean | Test if a token needs to be encoded or not. |
Method | Description | |
---|---|---|
_tokensToString ( array $tokens ) : string | Takes an array of tokens which appear in the header and turns them into an RFC 2822 compliant string, adding FWSP where needed. |
public __construct ( Swift_Mime_Grammar $grammar ) | ||
$grammar | Swift_Mime_Grammar |
public __toString ( ) : string | ||
return | string |
protected clearCachedValueIf ( boolean $condition ) | ||
$condition | boolean |
protected createPhrase ( Swift_Mime_Header $header, string $string, string $charset, Swift_Mime_HeaderEncoder $encoder = null, boolean $shorten = false ) : string | ||
$header | Swift_Mime_Header | |
$string | string | as displayed |
$charset | string | of the text |
$encoder | Swift_Mime_HeaderEncoder | |
$shorten | boolean | the first line to make remove for header name |
return | string |
protected generateTokenLines ( string $token ) : string[] | ||
$token | string | |
return | string[] |
protected getCachedValue ( ) : string | ||
return | string |
public getCharset ( ) : string | ||
return | string |
protected getEncodableWordTokens ( string $string ) : string[] | ||
$string | string | |
return | string[] |
public getEncoder ( ) : Swift_Mime_HeaderEncoder | ||
return | Swift_Mime_HeaderEncoder |
public getFieldName ( ) : string | ||
return | string |
public getGrammar ( ) : Swift_Mime_Grammar | ||
return | Swift_Mime_Grammar |
public getLanguage ( ) : string | ||
return | string |
public getMaxLineLength ( ) : integer | ||
return | integer |
protected setCachedValue ( string $value ) | ||
$value | string |
public setCharset ( string $charset ) | ||
$charset | string |
public setEncoder ( Swift_Mime_HeaderEncoder $encoder ) | ||
$encoder | Swift_Mime_HeaderEncoder |
protected setFieldName ( string $name ) | ||
$name | string |
public setGrammar ( Swift_Mime_Grammar $grammar ) | ||
$grammar | Swift_Mime_Grammar |
public setLanguage ( string $lang ) | ||
$lang | string |
public setMaxLineLength ( integer $lineLength ) | ||
$lineLength | integer |
protected tokenNeedsEncoding ( string $token ) : boolean | ||
$token | string | |
return | boolean |