category Zend
package Zend_Mail
subpackage Storage
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Create instance with parameters

__construct(array $params) 

Parameters

$params

array

mail reader specific parameters

Exceptions

\Zend_Mail_Storage_Exception

Destructor calls close() and therefore closes the resource.

__destruct() 

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

__get(string $var) : boolean

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

$var

string

property name

Exceptions

\Zend_Mail_Storage_Exception

Returns

booleansupported or not

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

close() : null

Returns

null

Countable::count()

count() : integer

Returns

integer

Count messages messages in current box/folder

countMessages() : integer

Exceptions

\Zend_Mail_Storage_Exception

Returns

integernumber of messages

Iterator::current()

current() : \Zend_Mail_Message

Returns

\Zend_Mail_Messagecurrent message

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

getCapabilities() : array

Returns

arraylist of features as array(featurename => true|false[|null])

Get a message with headers and body

getMessage(integer $id) : \Zend_Mail_Message

Parameters

$id

integer

number of message

Returns

\Zend_Mail_Message

get a message number from a unique id

getNumberByUniqueId(string $id) : integer

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

$id

string

unique id

Exceptions

\Zend_Mail_Storage_Exception

Returns

integermessage number

Get raw content of message or part

getRawContent(integer $id, null|array|string $part = null) : string

Parameters

$id

integer

number of message

$part

nullarraystring

path to part or null for messsage content

Returns

stringraw content

Get raw header of message or part

getRawHeader(integer $id, null|array|string $part = null, integer $topLines = 0) : string

Parameters

$id

integer

number of message

$part

nullarraystring

path to part or null for messsage header

$topLines

integer

include this many lines with header (after an empty line)

Returns

stringraw header

Get a list of messages with number and size

getSize(integer $id = 0) : integer | array

Parameters

$id

integer

number of message

Returns

integerarraysize of given message of list with all messages as array(num => size)

get unique id for one or all messages

getUniqueId(integer|null $id = null) : array | string

if storage does not support unique ids it's the same as the message number

Parameters

$id

integernull

message number

Exceptions

\Zend_Mail_Storage_Exception

Returns

arraystringmessage number for given message or all messages as array

Iterator::key()

key() : integer

Returns

integerid of current position

Iterator::next()

next() : void

Keep the resource alive.

noop() : null

Returns

null

ArrayAccess::offsetExists()

offsetExists(integer $id) : boolean

Parameters

$id

integer

Returns

boolean

ArrayAccess::offsetGet()

offsetGet(integer $id) : \Zend_Mail_Message

Parameters

$id

integer

Returns

\Zend_Mail_Messagemessage object

ArrayAccess::offsetSet()

offsetSet(\id $id, mixed $value) : void

Parameters

$id

\id

$value

mixed

Exceptions

\Zend_Mail_Storage_Exception

ArrayAccess::offsetUnset()

offsetUnset(integer $id) : boolean

Parameters

$id

integer

Returns

booleansuccess

delete a message from current box/folder

removeMessage($id) : null

Parameters

$id

Returns

null

Iterator::rewind()

rewind() : void

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.

SeekableIterator::seek()

seek(integer $pos) : void

Parameters

$pos

integer

Exceptions

\OutOfBoundsException

Iterator::valid()

valid() : boolean

Returns

boolean

 Properties

 

class capabilities with default values

$_has : array

Default

array('uniqueid' => true, 'delete' => false, 'create' => false, 'top' => false, 'fetchPart' => true, 'flags' => false)
 

maximum iteration position (= message count)

$_iterationMax : null | integer

Default

null
 

current iteration position

$_iterationPos : integer

Default

0
 

used message class, change it in an extened class to extend the returned message class

$_messageClass : string

Default

'Zend_Mail_Message'