Class Maildir

Summary

Fully Qualified Name: Zend\Mail\Storage\Maildir
Extends: AbstractStorage

Description

Methods

Name Description Defined By
__construct() Create instance with parameters Supported parameters are: - dirname dirname of mbox file Maildir
__destruct() Destructor calls close() and therefore closes the resource. AbstractStorage
__get() Getter for has-properties. The standard has properties are: hasFolder, hasUniqueid, hasDelete, hasCreate, hasTop AbstractStorage
close() Close resource for mail lib. If you need to control, when the resource is closed. Otherwise the destructor would call this. Maildir
count() Countable::count() AbstractStorage
countMessages() Count messages all messages in current box Maildir
current() Iterator::current() AbstractStorage
getCapabilities() Get a full list of features supported by the specific mail lib and the server AbstractStorage
getMessage() Fetch a message Maildir
getNumberByUniqueId() get a message number from a unique id Maildir
getRawContent() Maildir
getRawHeader() Maildir
getSize() Get a list of messages with number and size Maildir
getUniqueId() get unique id for one or all messages Maildir
key() Iterator::key() AbstractStorage
next() Iterator::next() AbstractStorage
noop() Waste some CPU cycles doing nothing. Maildir
offsetExists() ArrayAccess::offsetExists() AbstractStorage
offsetGet() ArrayAccess::offsetGet() AbstractStorage
offsetSet() ArrayAccess::offsetSet() AbstractStorage
offsetUnset() ArrayAccess::offsetUnset() AbstractStorage
removeMessage() stub for not supported message deletion Maildir
rewind() Iterator::rewind() AbstractStorage
seek() SeekableIterator::seek() AbstractStorage
valid() Iterator::valid() AbstractStorage

Method Details

__construct()

Create instance with parameters Supported parameters are: - dirname dirname of mbox file

Parameter Name Type Description
array $params mail
$params

Returns:

__destruct()

Destructor calls close() and therefore closes the resource.

Returns:

__get()

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

The valid values for the has-properties are:

Parameter Name Type Description
$var string property

Returns: bool supported or not

close()

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

Returns:

count()

Countable::count()

Returns: int

countMessages()

Count messages all messages in current box

Parameter Name Type Description
$flags mixed

Returns: int number of messages

current()

Iterator::current()

Returns: \Message current message

getCapabilities()

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

Returns: array list of features as array(feature_name => true|false[|null])

getMessage()

Fetch a message

Parameter Name Type Description
$id int number

Returns: \Zend\Mail\Storage\Message\File

getNumberByUniqueId()

get 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()

Parameter Name Type Description
$id string unique

Returns: int message number

getRawContent()

Parameter Name Type Description
$id
$part

Returns: void

getRawHeader()

Parameter Name Type Description
$id
$part
$topLines

Returns: void

getSize()

Get a list of messages with number and size

Parameter Name Type Description
$id int|null number

Returns: int|array size of given message of list with all messages as array(num => size)

getUniqueId()

get unique id for one or all messages

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

Parameter Name Type Description
$id int|null message

Returns: array|string message number for given message or all messages as array

key()

Iterator::key()

Returns: int id of current position

next()

Iterator::next()

Returns:

noop()

Waste some CPU cycles doing nothing.

Returns: bool always return true

offsetExists()

ArrayAccess::offsetExists()

Parameter Name Type Description
$id int

Returns: bool

offsetGet()

ArrayAccess::offsetGet()

Parameter Name Type Description
$id int

Returns: \Zend\Mail\Storage\Message message object

offsetSet()

ArrayAccess::offsetSet()

Parameter Name Type Description
$id mixed
$value mixed

Returns:

offsetUnset()

ArrayAccess::offsetUnset()

Parameter Name Type Description
$id int

Returns: bool success

removeMessage()

stub for not supported message deletion

Parameter Name Type Description
$id
$id

Returns:

rewind()

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.

Returns:

seek()

SeekableIterator::seek()

Parameter Name Type Description
$pos int

Returns:

valid()

Iterator::valid()

Returns: bool

Top