XOOPS RMCommon Utilities
2.1.8.91RC
|
Public Member Functions | |
__construct (Swift_Mime_HeaderFactory $factory, $charset=null) | |
__toString () | |
addDateHeader ($name, $timestamp=null) | |
addIdHeader ($name, $ids=null) | |
addMailboxHeader ($name, $addresses=null) | |
addParameterizedHeader ($name, $value=null, $params=array()) | |
addPathHeader ($name, $path=null) | |
addTextHeader ($name, $value=null) | |
charsetChanged ($charset) | |
defineOrdering (array $sequence) | |
get ($name, $index=0) | |
getAll ($name=null) | |
has ($name, $index=0) | |
newInstance () | |
remove ($name, $index=0) | |
removeAll ($name) | |
set (Swift_Mime_Header $header, $index=0) | |
setAlwaysDisplayed (array $names) | |
setCharset ($charset) | |
toString () | |
Private Member Functions | |
_canSort () | |
_isDisplayed (Swift_Mime_Header $header) | |
_notifyHeadersOfCharset ($charset) | |
_sortHeaders ($a, $b) | |
_storeHeader ($name, Swift_Mime_Header $header, $offset=null) | |
Private Attributes | |
$_charset | |
$_factory | |
$_headers = array() | |
$_order = array() | |
$_required = array() | |
Definition at line 22 of file SimpleHeaderSet.php.
Swift_Mime_SimpleHeaderSet::__construct | ( | Swift_Mime_HeaderFactory | $factory, |
$charset = null |
|||
) |
Create a new SimpleHeaderSet with the given $factory.
Swift_Mime_HeaderFactory | $factory | |
string | $charset |
Definition at line 46 of file SimpleHeaderSet.php.
References setCharset().
Swift_Mime_SimpleHeaderSet::__toString | ( | ) |
Returns a string representation of this object.
Definition at line 324 of file SimpleHeaderSet.php.
References toString().
|
private |
Test if the headers can be sorted
Definition at line 349 of file SimpleHeaderSet.php.
Referenced by toString().
|
private |
Test if the given Header is always displayed
Definition at line 379 of file SimpleHeaderSet.php.
References Swift_Mime_Header\getFieldName().
Referenced by toString().
|
private |
Notify all Headers of the new charset
Definition at line 385 of file SimpleHeaderSet.php.
Referenced by setCharset().
|
private |
uksort() algorithm for Header ordering
Definition at line 355 of file SimpleHeaderSet.php.
References elseif().
|
private |
Save a Header to the internal collection
Definition at line 332 of file SimpleHeaderSet.php.
Referenced by addDateHeader(), addIdHeader(), addMailboxHeader(), addParameterizedHeader(), addPathHeader(), addTextHeader(), and set().
Swift_Mime_SimpleHeaderSet::addDateHeader | ( | $name, | |
$timestamp = null |
|||
) |
Add a new Date header using $timestamp (UNIX time).
string | $name | |
int | $timestamp |
Implements Swift_Mime_HeaderSet.
Definition at line 86 of file SimpleHeaderSet.php.
References _storeHeader().
Swift_Mime_SimpleHeaderSet::addIdHeader | ( | $name, | |
$ids = null |
|||
) |
Add a new ID header for Message-ID or Content-ID.
string | $name | |
string | array | $ids |
Implements Swift_Mime_HeaderSet.
Definition at line 125 of file SimpleHeaderSet.php.
References _storeHeader().
Swift_Mime_SimpleHeaderSet::addMailboxHeader | ( | $name, | |
$addresses = null |
|||
) |
Add a new Mailbox Header with a list of $addresses.
string | $name | |
array | string | $addresses |
Implements Swift_Mime_HeaderSet.
Definition at line 74 of file SimpleHeaderSet.php.
References _storeHeader().
Swift_Mime_SimpleHeaderSet::addParameterizedHeader | ( | $name, | |
$value = null , |
|||
$params = array() |
|||
) |
Add a new ParameterizedHeader with $name, $value and $params.
string | $name | |
string | $value | |
array | $params |
Implements Swift_Mime_HeaderSet.
Definition at line 111 of file SimpleHeaderSet.php.
References _storeHeader().
Swift_Mime_SimpleHeaderSet::addPathHeader | ( | $name, | |
$path = null |
|||
) |
Add a new Path header with an address (path) in it.
string | $name | |
string | $path |
Implements Swift_Mime_HeaderSet.
Definition at line 136 of file SimpleHeaderSet.php.
References $path, and _storeHeader().
Swift_Mime_SimpleHeaderSet::addTextHeader | ( | $name, | |
$value = null |
|||
) |
Add a new basic text header with $name and $value.
string | $name | |
string | $value |
Implements Swift_Mime_HeaderSet.
Definition at line 98 of file SimpleHeaderSet.php.
References _storeHeader().
Swift_Mime_SimpleHeaderSet::charsetChanged | ( | $charset | ) |
Notify this observer that the entity's charset has changed.
string | $charset |
Implements Swift_Mime_CharsetObserver.
Definition at line 286 of file SimpleHeaderSet.php.
References setCharset().
Swift_Mime_SimpleHeaderSet::defineOrdering | ( | array | $sequence | ) |
Define a list of Header names as an array in the correct order.
These Headers will be output in the given order where present.
array | $sequence |
Implements Swift_Mime_HeaderSet.
Definition at line 264 of file SimpleHeaderSet.php.
Swift_Mime_SimpleHeaderSet::get | ( | $name, | |
$index = 0 |
|||
) |
Get the header with the given $name.
If multiple headers match, the actual one may be specified by $index. Returns NULL if none present.
string | $name | |
int | $index |
Implements Swift_Mime_HeaderSet.
Definition at line 186 of file SimpleHeaderSet.php.
References has().
Swift_Mime_SimpleHeaderSet::getAll | ( | $name = null | ) |
Get all headers with the given $name.
string | $name |
Implements Swift_Mime_HeaderSet.
Definition at line 202 of file SimpleHeaderSet.php.
Swift_Mime_SimpleHeaderSet::has | ( | $name, | |
$index = 0 |
|||
) |
Returns true if at least one header with the given $name exists.
If multiple headers match, the actual one may be specified by $index.
string | $name | |
int | $index |
Implements Swift_Mime_HeaderSet.
Definition at line 151 of file SimpleHeaderSet.php.
Referenced by get().
Swift_Mime_SimpleHeaderSet::newInstance | ( | ) |
Create a new instance of this HeaderSet.
Implements Swift_Mime_HeaderSet.
Definition at line 252 of file SimpleHeaderSet.php.
References $_factory.
Swift_Mime_SimpleHeaderSet::remove | ( | $name, | |
$index = 0 |
|||
) |
Remove the header with the given $name if it's set.
If multiple headers match, the actual one may be specified by $index.
string | $name | |
int | $index |
Implements Swift_Mime_HeaderSet.
Definition at line 230 of file SimpleHeaderSet.php.
Swift_Mime_SimpleHeaderSet::removeAll | ( | $name | ) |
Remove all headers with the given $name.
string | $name |
Implements Swift_Mime_HeaderSet.
Definition at line 241 of file SimpleHeaderSet.php.
Swift_Mime_SimpleHeaderSet::set | ( | Swift_Mime_Header | $header, |
$index = 0 |
|||
) |
Set a header in the HeaderSet.
The header may be a previously fetched header via 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.
Swift_Mime_Header | $header | |
int | $index |
Implements Swift_Mime_HeaderSet.
Definition at line 170 of file SimpleHeaderSet.php.
References _storeHeader().
Swift_Mime_SimpleHeaderSet::setAlwaysDisplayed | ( | array | $names | ) |
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.
array | $names |
Implements Swift_Mime_HeaderSet.
Definition at line 276 of file SimpleHeaderSet.php.
Swift_Mime_SimpleHeaderSet::setCharset | ( | $charset | ) |
Set the charset used by these headers.
string | $charset |
Definition at line 61 of file SimpleHeaderSet.php.
References _notifyHeadersOfCharset().
Referenced by __construct(), and charsetChanged().
Swift_Mime_SimpleHeaderSet::toString | ( | ) |
Returns a string with a representation of all headers.
Implements Swift_Mime_HeaderSet.
Definition at line 296 of file SimpleHeaderSet.php.
References $_headers, _canSort(), and _isDisplayed().
Referenced by __toString().
|
private |
The charset used by Headers
Definition at line 38 of file SimpleHeaderSet.php.
|
private |
|
private |
Collection of set Headers
Definition at line 29 of file SimpleHeaderSet.php.
Referenced by toString().
|
private |
Field ordering details
Definition at line 32 of file SimpleHeaderSet.php.
|
private |
List of fields which are required to be displayed
Definition at line 35 of file SimpleHeaderSet.php.