## Zend_Mail_Storage_Abstract

Description

Implements interfaces:

- Countable (internal interface)
- ArrayAccess (internal interface)
- SeekableIterator (internal interface)

- abstract:
- 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/Abstract.php (line 30)

Direct descendents

Class | Description
--- | ---
Zend_Mail_Storage_Imap |
Zend_Mail_Storage_Maildir |
Zend_Mail_Storage_Mbox |
Zend_Mail_Storage_Pop3 |

Variable Summary
array $_has
null|int $_iterationMax
int $_iterationPos
Method Summary
Zend_Mail_Storage_Abstract __construct (array $params)
void __destruct ()
null close ()
int count ()
int countMessages ()
Zend_Mail_Message current ()
array getCapabilities ()
Zend_Mail_Message getMessage ($id $id)
string getRawContent (int $id, [null|array|string $part = null])
string getRawHeader (int $id, [null|array|string $part = null], [int $topLines = 0])
int|array getSize ([int $id = 0])
int key ()
void next ()
null noop ()
boolean offsetExists (int $id)
Zend_Mail_Message offsetGet (int $id)
void offsetSet (id $id, mixed $value)
boolean offsetUnset (int $id)
null removeMessage ( $id)
void rewind ()
void seek (int $pos)
boolean valid ()
bool __get (string $var)
Variables
array $_has = array('uniqueid' => false,
'delete' => false,
'create' => false,
'top' => false,
'fetchPart' => true) (line 36)

class capabilities with default values

- access: protected

null|int $_iterationMax = null (line 52)

maximum iteration position (= message count)

- access: protected

int $_iterationPos = 0 (line 46)

current iteration position

- access: protected

Methods
Constructor __construct (line 141)

Create instance with parameters

- access: public
- abstract:
- throws: Zend_Mail_Storage_Exception

Zend_Mail_Storage_Abstract __construct (array $params)

- array $params: mail reader specific parameters

Redefined in descendants as:

- Zend_Mail_Storage_Imap::__construct() : create instance with parameters
- Zend_Mail_Storage_Maildir::__construct() : Create instance with parameters Supported parameters are:
  - dirname dirname of mbox file
- Zend_Mail_Storage_Folder_Maildir::__construct() : Create instance with parameters
- Zend_Mail_Storage_Mbox::__construct() : Create instance with parameters Supported parameters are:
  - filename filename of mbox file
- Zend_Mail_Storage_Folder_Mbox::__construct() : Create instance with parameters
- Zend_Mail_Storage_Pop3::__construct() : create instance with parameters

Destructor __destruct (line 147)

Destructor calls close() and therefore closes the resource.

- access: public

void __destruct ()
close (line 159)

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

- access: public
- abstract:

null close ()

Redefined in descendants as:

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

count (line 184)

Countable::count()

- access: public

int count ()

Implementation of:

Countable::count

countMessages (line 95)

Count messages messages in current box/folder

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

int countMessages ()

Redefined in descendants as:

- Zend_Mail_Storage_Imap::countMessages() : Count messages all messages in current box
- Zend_Mail_Storage_Maildir::countMessages() : Count messages all messages in current box
- Zend_Mail_Storage_Mbox::countMessages() : Count messages all messages in current box
- Zend_Mail_Storage_Pop3::countMessages() : Count messages all messages in current box

current (line 273)

Iterator::current()

- return: current message
- access: public

Zend_Mail_Message current ()

Implementation of:

SeekableIterator::current

getCapabilities (line 83)

Get a full list of features supported by the specific mail lib and the server

- return: list of features as array(featurename => true|false[|null])
- access: public

array getCapabilities ()
getMessage (line 113)

Get a message with headers and body

- access: public
- abstract:

Zend_Mail_Message getMessage ($id $id)

- $id $id: int number of message

Redefined in descendants as:

- Zend_Mail_Storage_Imap::getMessage() : Fetch a message
- Zend_Mail_Storage_Maildir::getMessage() : Fetch a message
- Zend_Mail_Storage_Mbox::getMessage() : Fetch a message
- Zend_Mail_Storage_Pop3::getMessage() : Fetch a message

getRawContent (line 133)

Get raw content of message or part

- return: raw content
- access: public
- abstract:

string getRawContent (int $id, [null|array|string $part = null])

- int $id: number of message
- null|array|string $part: path to part or null for messsage content

Redefined in descendants as:

- Zend_Mail_Storage_Imap::getRawContent()
- Zend_Mail_Storage_Maildir::getRawContent()
- Zend_Mail_Storage_Mbox::getRawContent()
- Zend_Mail_Storage_Pop3::getRawContent()

getRawHeader (line 124)

Get raw header of message or part

- return: raw header
- access: public
- abstract:

string getRawHeader (int $id, [null|array|string $part = null], int $topLines)

- int $id: number of message
- null|array|string $part: path to part or null for messsage header
- int $topLines: include this many lines with header (after an empty line)

Redefined in descendants as:

- Zend_Mail_Storage_Imap::getRawHeader()
- Zend_Mail_Storage_Maildir::getRawHeader()
- Zend_Mail_Storage_Mbox::getRawHeader()
- Zend_Mail_Storage_Pop3::getRawHeader()

getSize (line 104)

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
- abstract:

int|array getSize (int $id)

- int $id: number of message

Redefined in descendants as:

- Zend_Mail_Storage_Imap::getSize() : get a list of messages with number and size
- Zend_Mail_Storage_Maildir::getSize() : Get a list of messages with number and size
- Zend_Mail_Storage_Mbox::getSize() : Get a list of messages with number and size
- Zend_Mail_Storage_Pop3::getSize() : get a list of messages with number and size

key (line 285)

Iterator::key()

- return: id of current position
- access: public

int key ()

Implementation of:

SeekableIterator::key

next (line 297)

Iterator::next()

- access: public

void next ()

Implementation of:

SeekableIterator::next

noop (line 167)

Keep the resource alive.

- access: public
- abstract:

null noop ()

Redefined in descendants as:

- Zend_Mail_Storage_Imap::noop() : Keep the server busy.
- Zend_Mail_Storage_Maildir::noop() : Waste some CPU cycles doing nothing.
- Zend_Mail_Storage_Mbox::noop() : Waste some CPU cycles doing nothing.
- Zend_Mail_Storage_Pop3::noop() : Keep the server busy.

offsetExists (line 197)

ArrayAccess::offsetExists()

- access: public

boolean offsetExists (int $id)

- int $id

Implementation of:

ArrayAccess::offsetExists

offsetGet (line 216)

ArrayAccess::offsetGet()

- return: message object
- access: public

Zend_Mail_Message offsetGet (int $id)

- int $id

Implementation of:

ArrayAccess::offsetGet

offsetSet (line 231)

ArrayAccess::offsetSet()

- access: public
- throws: Zend_Mail_Storage_Exception

void offsetSet (id $id, mixed $value)

- id $id
- mixed $value

Implementation of:

ArrayAccess::offsetSet

offsetUnset (line 244)

ArrayAccess::offsetUnset()

- return: success
- access: public

boolean offsetUnset (int $id)

- int $id

Implementation of:

ArrayAccess::offsetUnset

removeMessage (line 174)

delete a message from current box/folder

- access: public
- abstract:

null removeMessage ( $id)

- $id

Redefined in descendants as:

- Zend_Mail_Storage_Imap::removeMessage() : Remove a message from server. If you're doing that from a web enviroment you should be careful and use a uniqueid as parameter if possible to identify the message.
- Zend_Mail_Storage_Maildir::removeMessage() : stub for not supported message deletion
- Zend_Mail_Storage_Mbox::removeMessage() : stub for not supported message deletion
- Zend_Mail_Storage_Pop3::removeMessage() : Remove a message from server. If you're doing that from a web enviroment you should be careful and use a uniqueid as parameter if possible to identify the message.

rewind (line 260)

Iterator::rewind()

Rewind always gets the new count from the storage. Thus if you use the interfaces and your scripts take long you should use reset() from time to time.

- access: public

void rewind ()

Implementation of:

SeekableIterator::rewind

seek (line 326)

SeekableIterator::seek()

- access: public
- throws: OutOfBoundsException

void seek (int $pos)

- int $pos

Implementation of:

SeekableIterator::seek

valid (line 309)

Iterator::valid()

- access: public

boolean valid ()

Implementation of:

SeekableIterator::valid

__get (line 67)

Getter for has-properties. The standard has properties are: hasFolder, hasUniqueid, hasDelete, hasCreate, hasTop

The valid values for the has-properties are:

- true if a feature is supported
- false if a feature is not supported
- null is it's not yet known or it can't be know if a feature is supported

- return: supported or not
- access: public
- throws: Zend_Mail_Storage_Exception

bool __get (string $var)

- string $var: property name

Redefined in descendants as:

- Zend_Mail_Storage_Pop3::__get() : Special handling for hasTop. The headers of the first message is retrieved if Top wasn't needed/tried yet.

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