Class Swift_Mime_SimpleHeaderSet
Inheritance | Swift_Mime_SimpleHeaderSet |
---|---|
Implements | Swift_Mime_HeaderSet |
A collection of MIME headers.
Public Methods
Method | Description | Defined By |
---|---|---|
__clone() | Make a deep copy of object. | Swift_Mime_SimpleHeaderSet |
__construct() | Create a new SimpleHeaderSet with the given $factory. | Swift_Mime_SimpleHeaderSet |
__toString() | Returns a string representation of this object. | Swift_Mime_SimpleHeaderSet |
addDateHeader() | Add a new Date header using $timestamp (UNIX time). | Swift_Mime_SimpleHeaderSet |
addIdHeader() | Add a new ID header for Message-ID or Content-ID. | Swift_Mime_SimpleHeaderSet |
addMailboxHeader() | Add a new Mailbox Header with a list of $addresses. | Swift_Mime_SimpleHeaderSet |
addParameterizedHeader() | Add a new ParameterizedHeader with $name, $value and $params. | Swift_Mime_SimpleHeaderSet |
addPathHeader() | Add a new Path header with an address (path) in it. | Swift_Mime_SimpleHeaderSet |
addTextHeader() | Add a new basic text header with $name and $value. | Swift_Mime_SimpleHeaderSet |
charsetChanged() | Notify this observer that the entity's charset has changed. | Swift_Mime_SimpleHeaderSet |
defineOrdering() | Define a list of Header names as an array in the correct order. | Swift_Mime_SimpleHeaderSet |
get() | Get the header with the given $name. | Swift_Mime_SimpleHeaderSet |
getAll() | Get all headers with the given $name. | Swift_Mime_SimpleHeaderSet |
has() | Returns true if at least one header with the given $name exists. | Swift_Mime_SimpleHeaderSet |
listAll() | Return the name of all Headers. | Swift_Mime_SimpleHeaderSet |
newInstance() | Create a new instance of this HeaderSet. | Swift_Mime_SimpleHeaderSet |
remove() | Remove the header with the given $name if it's set. | Swift_Mime_SimpleHeaderSet |
removeAll() | Remove all headers with the given $name. | Swift_Mime_SimpleHeaderSet |
set() | Set a header in the HeaderSet. | Swift_Mime_SimpleHeaderSet |
setAlwaysDisplayed() | Set a list of header names which must always be displayed when set. | Swift_Mime_SimpleHeaderSet |
setCharset() | Set the charset used by these headers. | Swift_Mime_SimpleHeaderSet |
toString() | Returns a string with a representation of all headers. | Swift_Mime_SimpleHeaderSet |
Method Details
Make a deep copy of object.
public void __clone ( ) |
Create a new SimpleHeaderSet with the given $factory.
public void __construct ( Swift_Mime_HeaderFactory $factory, $charset = null ) | ||
$factory | Swift_Mime_HeaderFactory | |
$charset | string |
Returns a string representation of this object.
See also toString().
public string __toString ( ) |
Add a new Date header using $timestamp (UNIX time).
public void addDateHeader ( $name, $timestamp = null ) | ||
$name | string | |
$timestamp | int |
Add a new ID header for Message-ID or Content-ID.
public void addIdHeader ( $name, $ids = null ) | ||
$name | string | |
$ids | string|array |
Add a new Mailbox Header with a list of $addresses.
public void addMailboxHeader ( $name, $addresses = null ) | ||
$name | string | |
$addresses | array|string |
Add a new ParameterizedHeader with $name, $value and $params.
public void addParameterizedHeader ( $name, $value = null, $params = [] ) | ||
$name | string | |
$value | string | |
$params | array |
Add a new Path header with an address (path) in it.
public void addPathHeader ( $name, $path = null ) | ||
$name | string | |
$path | string |
Add a new basic text header with $name and $value.
public void addTextHeader ( $name, $value = null ) | ||
$name | string | |
$value | string |
Notify this observer that the entity's charset has changed.
public void charsetChanged ( $charset ) | ||
$charset | 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 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 Swift_Mime_Header get ( $name, $index = 0 ) | ||
$name | string | |
$index | int |
Get all headers with the given $name.
public 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 bool has ( $name, $index = 0 ) | ||
$name | string | |
$index | int |
Return the name of all Headers.
public array listAll ( ) |
Create a new instance of this HeaderSet.
public 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 void remove ( $name, $index = 0 ) | ||
$name | string | |
$index | int |
Remove all headers with the given $name.
public 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 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 void setAlwaysDisplayed ( array $names ) | ||
$names | array |
Set the charset used by these headers.
public void setCharset ( $charset ) | ||
$charset | string |
Returns a string with a representation of all headers.
public string toString ( ) |