TYPO3
7.6
|
Public Member Functions | |
__construct ($name, Swift_Mime_HeaderEncoder $encoder, Swift_Mime_Grammar $grammar) | |
getFieldType () | |
setFieldBodyModel ($model) | |
getFieldBodyModel () | |
setNameAddresses ($mailboxes) | |
getNameAddressStrings () | |
getNameAddresses () | |
setAddresses ($addresses) | |
getAddresses () | |
removeAddresses ($addresses) | |
getFieldBody () | |
Public Member Functions inherited from Swift_Mime_Headers_AbstractHeader | |
__construct (Swift_Mime_Grammar $grammar) | |
setCharset ($charset) | |
getCharset () | |
setLanguage ($lang) | |
getLanguage () | |
setEncoder (Swift_Mime_HeaderEncoder $encoder) | |
getEncoder () | |
setGrammar (Swift_Mime_Grammar $grammar) | |
getGrammar () | |
getFieldName () | |
setMaxLineLength ($lineLength) | |
getMaxLineLength () | |
toString () | |
__toString () | |
Protected Member Functions | |
normalizeMailboxes (array $mailboxes) | |
createDisplayNameString ($displayName, $shorten=false) | |
createMailboxListString (array $mailboxes) | |
tokenNeedsEncoding ($token) | |
Protected Member Functions inherited from Swift_Mime_Headers_AbstractHeader | |
setFieldName ($name) | |
createPhrase (Swift_Mime_Header $header, $string, $charset, Swift_Mime_HeaderEncoder $encoder=null, $shorten=false) | |
encodeWords (Swift_Mime_Header $header, $input, $usedLength=-1) | |
tokenNeedsEncoding ($token) | |
getEncodableWordTokens ($string) | |
getTokenAsEncodedWord ($token, $firstLineOffset=0) | |
generateTokenLines ($token) | |
setCachedValue ($value) | |
getCachedValue () | |
clearCachedValueIf ($condition) | |
toTokens ($string=null) | |
Private Member Functions | |
_createNameAddressStrings (array $mailboxes) | |
_assertValidAddress ($address) | |
Private Attributes | |
$_mailboxes = array() | |
Additional Inherited Members | |
Public Attributes inherited from Swift_Mime_Header | |
const | TYPE_TEXT = 2 |
const | TYPE_PARAMETERIZED = 6 |
const | TYPE_MAILBOX = 8 |
const | TYPE_DATE = 16 |
const | TYPE_ID = 32 |
const | TYPE_PATH = 64 |
A Mailbox Address MIME Header for something like From or Sender.
Definition at line 16 of file MailboxHeader.php.
__construct | ( | $name, | |
Swift_Mime_HeaderEncoder | $encoder, | ||
Swift_Mime_Grammar | $grammar | ||
) |
Creates a new MailboxHeader with $name.
string | $name | of Header |
Swift_Mime_HeaderEncoder | $encoder | |
Swift_Mime_Grammar | $grammar |
Definition at line 32 of file MailboxHeader.php.
References 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 |
Swift_RfcComplianceException | If invalid. |
Definition at line 344 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 321 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 |
bool | $shorten | the first line to make remove for header name |
Definition at line 278 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 |
Definition at line 294 of file MailboxHeader.php.
References _createNameAddressStrings().
Referenced by getFieldBody().
getAddresses | ( | ) |
Get all email addresses in this Header.
Definition at line 201 of file MailboxHeader.php.
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 231 of file MailboxHeader.php.
References createMailboxListString(), Swift_Mime_Headers_AbstractHeader\getCachedValue(), and Swift_Mime_Headers_AbstractHeader\setCachedValue().
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 75 of file MailboxHeader.php.
References getNameAddresses().
getFieldType | ( | ) |
Get the type of Header that this instance represents.
Implements Swift_Mime_Header.
Definition at line 47 of file MailboxHeader.php.
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 164 of file MailboxHeader.php.
References $_mailboxes.
Referenced by getFieldBodyModel(), and getNameAddressStrings().
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 135 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 250 of file MailboxHeader.php.
References _assertValidAddress().
Referenced by setNameAddresses().
removeAddresses | ( | $addresses | ) |
Remove one or more addresses from this Header.
string|string[] | $addresses |
Definition at line 211 of file MailboxHeader.php.
References Swift_Mime_Headers_AbstractHeader\setCachedValue().
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 189 of file MailboxHeader.php.
References setNameAddresses().
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 61 of file MailboxHeader.php.
References setNameAddresses().
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 104 of file MailboxHeader.php.
References normalizeMailboxes(), and Swift_Mime_Headers_AbstractHeader\setCachedValue().
Referenced by setAddresses(), and setFieldBodyModel().
|
protected |
Redefine the encoding requirements for mailboxes.
Commas and semicolons are used to separate multiple addresses, and should therefore be encoded
string | $token |
Definition at line 309 of file MailboxHeader.php.
|
private |
Definition at line 23 of file MailboxHeader.php.
Referenced by getNameAddresses().