PHP Class Swift_Mime_Headers_IdentificationHeader

Author: Chris Corbyn
Inheritance: extends Swift_Mime_Headers_AbstractHeader
Show file Open project: swiftmailer/swiftmailer Class Usage Examples

Public Methods

Method Description
__construct ( string $name, Egulias\EmailValidator\EmailValidator $emailValidator ) Creates a new IdentificationHeader with the given $name and $id.
getFieldBody ( ) : string Get the string value of the body in this Header.
getFieldBodyModel ( ) : array Get the model for the field body.
getFieldType ( ) : integer Get the type of Header that this instance represents.
getId ( ) : string Get the ID used in the value of this Header.
getIds ( ) : string[] Get the list of IDs used in this Header.
setFieldBodyModel ( mixed $model ) Set the model for the field body.
setId ( string | array $id ) Set the ID used in the value of this header.
setIds ( array $ids ) Set a collection of IDs to use in the value of this Header.

Private Methods

Method Description
assertValidId ( string $id ) Throws an Exception if the id passed does not comply with RFC 2822.

Method Details

__construct() public method

Creates a new IdentificationHeader with the given $name and $id.
public __construct ( string $name, Egulias\EmailValidator\EmailValidator $emailValidator )
$name string
$emailValidator Egulias\EmailValidator\EmailValidator

getFieldBody() public method

This is not necessarily RFC 2822 compliant since folding white space will not be added at this stage (see {@see \toString()} for that).
See also: toString()
public getFieldBody ( ) : string
return string

getFieldBodyModel() public method

This method returns an array of IDs
public getFieldBodyModel ( ) : array
return array

getFieldType() public method

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

getId() public method

If multiple IDs are set only the first is returned.
public getId ( ) : string
return string

getIds() public method

Get the list of IDs used in this Header.
public getIds ( ) : string[]
return string[]

setFieldBodyModel() public method

This method takes a string ID, or an array of IDs.
public setFieldBodyModel ( mixed $model )
$model mixed

setId() public method

Set the ID used in the value of this header.
public setId ( string | array $id )
$id string | array

setIds() public method

Set a collection of IDs to use in the value of this Header.
public setIds ( array $ids )
$ids array