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 = null
maximum iteration position (= message count)
Default valuenull
Details- Type
- null | int
int $_iterationPos = 0
current iteration position
Default value0
Details- 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) : void
abstractCreate instance with parameters
ParametersName | Type | Description |
---|
$params | array | mail reader specific parameters |
---|
Throws __get(string $var) : bool
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
ParametersName | Type | Description |
---|
$var | string | property name |
---|
ReturnsType | Description |
---|
bool | supported or not |
ThrowscountMessages() : int
abstractCount messages messages in current box/folder
ReturnsType | Description |
---|
int | number of messages |
Throws getCapabilities() : array
Get a full list of features supported by the specific mail lib and the server
ReturnsType | Description |
---|
array | list of features as array(featurename => true|false[|null]) |
getMessage(int $id) : \Zend_Mail_Message
abstractGet a message with headers and body
ParametersName | Type | Description |
---|
$id | int | number of message |
---|
Returns getNumberByUniqueId(string $id) : int
abstractget 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()
ParametersName | Type | Description |
---|
$id | string | unique id |
---|
ReturnsType | Description |
---|
int | message number |
ThrowsgetRawContent(int $id, null | array | string $part = null) : string
abstractGet raw content of message or part
ParametersName | Type | Description |
---|
$id | int | number of message |
---|
$part | null | array | string | path to part or null for messsage content |
---|
ReturnsType | Description |
---|
string | raw content |
getRawHeader(int $id, null | array | string $part = null, int $topLines = 0) : string
abstractGet raw header of message or part
ParametersName | 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) |
---|
ReturnsType | Description |
---|
string | raw header |
getSize(int $id = 0) : int | array
abstractGet a list of messages with number and size
ParametersName | Type | Description |
---|
$id | int | number of message |
---|
ReturnsType | Description |
---|
int | array | size of given message of list with all messages as array(num => size) |
getUniqueId(int | null $id = null) : array | string
abstractget unique id for one or all messages
if storage does not support unique ids it's the same as the message number
ParametersName | Type | Description |
---|
$id | int | null | message number |
---|
ReturnsType | Description |
---|
array | string | message number for given message or all messages as array |
ThrowsoffsetExists(int $id) : boolean
ArrayAccess::offsetExists()
ParametersName | Type | Description |
---|
$id | int | |
---|
Returns offsetUnset(int $id) : boolean
ArrayAccess::offsetUnset()
ParametersName | Type | Description |
---|
$id | int | |
---|
ReturnsType | Description |
---|
boolean | success |