Mail/Storage/Abstract.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Mail
- Subpackage
- Storage
- Version
- $Id$
\Zend_Mail_Storage_Abstract
Package: Zend_Mail\Storage- Implements
- Children
- \Zend_Mail_Storage_Pop3
- \Zend_Mail_Storage_Mbox
- \Zend_Mail_Storage_Imap
- \Zend_Mail_Storage_Maildir
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties



array $_has = array('uniqueid' => true, 'delete' => false, 'create' => false, 'top' => false, 'fetchPart' => true, 'flags' => false)class capabilities with default values
Default valuearray('uniqueid' => true, 'delete' => false, 'create' => false, 'top' => false, 'fetchPart' => true, 'flags' => false)Details- Type
- array



null|int $_iterationMax = nullmaximum iteration position (= message count)
Default valuenullDetails- Type
- null | int



int $_iterationPos = 0current iteration position
Default value0Details- Type
- int



string $_messageClass = 'Zend_Mail_Message'used message class, change it in an extened class to extend the returned message class
Default value'Zend_Mail_Message'Details- Type
- string
Methods



__construct(array $params) : voidabstractCreate instance with parameters
Parameters| Name | Type | Description |
|---|
| $params | array | mail reader specific parameters |
|---|
Throws 


__get(string $var) : boolGetter 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
Parameters| Name | Type | Description |
|---|
| $var | string | property name |
|---|
Returns| Type | Description |
|---|
| bool | supported or not |
Throws


countMessages() : intabstractCount messages messages in current box/folder
Returns| Type | Description |
|---|
| int | number of messages |
Throws 


getCapabilities() : arrayGet a full list of features supported by the specific mail lib and the server
Returns| Type | Description |
|---|
| array | list of features as array(featurename => true|false[|null]) |



getMessage(int $id) : \Zend_Mail_MessageabstractGet a message with headers and body
Parameters| Name | Type | Description |
|---|
| $id | int | number of message |
|---|
Returns 


getNumberByUniqueId(string $id) : intabstractget a message number from a unique id
I.e. if you have a webmailer that supports deleting messages you should use unique ids
as parameter and use this method to translate it to message number right before calling removeMessage()
Parameters| Name | Type | Description |
|---|
| $id | string | unique id |
|---|
Returns| Type | Description |
|---|
| int | message number |
Throws


getRawContent(int $id, null | array | string $part = null) : stringabstractGet raw content of message or part
Parameters| Name | Type | Description |
|---|
| $id | int | number of message |
|---|
| $part | null | array | string | path to part or null for messsage content |
|---|
Returns| Type | Description |
|---|
| string | raw content |



getRawHeader(int $id, null | array | string $part = null, int $topLines = 0) : stringabstractGet raw header of message or part
Parameters| Name | Type | Description |
|---|
| $id | int | number of message |
|---|
| $part | null | array | string | path to part or null for messsage header |
|---|
| $topLines | int | include this many lines with header (after an empty line) |
|---|
Returns| Type | Description |
|---|
| string | raw header |



getSize(int $id = 0) : int | arrayabstractGet a list of messages with number and size
Parameters| Name | Type | Description |
|---|
| $id | int | number of message |
|---|
Returns| Type | Description |
|---|
| int | array | size of given message of list with all messages as array(num => size) |



getUniqueId(int | null $id = null) : array | stringabstractget unique id for one or all messages
if storage does not support unique ids it's the same as the message number
Parameters| Name | Type | Description |
|---|
| $id | int | null | message number |
|---|
Returns| Type | Description |
|---|
| array | string | message number for given message or all messages as array |
Throws


offsetExists(int $id) : booleanArrayAccess::offsetExists()
Parameters| Name | Type | Description |
|---|
| $id | int | |
|---|
Returns 


offsetUnset(int $id) : booleanArrayAccess::offsetUnset()
Parameters| Name | Type | Description |
|---|
| $id | int | |
|---|
Returns| Type | Description |
|---|
| boolean | success |