PHP Class Swift_Mime_Headers_ParameterizedHeader, Halite

Author: Chris Corbyn
Inheritance: extends Swift_Mime_Headers_UnstructuredHeader, implements Swift_Mime_ParameterizedHeader
显示文件 Open project: HaliteChallenge/Halite Class Usage Examples

Public Methods

Method Description
__construct ( string $name, Swift_Mime_HeaderEncoder $encoder, Swift_Encoder $paramEncoder = null, Swift_Mime_Grammar $grammar ) Creates a new ParameterizedHeader with $name.
getFieldBody ( ) : string Get the value of this header prepared for rendering.
getFieldType ( ) : integer Get the type of Header that this instance represents.
getParameter ( string $parameter ) : string Get the value of $parameter.
getParameters ( ) : string[] Returns an associative array of parameter names mapped to values.
setCharset ( string $charset ) Set the character set used in this Header.
setParameter ( string $parameter, string $value ) Set the value of $parameter.
setParameters ( array $parameters ) Set an associative array of parameter names mapped to values.

Protected Methods

Method Description
toTokens ( string $string = null ) : array Generate a list of all tokens in the final header.

Private Methods

Method Description
_createParameter ( string $name, string $value ) : string Render a RFC 2047 compliant header parameter from the $name and $value.
_getEndOfParameterValue ( string $value, boolean $encoded = false, boolean $firstLine = false ) : string Returns the parameter value from the "=" and beyond.

Method Details

__construct() public method

Creates a new ParameterizedHeader with $name.
public __construct ( string $name, Swift_Mime_HeaderEncoder $encoder, Swift_Encoder $paramEncoder = null, Swift_Mime_Grammar $grammar )
$name string
$encoder Swift_Mime_HeaderEncoder
$paramEncoder Swift_Encoder
$grammar Swift_Mime_Grammar

getFieldBody() public method

Get the value of this header prepared for rendering.
public getFieldBody ( ) : string
return string

getFieldType() public method

Get the type of Header that this instance represents.
public getFieldType ( ) : integer
return integer

getParameter() public method

Get the value of $parameter.
public getParameter ( string $parameter ) : string
$parameter string
return string

getParameters() public method

Returns an associative array of parameter names mapped to values.
public getParameters ( ) : string[]
return string[]

setCharset() public method

Set the character set used in this Header.
public setCharset ( string $charset )
$charset string

setParameter() public method

Set the value of $parameter.
public setParameter ( string $parameter, string $value )
$parameter string
$value string

setParameters() public method

Set an associative array of parameter names mapped to values.
public setParameters ( array $parameters )
$parameters array

toTokens() protected method

This doesn't need to be overridden in theory, but it is for implementation reasons to prevent potential breakage of attributes.
protected toTokens ( string $string = null ) : array
$string string The string to tokenize
return array An array of tokens as strings