XOOPS RMCommon Utilities
2.1.8.91RC
|
Public Member Functions | |
__construct ($name, Swift_Mime_HeaderEncoder $encoder) | |
getAddresses () | |
getFieldBody () | |
getFieldBodyModel () | |
getFieldType () | |
getNameAddresses () | |
getNameAddressStrings () | |
removeAddresses ($addresses) | |
setAddresses ($addresses) | |
setFieldBodyModel ($model) | |
setNameAddresses ($mailboxes) | |
Public Member Functions inherited from Swift_Mime_Headers_AbstractHeader | |
__toString () | |
getCharset () | |
getEncoder () | |
getFieldName () | |
getLanguage () | |
getMaxLineLength () | |
setCharset ($charset) | |
setEncoder (Swift_Mime_HeaderEncoder $encoder) | |
setLanguage ($lang) | |
setMaxLineLength ($lineLength) | |
toString () | |
Protected Member Functions | |
createDisplayNameString ($displayName, $shorten=false) | |
createMailboxListString (array $mailboxes) | |
normalizeMailboxes (array $mailboxes) | |
Protected Member Functions inherited from Swift_Mime_Headers_AbstractHeader | |
clearCachedValueIf ($condition) | |
createPhrase (Swift_Mime_Header $header, $string, $charset, Swift_Mime_HeaderEncoder $encoder=null, $shorten=false) | |
encodeWords (Swift_Mime_Header $header, $input, $usedLength=-1) | |
escapeSpecials ($token, $include=array(), $exclude=array()) | |
generateTokenLines ($token) | |
getCachedValue () | |
getEncodableWordTokens ($string) | |
getGrammar ($name) | |
getTokenAsEncodedWord ($token, $firstLineOffset=0) | |
initializeGrammar () | |
setCachedValue ($value) | |
setFieldName ($name) | |
tokenNeedsEncoding ($token) | |
toTokens ($string=null) | |
Private Member Functions | |
_assertValidAddress ($address) | |
_createNameAddressStrings (array $mailboxes) | |
Private Attributes | |
$_mailboxes = array() | |
Additional Inherited Members | |
Public Attributes inherited from Swift_Mime_Header | |
const | TYPE_DATE = 16 |
const | TYPE_ID = 32 |
const | TYPE_MAILBOX = 8 |
const | TYPE_PARAMETERIZED = 6 |
const | TYPE_PATH = 64 |
const | TYPE_TEXT = 2 |
Definition at line 20 of file MailboxHeader.php.
Swift_Mime_Headers_MailboxHeader::__construct | ( | $name, | |
Swift_Mime_HeaderEncoder | $encoder | ||
) |
Creates a new MailboxHeader with $name.
string | $name | of Header |
Swift_Mime_HeaderEncoder | $encoder |
Definition at line 35 of file MailboxHeader.php.
References Swift_Mime_Headers_AbstractHeader\initializeGrammar(), Swift_Mime_Headers_AbstractHeader\setEncoder(), and Swift_Mime_Headers_AbstractHeader\setFieldName().
|
private |
Throws an Exception if the address passed does not comply with RFC 2822.
string | $address |
Exception | If invalid. protected |
Definition at line 304 of file MailboxHeader.php.
References Swift_Mime_Headers_AbstractHeader\getGrammar().
Referenced by normalizeMailboxes().
|
private |
Return an array of strings conforming the the name-addr spec of RFC 2822.
string[] | $mailboxes |
Definition at line 280 of file MailboxHeader.php.
References createDisplayNameString().
Referenced by createMailboxListString(), and getNameAddressStrings().
|
protected |
Produces a compliant, formatted display-name based on the string given.
string | $displayName | as displayed |
boolean | $shorten | the first line to make remove for header name |
Definition at line 253 of file MailboxHeader.php.
References Swift_Mime_Headers_AbstractHeader\createPhrase(), Swift_Mime_Headers_AbstractHeader\getCharset(), and Swift_Mime_Headers_AbstractHeader\getEncoder().
Referenced by _createNameAddressStrings().
|
protected |
Creates a string form of all the mailboxes in the passed array.
string[] | $mailboxes |
Swift_RfcComplianceException | protected |
Definition at line 267 of file MailboxHeader.php.
References _createNameAddressStrings().
Referenced by getFieldBody().
Swift_Mime_Headers_MailboxHeader::getAddresses | ( | ) |
Get all email addresses in this Header.
Definition at line 179 of file MailboxHeader.php.
Swift_Mime_Headers_MailboxHeader::getFieldBody | ( | ) |
Get the string value of the body in this Header. This is not necessarily RFC 2822 compliant since folding white space will not be added at this stage (see toString() for that).
Swift_RfcComplianceException |
Implements Swift_Mime_Header.
Definition at line 205 of file MailboxHeader.php.
References createMailboxListString(), Swift_Mime_Headers_AbstractHeader\getCachedValue(), and Swift_Mime_Headers_AbstractHeader\setCachedValue().
Swift_Mime_Headers_MailboxHeader::getFieldBodyModel | ( | ) |
Get the model for the field body. This method returns an associative array like getNameAddresses()
Swift_RfcComplianceException |
Implements Swift_Mime_Header.
Definition at line 70 of file MailboxHeader.php.
References getNameAddresses().
Swift_Mime_Headers_MailboxHeader::getFieldType | ( | ) |
Get the type of Header that this instance represents.
Implements Swift_Mime_Header.
Definition at line 48 of file MailboxHeader.php.
Swift_Mime_Headers_MailboxHeader::getNameAddresses | ( | ) |
Get all mailboxes in this Header as key=>value pairs. The key is the address and the value is the name (or null if none set). Example: <?php $header = new Swift_Mime_Headers_MailboxHeader('From', array('chris' => 'Chris Corbyn', ' @swi ftmai ler. orgmark@' => 'Mark Corbyn') ); print_r($header-> swif tmail er.o rggetNameAddresses()); // array ( // chris => Chris Corbyn, // @swi ftmai ler. orgmark@ => Mark Corbyn // ) ?> swif tmail er.o rg
Definition at line 148 of file MailboxHeader.php.
References $_mailboxes.
Referenced by getFieldBodyModel(), and getNameAddressStrings().
Swift_Mime_Headers_MailboxHeader::getNameAddressStrings | ( | ) |
Get the full mailbox list of this Header as an array of valid RFC 2822 strings. Example: <?php $header = new Swift_Mime_Headers_MailboxHeader('From', array('chris' => 'Chris Corbyn', ' @swi ftmai ler. orgmark@' => 'Mark Corbyn') ); print_r($header-> swif tmail er.o rggetNameAddressStrings()); // array ( // 0 => Chris Corbyn chris, // 1 => Mark Corbyn @swi ftmai ler. orgmark@ // ) ?> swif tmail er.o rg
Swift_RfcComplianceException |
Definition at line 122 of file MailboxHeader.php.
References _createNameAddressStrings(), and getNameAddresses().
|
protected |
Normalizes a user-input list of mailboxes into consistent key=>value pairs.
string[] | $mailboxes |
Definition at line 223 of file MailboxHeader.php.
References _assertValidAddress().
Referenced by setNameAddresses().
Swift_Mime_Headers_MailboxHeader::removeAddresses | ( | $addresses | ) |
Remove one or more addresses from this Header.
string|string[] | $addresses |
Definition at line 188 of file MailboxHeader.php.
References Swift_Mime_Headers_AbstractHeader\setCachedValue().
Swift_Mime_Headers_MailboxHeader::setAddresses | ( | $addresses | ) |
Makes this Header represent a list of plain email addresses with no names. Example: <?php //Sets three email addresses as the Header data $header->setAddresses( array('one@d', ' omai n.tldtwo@d', ' omai n.tldthree') ); ?> @dom ain.t ld
string[] | $addresses |
Swift_RfcComplianceException |
Definition at line 169 of file MailboxHeader.php.
References setNameAddresses().
Swift_Mime_Headers_MailboxHeader::setFieldBodyModel | ( | $model | ) |
Set the model for the field body. This method takes a string, or an array of addresses.
mixed | $model |
Swift_RfcComplianceException |
Implements Swift_Mime_Header.
Definition at line 59 of file MailboxHeader.php.
References setNameAddresses().
Swift_Mime_Headers_MailboxHeader::setNameAddresses | ( | $mailboxes | ) |
Set a list of mailboxes to be shown in this Header. The mailboxes can be a simple array of addresses, or an array of key=>value pairs where (email => personalName). Example: <?php //Sets two mailboxes in the Header, one with a personal name $header->setNameAddresses(array( 'chris' => 'Chris Corbyn', ' @swi ftmai ler. orgmark@' //No associated personal name )); ?> swif tmail er.o rg
string|string[] | $mailboxes |
Swift_RfcComplianceException |
Definition at line 95 of file MailboxHeader.php.
References normalizeMailboxes(), and Swift_Mime_Headers_AbstractHeader\setCachedValue().
Referenced by setAddresses(), and setFieldBodyModel().
|
private |
Definition at line 28 of file MailboxHeader.php.
Referenced by getNameAddresses().