Path

ez components / documentation / api reference / 1.0.1 / mail


eZ Components 1.0.1

Mail: ezcMailMultipart

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcMailMultipart

Abstract base class for all multipart types. [source]
This class provides writing functionality that is common for all multipart types. Multiparts will be written to the mail in the order that they are set to the $parts variable.
property boundary The boundary string to use between parts. This string is automatically generated and should only be changed for special requirements.

Parents

ezcMailPart
   |
   --ezcMailMultipart

Descendents

Child Class Description
ezcMailMultipartAlternative ezcMailMultipartAlternative is used to bundle a group of mail parts where only one should be shown.
ezcMailMultipartRelated ezcMailMultipartRelated is intended for mail parts consisting of several inter-related body parts.
ezcMailMultipartMixed The mixed multipart type is used to bundle an ordered list of mail parts.

Member Variables

protected array(ezcMailPart) $parts = array()
An array holding the parts of this multipart.

Method Summary

public ezcMailMultipart __construct( $parts )
Constructs a new ezcMailMultipart with the parts $parts.
public string generateBody( )
Returns the generated body for all multipart types.
protected static string generateBoundary( )
Returns a unique boundary string.
public abstract string multipartType( )
Returns the type of multipart.
public mixed __get( $name )
Returns the property $name.
public void __set( $name, $value )
Sets the property $name to $value.

Inherited Methods

From ezcMailPart :
public void ezcMailPart::appendExcludeHeaders()
The array $headers will be excluded when the headers are generated.
public string ezcMailPart::generate()
Returns the complete mail part including both the header and the body as a string.
public abstract string ezcMailPart::generateBody()
Returns the body of this part as a string.
public string ezcMailPart::generateHeaders()
Returns the headers set for this part as a RFC 822 string.
public string ezcMailPart::getHeader()
Returns the value of the header $name.
public void ezcMailPart::setHeader()
Sets the header $name to the value $value.

Methods

__construct

ezcMailMultipart __construct( $parts )
Constructs a new ezcMailMultipart with the parts $parts.
Subclasses typically accept an arbitrary number of parts in the constructor and pass them along using func_get_args().
$parts should be of the format array(array(ezcMailPart)|ezcMailPart)
Subclasses must call this method in the constructor.

Redefined in descendants as

Method Description
ezcMailMultipartAlternative::__construct() Constructs a new ezcMailMultipartAlternative
ezcMailMultipartRelated::__construct() Constructs a new ezcMailMultipartRelated.
ezcMailMultipartMixed::__construct() Constructs a new ezcMailMultipartMixed

generateBody

string generateBody( )
Returns the generated body for all multipart types.

Redefinition of

Method Description
ezcMailPart::generateBody() Returns the body of this part as a string.

generateBoundary

string generateBoundary( )
Returns a unique boundary string.

multipartType

string multipartType( )
Returns the type of multipart.

Redefined in descendants as

Method Description
ezcMailMultipartAlternative::multipartType() Returns "alternative".
ezcMailMultipartRelated::multipartType() Returns "related".
ezcMailMultipartMixed::multipartType() Returns "mixed".

__get

mixed __get( string $name )
Returns the property $name.

Parameters

Name Type Description
$name string  

Throws

ClassDescription
ezcBasePropertyNotFoundException if the property does not exist.

__set

void __set( string $name, mixed $value )
Sets the property $name to $value.

Parameters

Name Type Description
$name string  
$value mixed  

Throws

ClassDescription
ezcBasePropertyNotFoundException if the property does not exist.

Last updated: Fri, 02 Nov 2007