Documentation

Swift_Mime_SimpleHeaderSet
in package
implements Swift_Mime_CharsetObserver

A collection of MIME headers.

Tags
author

Chris Corbyn

Interfaces, Classes and Traits

Swift_Mime_CharsetObserver
Observes changes in an Mime entity's character set.

Table of Contents

$charset  : mixed
The charset used by Headers
$factory  : mixed
HeaderFactory
$headers  : mixed
Collection of set Headers
$order  : mixed
Field ordering details
$required  : mixed
List of fields which are required to be displayed
__clone()  : mixed
Make a deep copy of object.
__construct()  : mixed
Create a new SimpleHeaderSet with the given $factory.
__toString()  : string
Returns a string representation of this object.
addDateHeader()  : mixed
Add a new Date header using $dateTime.
addIdHeader()  : mixed
Add a new ID header for Message-ID or Content-ID.
addMailboxHeader()  : mixed
Add a new Mailbox Header with a list of $addresses.
addParameterizedHeader()  : mixed
Add a new ParameterizedHeader with $name, $value and $params.
addPathHeader()  : mixed
Add a new Path header with an address (path) in it.
addTextHeader()  : mixed
Add a new basic text header with $name and $value.
charsetChanged()  : mixed
Notify this observer that the entity's charset has changed.
defineOrdering()  : mixed
Define a list of Header names as an array in the correct order.
get()  : Swift_Mime_Header
Get the header with the given $name.
getAll()  : array<string|int, mixed>
Get all headers with the given $name.
has()  : bool
Returns true if at least one header with the given $name exists.
listAll()  : array<string|int, mixed>
Return the name of all Headers.
newInstance()  : mixed
remove()  : mixed
Remove the header with the given $name if it's set.
removeAll()  : mixed
Remove all headers with the given $name.
set()  : mixed
Set a header in the HeaderSet.
setAlwaysDisplayed()  : mixed
Set a list of header names which must always be displayed when set.
setCharset()  : mixed
Set the charset used by these headers.
toString()  : string
Returns a string with a representation of all headers.
canSort()  : mixed
Test if the headers can be sorted
isDisplayed()  : mixed
Test if the given Header is always displayed
notifyHeadersOfCharset()  : mixed
Notify all Headers of the new charset
sortHeaders()  : mixed
uksort() algorithm for Header ordering
storeHeader()  : mixed
Save a Header to the internal collection

Properties

$required

List of fields which are required to be displayed

private mixed $required = []

Methods

__clone()

Make a deep copy of object.

public __clone() : mixed
Return values
mixed

__toString()

Returns a string representation of this object.

public __toString() : string
Tags
see
toString()
Return values
string

addDateHeader()

Add a new Date header using $dateTime.

public addDateHeader(string $name[, DateTimeInterface $dateTime = null ]) : mixed
Parameters
$name : string
$dateTime : DateTimeInterface = null
Return values
mixed

addIdHeader()

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

public addIdHeader(string $name[, string|array<string|int, mixed> $ids = null ]) : mixed
Parameters
$name : string
$ids : string|array<string|int, mixed> = null
Return values
mixed

addMailboxHeader()

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

public addMailboxHeader(string $name[, array<string|int, mixed>|string $addresses = null ]) : mixed
Parameters
$name : string
$addresses : array<string|int, mixed>|string = null
Return values
mixed

addParameterizedHeader()

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

public addParameterizedHeader(string $name[, string $value = null ][, array<string|int, mixed> $params = [] ]) : mixed
Parameters
$name : string
$value : string = null
$params : array<string|int, mixed> = []
Return values
mixed

addPathHeader()

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

public addPathHeader(string $name[, string $path = null ]) : mixed
Parameters
$name : string
$path : string = null
Return values
mixed

addTextHeader()

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

public addTextHeader(string $name[, string $value = null ]) : mixed
Parameters
$name : string
$value : string = null
Return values
mixed

charsetChanged()

Notify this observer that the entity's charset has changed.

public charsetChanged(string $charset) : mixed
Parameters
$charset : string
Return values
mixed

defineOrdering()

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

public defineOrdering(array<string|int, mixed> $sequence) : mixed

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

Parameters
$sequence : array<string|int, mixed>
Return values
mixed

get()

Get the header with the given $name.

public get(string $name, int $index) : Swift_Mime_Header

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

Parameters
$name : string
$index : int
Return values
Swift_Mime_Header

getAll()

Get all headers with the given $name.

public getAll([string $name = null ]) : array<string|int, mixed>
Parameters
$name : string = null
Return values
array<string|int, mixed>

has()

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

public has(string $name, int $index) : bool

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

Parameters
$name : string
$index : int
Return values
bool

listAll()

Return the name of all Headers.

public listAll() : array<string|int, mixed>
Return values
array<string|int, mixed>

remove()

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

public remove(string $name, int $index) : mixed

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

Parameters
$name : string
$index : int
Return values
mixed

removeAll()

Remove all headers with the given $name.

public removeAll(string $name) : mixed
Parameters
$name : string
Return values
mixed

set()

Set a header in the HeaderSet.

public set(Swift_Mime_Header $header, int $index) : mixed

The header may be a previously fetched header via 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.

Parameters
$header : Swift_Mime_Header
$index : int
Return values
mixed

setAlwaysDisplayed()

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

public setAlwaysDisplayed(array<string|int, mixed> $names) : mixed

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

Parameters
$names : array<string|int, mixed>
Return values
mixed

setCharset()

Set the charset used by these headers.

public setCharset(string $charset) : mixed
Parameters
$charset : string
Return values
mixed

toString()

Returns a string with a representation of all headers.

public toString() : string
Return values
string

canSort()

Test if the headers can be sorted

private canSort() : mixed
Return values
mixed

notifyHeadersOfCharset()

Notify all Headers of the new charset

private notifyHeadersOfCharset(mixed $charset) : mixed
Parameters
$charset : mixed
Return values
mixed

sortHeaders()

uksort() algorithm for Header ordering

private sortHeaders(mixed $a, mixed $b) : mixed
Parameters
$a : mixed
$b : mixed
Return values
mixed

storeHeader()

Save a Header to the internal collection

private storeHeader(mixed $name, Swift_Mime_Header $header[, mixed $offset = null ]) : mixed
Parameters
$name : mixed
$header : Swift_Mime_Header
$offset : mixed = null
Return values
mixed

Search results