Path

ez components / documentation / api reference / 2009.2 / mail


eZ Components 2009.2

Mail: ezcMailParserOptions

[ Tutorial ] [ Display example ] [ Mail listing example ] [ Rfcs ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcMailParserOptions

Class containing the basic options for the mail parser. [source]
Example of how to use the parser options:
 1.  $options new ezcMailParserOptions();
 2.  $options->mailClass 'myCustomMailClass'// extends ezcMail
 3.  $options->fileClass 'myCustomFileClass'// extends ezcMailFile
 4.  $options->parseTextAttachmentsAsFiles true// to get the text attachments in ezcMailFile objects
 5.  
 6.  $parser new ezcMailParser$options );
Another way to specify the options is:
 1.  $parser new ezcMailParser();
 2.  $parser->options->mailClass 'myCustomMailClass'// extends ezcMail
 3.  $parser->options->fileClass 'myCustomFileClass'// extends ezcMailFile
 4.  $parser->options->parseTextAttachmentsAsFiles true;

Parents

ezcBaseOptions
   |
   --ezcMailParserOptions

Properties

string read/write  $fileClass
Specifies a class descending from ezcMailFile which can be instanciated by the parser to handle file attachments. The default value is ezcMailFile.
string read/write  $mailClass
Specifies a class descending from ezcMail which can be returned by the parser if you plan to use another class instead of ezcMail. The default value is ezcMail.
string read/write  $parseTextAttachmentsAsFiles
Specifies whether to parse the text attachments in an ezcMailTextPart (default) or in an ezcMailFile (by setting the option to true).

Inherited Member Variables

From ezcBaseOptions:
protected  ezcBaseOptions::$properties

Method Summary

public ezcMailParserOptions __construct( [$options = array()] )
Constructs an object with the specified values.

Inherited Methods

From ezcBaseOptions :
public ezcBaseOptions ezcBaseOptions::__construct()
Construct a new options object.
public void ezcBaseOptions::merge()
Merge an array into the actual options object.
public bool ezcBaseOptions::offsetExists()
Returns if an option exists.
public mixed ezcBaseOptions::offsetGet()
Returns an option value.
public void ezcBaseOptions::offsetSet()
Set an option.
public void ezcBaseOptions::offsetUnset()
Unset an option.

Methods

__construct

ezcMailParserOptions __construct( [ $options = array()] )
Constructs an object with the specified values.

Parameters

Name Type Description
$options array(string=>mixed)  

Throws

ClassDescription
ezcBaseValueException if $options contains a property with a value not allowed
ezcBasePropertyNotFoundException if $options contains a property not defined

Redefinition of

Method Description
ezcBaseOptions::__construct() Construct a new options object.

Last updated: Mon, 21 Dec 2009