## Zend_Mail_Storage_Mbox

Description

- license: Zend Framework License version 1.0
- copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Mail/Storage/Mbox.php (line 42)

    Zend_Mail_Storage_Abstract
       |
       --Zend_Mail_Storage_Mbox

Direct descendents

Class | Description
--- | ---
Zend_Mail_Storage_Folder_Mbox |

Variable Summary
null|resource $_fh
int $_filemtime
string $_filename
array $_positions
Method Summary
Zend_Mail_Storage_Mbox __construct ($params $params)
void close ()
int countMessages ()
Zend_Mail_Message getMessage (int $id)
void getRawContent ( $id, [ $part = null])
void getRawHeader ( $id, [ $part = null], [ $topLines = 0])
int|array getSize ([int|null $id = 0])
void noop ()
null removeMessage ( $id)
array _getPos (int $id)
bool _isMboxFile (resource|string $file, [bool $fileIsString = true])
null _openMboxFile (string $filename)
array __sleep ()
null __wakeup ()
Variables
null|resource $_fh (line 48)

file handle to mbox file

- access: protected

int $_filemtime (line 60)

modification date of mbox file for __wakeup

- access: protected

string $_filename (line 54)

filename of mbox file for __wakeup

- access: protected

array $_positions (line 66)

start and end position of messages as array('start' => start, 'seperator' => headersep, 'end' => end)

- access: protected

#### Inherited Variables

Inherited from Zend_Mail_Storage_Abstract

> Zend_Mail_Storage_Abstract::$_has
> Zend_Mail_Storage_Abstract::$_iterationMax
> Zend_Mail_Storage_Abstract::$_iterationPos

Methods
Constructor __construct (line 189)

Create instance with parameters Supported parameters are:

- filename filename of mbox file

- access: public
- throws: Zend_Mail_Storage_Exception

Zend_Mail_Storage_Mbox __construct ($params $params)

- $params $params: array mail reader specific parameters

Redefinition of:

Zend_Mail_Storage_Abstract::__construct()
  Create instance with parameters

Redefined in descendants as:

- Zend_Mail_Storage_Folder_Mbox::__construct() : Create instance with parameters

close (line 286)

Close resource for mail lib. If you need to control, when the resource is closed. Otherwise the destructor would call this.

- access: public

void close ()

Redefinition of:

Zend_Mail_Storage_Abstract::close()
  Close resource for mail lib. If you need to control, when the resource is closed. Otherwise the destructor would call this.

countMessages (line 75)

Count messages all messages in current box

- return: number of messages
- access: public
- throws: Zend_Mail_Storage_Exception

int countMessages ()

Redefinition of:

Zend_Mail_Storage_Abstract::countMessages()
  Count messages messages in current box/folder

getMessage (line 127)

Fetch a message

- access: public
- throws: Zend_Mail_Storage_Exception

Zend_Mail_Message getMessage (int $id)

- int $id: number of message

Redefinition of:

Zend_Mail_Storage_Abstract::getMessage()
  Get a message with headers and body

getRawContent (line 171)

- access: public

void getRawContent ( $id, [ $part = null])

- $id
- $part

Redefinition of:

Zend_Mail_Storage_Abstract::getRawContent()
  Get raw content of message or part

getRawHeader (line 152)

- access: public

void getRawHeader ( $id, [ $part = null], $topLines)

- $id
- $part
- $topLines

Redefinition of:

Zend_Mail_Storage_Abstract::getRawHeader()
  Get raw header of message or part

getSize (line 87)

Get a list of messages with number and size

- return: size of given message of list with all messages as array(num => size)
- access: public

int|array getSize (int|null $id)

- int|null $id: number of message or null for all messages

Redefinition of:

Zend_Mail_Storage_Abstract::getSize()
  Get a list of messages with number and size

noop (line 298)

Waste some CPU cycles doing nothing.

- access: public

void noop ()

Redefinition of:

Zend_Mail_Storage_Abstract::noop()
  Keep the resource alive.

removeMessage (line 310)

stub for not supported message deletion

- access: public
- throws: Zend_Mail_Storage_Exception

null removeMessage ( $id)

- $id

Redefinition of:

Zend_Mail_Storage_Abstract::removeMessage()
  delete a message from current box/folder

_getPos (line 110)

Get positions for mail message or throw exeption if id is invalid

- return: positions as in _positions
- access: protected
- throws: Zend_Mail_Storage_Exception

array _getPos (int $id)

- int $id: number of message

_isMboxFile (line 208)

check if given file is a mbox file

if $file is a resource its file pointer is moved after the first line

- return: file is mbox file
- access: protected

bool _isMboxFile (resource|string $file, [bool $fileIsString = true])

- resource|string $file: stream resource of name of file
- bool $fileIsString: file is string or resource

_openMboxFile (line 240)

open given file as current mbox file

- access: protected
- throws: Zend_Mail_Storage_Exception

null _openMboxFile (string $filename)

- string $filename: filename of mbox file

__sleep (line 322)

magic method for serialize()

with this method you can cache the mbox class

- return: name of variables
- access: public

array __sleep ()

Redefined in descendants as:

- Zend_Mail_Storage_Folder_Mbox::__sleep() : magic method for serialize()

__wakeup (line 336)

magic method for unserialize()

with this method you can cache the mbox class for cache validation the mtime of the mbox file is used

- access: public
- throws: Zend_Mail_Storage_Exception

null __wakeup ()

Redefined in descendants as:

- Zend_Mail_Storage_Folder_Mbox::__wakeup() : magic method for unserialize()

#### Inherited Methods

Inherited From Zend_Mail_Storage_Abstract

> Zend_Mail_Storage_Abstract::__construct()
> Zend_Mail_Storage_Abstract::close()
> Zend_Mail_Storage_Abstract::count()
> Zend_Mail_Storage_Abstract::countMessages()
> Zend_Mail_Storage_Abstract::current()
> Zend_Mail_Storage_Abstract::getCapabilities()
> Zend_Mail_Storage_Abstract::getMessage()
> Zend_Mail_Storage_Abstract::getRawContent()
> Zend_Mail_Storage_Abstract::getRawHeader()
> Zend_Mail_Storage_Abstract::getSize()
> Zend_Mail_Storage_Abstract::key()
> Zend_Mail_Storage_Abstract::next()
> Zend_Mail_Storage_Abstract::noop()
> Zend_Mail_Storage_Abstract::offsetExists()
> Zend_Mail_Storage_Abstract::offsetGet()
> Zend_Mail_Storage_Abstract::offsetSet()
> Zend_Mail_Storage_Abstract::offsetUnset()
> Zend_Mail_Storage_Abstract::removeMessage()
> Zend_Mail_Storage_Abstract::rewind()
> Zend_Mail_Storage_Abstract::seek()
> Zend_Mail_Storage_Abstract::valid()
> Zend_Mail_Storage_Abstract::__destruct()
> Zend_Mail_Storage_Abstract::__get()

Documentation generated on Wed, 21 Feb 2007 11:53:53 -0800 by phpDocumentor 1.3.1