ezcMailStorageSet is a wrapper around other mail sets and provides saving of mail sources to files.
Example:
Source for this file: /Mail/src/transports/storage/storage_set.php
Version: | //autogen// |
public ezcMailStorageSet |
__construct(
$set
, $location
)
Constructs a new storage set around the provided set. |
public void |
__destruct(
)
Destructs the set. |
public string |
getNextLine(
)
Returns one line of data from the current mail in the set. |
public array(string) |
getSourceFiles(
)
Returns an array of the filenames holding the sources of the mails in this set. |
public bool |
hasData(
)
Returns whether the set has mails. |
public bool |
nextMail(
)
Moves the set to the next mail and returns true upon success. |
Constructs a new storage set around the provided set.
$location specifies where to save the message sources. This directory MUST exist and must be writable.
Name | Type | Description |
---|---|---|
$set |
ezcMailParserSet | |
$location |
string |
Destructs the set.
Closes any open files.
Returns one line of data from the current mail in the set.
Null is returned if there is no current mail in the set or the end of the mail is reached,
It also writes the line of data to the current file. If the line contains a Message-ID header then the value in the header will be used to rename the file.
Method | Description |
---|---|
ezcMailParserSet::getNextLine() |
Returns one line of data from the current mail in the set including the ending linebreak. |
Returns an array of the filenames holding the sources of the mails in this set.
The format of the returned array is: array( 0 => 'location/filename1', 1 => 'location/filename2',...)
Returns whether the set has mails.
Method | Description |
---|---|
ezcMailParserSet::hasData() |
Returns true if mail data is available for parsing. |
Moves the set to the next mail and returns true upon success.
False is returned if there are no more mail in the set.
Method | Description |
---|---|
ezcMailParserSet::nextMail() |
Moves the set to the next mail and returns true upon success. |