Mail: ezcMailMboxTransport
[ ]
[ Display example ] [ Mail listing example ] [ Rfcs ]
[ ]
[ ]
[ ]
[ ]
Class: ezcMailMboxTransport
|
ezcMailMboxTransport implements mail retrieval from an mbox file. [
source]
The mbox set is constructed from a file pointer and iterates over all the messages in an mbox file.
Member Variables
|
public resource(filepointer) |
$fh
Holds the filepointer to the mbox |
Method Summary
|
public ezcMailMboxTransport |
__construct(
$fileName )
Constructs the ezcMailMboxTransport object |
|
public ezcMailMboxSet |
fetchAll(
)
Returns an ezcMailMboxSet containing all the messages in the mbox. |
|
public ezcMailMboxSet |
fetchByMessageNr(
$number )
Returns an ezcMailMboxSet containing only the $number -th message in the mbox. |
|
public ezcMailMboxSet |
fetchFromOffset(
$offset, [$count = 0] )
Returns an ezcMailMboxSet with $count messages starting from $offset. |
|
public array(int=>int) |
listMessages(
)
This function reads through the whole mbox and returns starting positions of the messages. |
Methods
__construct
ezcMailMboxTransport __construct(
string
$fileName )
Constructs the ezcMailMboxTransport object
Opens the mbox $fileName.
Parameters
| Name |
Type |
Description |
$fileName |
string |
|
Throws
| Class | Description |
ezcBaseFilePermissionException |
if the mbox file could be opened for reading. |
ezcBaseFileNotFoundException |
if the mbox file could not be found. |
fetchAll
Returns an ezcMailMboxSet containing all the messages in the mbox.
fetchByMessageNr
Returns an ezcMailMboxSet containing only the $number -th message in the mbox.
Parameters
| Name |
Type |
Description |
$number |
int |
|
Throws
| Class | Description |
ezcMailNoSuchMessageException |
if the message $number is out of range. |
fetchFromOffset
Returns an ezcMailMboxSet with $count messages starting from $offset.
Fetches $count messages starting from the $offset and returns them as a ezcMailMboxSet. If $count is not specified or if it is 0, it fetches all messages starting from the $offset.
Parameters
| Name |
Type |
Description |
$offset |
int |
|
$count |
int |
|
Throws
| Class | Description |
ezcMailOffsetOutOfRangeException |
if $offset is outside of the existing range of messages. |
ezcMailInvalidLimitException |
if $count is negative. |
listMessages
array(int=>int) listMessages(
)
This function reads through the whole mbox and returns starting positions of the messages.
Last updated: Mon, 21 Dec 2009