Interface Swift_Mime_HeaderSet

ExtendsSwift_Mime_CharsetObserver
Implemented bySwift_Mime_SimpleHeaderSet

A collection of MIME headers.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
addDateHeader() Add a new Date header using $timestamp (UNIX time). Swift_Mime_HeaderSet
addIdHeader() Add a new ID header for Message-ID or Content-ID. Swift_Mime_HeaderSet
addMailboxHeader() Add a new Mailbox Header with a list of $addresses. Swift_Mime_HeaderSet
addParameterizedHeader() Add a new ParameterizedHeader with $name, $value and $params. Swift_Mime_HeaderSet
addPathHeader() Add a new Path header with an address (path) in it. Swift_Mime_HeaderSet
addTextHeader() Add a new basic text header with $name and $value. Swift_Mime_HeaderSet
charsetChanged() Notify this observer that the entity's charset has changed. Swift_Mime_CharsetObserver
defineOrdering() Define a list of Header names as an array in the correct order. Swift_Mime_HeaderSet
get() Get the header with the given $name. Swift_Mime_HeaderSet
getAll() Get all headers with the given $name. Swift_Mime_HeaderSet
has() Returns true if at least one header with the given $name exists. Swift_Mime_HeaderSet
listAll() Return the name of all Headers. Swift_Mime_HeaderSet
newInstance() Create a new instance of this HeaderSet. Swift_Mime_HeaderSet
remove() Remove the header with the given $name if it's set. Swift_Mime_HeaderSet
removeAll() Remove all headers with the given $name. Swift_Mime_HeaderSet
set() Set a header in the HeaderSet. Swift_Mime_HeaderSet
setAlwaysDisplayed() Set a list of header names which must always be displayed when set. Swift_Mime_HeaderSet
toString() Returns a string with a representation of all headers. Swift_Mime_HeaderSet

Method Details

addDateHeader() public abstract method

Add a new Date header using $timestamp (UNIX time).

public abstract void addDateHeader ( $name, $timestamp null )
$name string
$timestamp int
addIdHeader() public abstract method

Add a new ID header for Message-ID or Content-ID.

public abstract void addIdHeader ( $name, $ids null )
$name string
$ids string|array
addMailboxHeader() public abstract method

Add a new Mailbox Header with a list of $addresses.

public abstract void addMailboxHeader ( $name, $addresses null )
$name string
$addresses array|string
addParameterizedHeader() public abstract method

Add a new ParameterizedHeader with $name, $value and $params.

public abstract void addParameterizedHeader ( $name, $value null, $params = [] )
$name string
$value string
$params array
addPathHeader() public abstract method

Add a new Path header with an address (path) in it.

public abstract void addPathHeader ( $name, $path null )
$name string
$path string
addTextHeader() public abstract method

Add a new basic text header with $name and $value.

public abstract void addTextHeader ( $name, $value null )
$name string
$value string
defineOrdering() public abstract method

Define a list of Header names as an array in the correct order.

These Headers will be output in the given order where present.

public abstract void defineOrdering ( array $sequence )
$sequence array
get() public abstract method

Get the header with the given $name.

If multiple headers match, the actual one may be specified by $index. Returns NULL if none present.

public abstract Swift_Mime_Header get ( $name, $index 0 )
$name string
$index int
getAll() public abstract method

Get all headers with the given $name.

public abstract array getAll ( $name null )
$name string
has() public abstract method

Returns true if at least one header with the given $name exists.

If multiple headers match, the actual one may be specified by $index.

public abstract bool has ( $name, $index 0 )
$name string
$index int
listAll() public abstract method

Return the name of all Headers.

public abstract array listAll ( )
newInstance() public abstract method

Create a new instance of this HeaderSet.

public abstract Swift_Mime_HeaderSet newInstance ( )
remove() public abstract method

Remove the header with the given $name if it's set.

If multiple headers match, the actual one may be specified by $index.

public abstract void remove ( $name, $index 0 )
$name string
$index int
removeAll() public abstract method

Remove all headers with the given $name.

public abstract void removeAll ( $name )
$name string
set() public abstract method

Set a header in the HeaderSet.

The header may be a previously fetched header via {@link get()} or it may be one that has been created separately.

If $index is specified, the header will be inserted into the set at this offset.

public abstract void set ( Swift_Mime_Header $header, $index 0 )
$header Swift_Mime_Header
$index int
setAlwaysDisplayed() public abstract method

Set a list of header names which must always be displayed when set.

Usually headers without a field value won't be output unless set here.

public abstract void setAlwaysDisplayed ( array $names )
$names array
toString() public abstract method

Returns a string with a representation of all headers.

public abstract string toString ( )