\Swift_Mime_Headers_MailboxHeader
A Mailbox Address MIME Header for something like From or Sender.
- Author: Chris Corbyn
Synopsis
class Swift_Mime_Headers_MailboxHeader
extends Swift_Mime_Headers_AbstractHeader
{
- // members
- private array $_mailboxes;
- // methods
- public void __construct()
- public int getFieldType()
- public void setFieldBodyModel()
- public array getFieldBodyModel()
- public void setNameAddresses()
- public array getNameAddressStrings()
- public array getNameAddresses()
- public void setAddresses()
- public array getAddresses()
- public void removeAddresses()
- public string getFieldBody()
- protected array normalizeMailboxes()
- protected string createDisplayNameString()
- protected string createMailboxListString()
- protected boolean tokenNeedsEncoding()
- private array _createNameAddressStrings()
- private void _assertValidAddress()
- // Inherited methods from Swift_Mime_Headers_AbstractHeader
- public void __construct()
- public void setCharset()
- public string getCharset()
- public void setLanguage()
- public string getLanguage()
- public void setEncoder()
- public Swift_Mime_HeaderEncoder getEncoder()
- public void setGrammar()
- public Swift_Mime_Grammar getGrammar()
- public string getFieldName()
- public void setMaxLineLength()
- public int getMaxLineLength()
- public string toString()
- public string __toString()
- protected void setFieldName()
- protected string createPhrase()
- protected string encodeWords()
- protected boolean tokenNeedsEncoding()
- protected array getEncodableWordTokens()
- protected string getTokenAsEncodedWord()
- protected array generateTokenLines()
- protected void setCachedValue()
- protected string getCachedValue()
- protected void clearCachedValueIf()
- protected array toTokens()
Hierarchy
Constants
Name | Value |
---|---|
TYPE_TEXT | 2 |
TYPE_PARAMETERIZED | 6 |
TYPE_MAILBOX | 8 |
TYPE_DATE | 16 |
TYPE_ID | 32 |
TYPE_PATH | 64 |
Members
private
- $_mailboxes
—
array
The mailboxes used in this Header.
Methods
private
- _assertValidAddress() — Throws an Exception if the address passed does not comply with RFC 2822.
- _createNameAddressStrings() — Return an array of strings conforming the the name-addr spec of RFC 2822.
protected
- createDisplayNameString() — Produces a compliant, formatted display-name based on the string given.
- createMailboxListString() — Creates a string form of all the mailboxes in the passed array.
- normalizeMailboxes() — Normalizes a user-input list of mailboxes into consistent key=>value pairs.
- tokenNeedsEncoding() — Redefine the encoding requirements for mailboxes.
public
- __construct() — Creates a new MailboxHeader with $name.
- getAddresses() — Get all email addresses in this Header.
- getFieldBody() — Get the string value of the body in this Header.
- getFieldBodyModel() — Get the model for the field body.
- getFieldType() — Get the type of Header that this instance represents.
- getNameAddressStrings() — Get the full mailbox list of this Header as an array of valid RFC 2822 strings.
- getNameAddresses() — Get all mailboxes in this Header as key=>value pairs.
- removeAddresses() — Remove one or more addresses from this Header.
- setAddresses() — Makes this Header represent a list of plain email addresses with no names.
- setFieldBodyModel() — Set the model for the field body.
- setNameAddresses() — Set a list of mailboxes to be shown in this Header.
Inherited from Swift_Mime_Headers_AbstractHeader
protected
- clearCachedValueIf() — Clear the cached value if $condition is met.
- createPhrase() — Produces a compliant, formatted RFC 2822 'phrase' based on the string given.
- encodeWords() — Encode needed word tokens within a string of input.
- generateTokenLines() — Generates tokens from the given string which include CRLF as individual tokens.
- getCachedValue() — Get the value in the cache.
- getEncodableWordTokens() — Splits a string into tokens in blocks of words which can be encoded quickly.
- getTokenAsEncodedWord() — Get a token as an encoded word for safe insertion into headers.
- setCachedValue() — Set a value into the cache.
- setFieldName() — Set the name of this Header field.
- toTokens() — Generate a list of all tokens in the final header.
- tokenNeedsEncoding() — Test if a token needs to be encoded or not.
public
- __toString() — Returns a string representation of this object.
- getCharset() — Get the character set used in this Header.
- getEncoder() — Get the encoder used for encoding this Header.
- getFieldName() — Get the name of this header (e.g. charset).
- getGrammar() — Get the grammar used for this Header.
- getLanguage() — Get the language used in this Header.
- getMaxLineLength() — Get the maximum permitted length of lines in this Header.
- setCharset() — Set the character set used in this Header.
- setEncoder() — Set the encoder used for encoding the header.
- setGrammar() — Set the grammar used for the header.
- setLanguage() — Set the language used in this Header.
- setMaxLineLength() — Set the maximum length of lines in the header (excluding EOL).
- toString() — Get this Header rendered as a RFC 2822 compliant string.