Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcMailMboxTransport

Mail::ezcMailMboxTransport

Class ezcMailMboxTransport

ezcMailMboxTransport implements mail retrieval from an mbox file.

The mbox set is constructed from a file pointer and iterates over all the messages in an mbox file.

Source for this file: /Mail/src/transports/mbox/mbox_transport.php

Version:   //autogen//

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
Exceptions:
Type Description
ezcBaseFilePermissionException if the mbox file could be opened for reading.
ezcBaseFileNotFoundException if the mbox file could not be found.

fetchAll

ezcMailMboxSet fetchAll( )

Returns an ezcMailMboxSet containing all the messages in the mbox.

fetchByMessageNr

ezcMailMboxSet fetchByMessageNr( int $number )

Returns an ezcMailMboxSet containing only the $number -th message in the mbox.

Parameters:
Name Type Description
$number int
Exceptions:
Type Description
ezcMailNoSuchMessageException if the message $number is out of range.

fetchFromOffset

ezcMailMboxSet fetchFromOffset( int $offset , [int $count = 0] )

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
Exceptions:
Type 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.

Documentation generated by phpDocumentor 1.4.3