Interface Swift_Mime_HeaderSet
Extends | Swift_Mime_CharsetObserver |
---|---|
Implemented by | Swift_Mime_SimpleHeaderSet |
A collection of MIME headers.
Public Methods
Method | Description | Defined 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
Add a new Date header using $timestamp (UNIX time).
public abstract void addDateHeader ( $name, $timestamp = null ) | ||
$name | string | |
$timestamp | int |
Add a new ID header for Message-ID or Content-ID.
public abstract void addIdHeader ( $name, $ids = null ) | ||
$name | string | |
$ids | string|array |
Add a new Mailbox Header with a list of $addresses.
public abstract void addMailboxHeader ( $name, $addresses = null ) | ||
$name | string | |
$addresses | array|string |
Add a new ParameterizedHeader with $name, $value and $params.
public abstract void addParameterizedHeader ( $name, $value = null, $params = [] ) | ||
$name | string | |
$value | string | |
$params | array |
Add a new Path header with an address (path) in it.
public abstract void addPathHeader ( $name, $path = null ) | ||
$name | string | |
$path | string |
Add a new basic text header with $name and $value.
public abstract void addTextHeader ( $name, $value = null ) | ||
$name | string | |
$value | string |
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 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 |
Get all headers with the given $name.
public abstract array getAll ( $name = null ) | ||
$name | string |
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 |
Return the name of all Headers.
public abstract array listAll ( ) |
Create a new instance of this HeaderSet.
public abstract Swift_Mime_HeaderSet newInstance ( ) |
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 |
Remove all headers with the given $name.
public abstract void removeAll ( $name ) | ||
$name | string |
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 |
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 |
Returns a string with a representation of all headers.
public abstract string toString ( ) |