[ Index ]

MailPress 544

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    




/mp-includes/Swiftmailer/classes/Swift/Mime/Headers/ -> MailboxHeader.php (summary)

(no description)

File Size: 354 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Swift_Mime_Headers_MailboxHeader:: (17 methods):

Class: Swift_Mime_Headers_MailboxHeader  - X-Ref

A Mailbox Address MIME Header for something like From or Sender.

__construct($name, Swift_Mime_HeaderEncoder $encoder, Swift_Mime_Grammar $grammar)   X-Ref
Creates a new MailboxHeader with $name.

param: string                   $name    of Header
param: Swift_Mime_HeaderEncoder $encoder
param: Swift_Mime_Grammar       $grammar

getFieldType()   X-Ref
Get the type of Header that this instance represents.

return: int

setFieldBodyModel($model)   X-Ref
Set the model for the field body.

This method takes a string, or an array of addresses.

param: mixed $model

getFieldBodyModel()   X-Ref
Get the model for the field body.

This method returns an associative array like {@link getNameAddresses()}

return: array

setNameAddresses($mailboxes)   X-Ref
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).
//Sets two mailboxes in the Header, one with a personal name
'chris@swiftmailer.org' => 'Chris Corbyn',
'mark@swiftmailer.org' //No associated personal name

param: string|string[] $mailboxes

getNameAddressStrings()   X-Ref
Get the full mailbox list of this Header as an array of valid RFC 2822 strings.

$header = new Swift_Mime_Headers_MailboxHeader('From',
array('chris@swiftmailer.org' => 'Chris Corbyn',
'mark@swiftmailer.org' => 'Mark Corbyn')
// array (
// 0 => Chris Corbyn <chris@swiftmailer.org>,
// 1 => Mark Corbyn <mark@swiftmailer.org>
// )

return: string[]

getNameAddresses()   X-Ref
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).
$header = new Swift_Mime_Headers_MailboxHeader('From',
array('chris@swiftmailer.org' => 'Chris Corbyn',
'mark@swiftmailer.org' => 'Mark Corbyn')
// array (
// chris@swiftmailer.org => Chris Corbyn,
// mark@swiftmailer.org => Mark Corbyn
// )

return: string[]

setAddresses($addresses)   X-Ref
Makes this Header represent a list of plain email addresses with no names.

//Sets three email addresses as the Header data
array('one@domain.tld', 'two@domain.tld', 'three@domain.tld')

param: string[] $addresses

getAddresses()   X-Ref
Get all email addresses in this Header.

return: string[]

removeAddresses($addresses)   X-Ref
Remove one or more addresses from this Header.

param: string|string[] $addresses

getFieldBody()   X-Ref
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 {@link toString()} for that).

return: string

normalizeMailboxes(array $mailboxes)   X-Ref
Normalizes a user-input list of mailboxes into consistent key=>value pairs.

param: string[] $mailboxes
return: string[]

createDisplayNameString($displayName, $shorten = false)   X-Ref
Produces a compliant, formatted display-name based on the string given.

param: string $displayName as displayed
param: bool   $shorten     the first line to make remove for header name
return: string

createMailboxListString(array $mailboxes)   X-Ref
Creates a string form of all the mailboxes in the passed array.

param: string[] $mailboxes
return: string

tokenNeedsEncoding($token)   X-Ref
Redefine the encoding requirements for mailboxes.

Commas and semicolons are used to separate
multiple addresses, and should therefore be encoded

param: string $token
return: bool

_createNameAddressStrings(array $mailboxes)   X-Ref
Return an array of strings conforming the the name-addr spec of RFC 2822.

param: string[] $mailboxes
return: string[]

_assertValidAddress($address)   X-Ref
Throws an Exception if the address passed does not comply with RFC 2822.

param: string $address

Generated: Thu Apr 28 18:38:52 2016 Cross-referenced by PHPXref 0.7.1