Mail: ezcMailFileSet
[ ]
[ Display example ] [ Mail listing example ] [ Rfcs ]
[ ]
[ ]
[ ]
[ ]
Class: ezcMailFileSet
|
ezcMailFileSet is an internal class that can be used to parse mail directly from files on disk. [
source]
Implemented Interfaces
Each file should contain only one mail message in RFC822 format. Bad files or non-existing files are ignored.
Example:
1. $set = new ezcMailFileSet( array( 'path/to/mail/rfc822message.mail' ) );
2. $parser = new ezcMailParser();
3. $mail = $parser->parseMail( $set );
Method Summary
|
public ezcMailFileSet |
__construct(
$files )
Constructs a new set that servers the files specified by $files. |
|
public void |
__destruct(
)
Destructs the set. |
|
public string |
getNextLine(
)
Returns one line of data from the current mail in the set. |
|
public bool |
hasData(
)
Returns whether the file set contains files |
|
public bool |
nextMail(
)
Moves the set to the next mail and returns true upon success. |
Methods
__construct
ezcMailFileSet __construct(
$files )
Constructs a new set that servers the files specified by $files.
The set will start on the first file in the the array.
Parameters
| Name |
Type |
Description |
$files |
array(string) |
|
__destruct
void __destruct(
)
Destructs the set.
Closes any open files.
getNextLine
string getNextLine(
)
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,
hasData
bool hasData(
)
Returns whether the file set contains files
nextMail
bool nextMail(
)
Moves the set to the next mail and returns true upon success.
False is returned if there are no more mail in the set.
Last updated: Mon, 21 Dec 2009