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

 Methods

Create instance with parameters Supported parameters are: - dirname rootdir of maildir structure - delim delim char for folder structur, default is '.' - folder intial selected folder, default is 'INBOX'

__construct(array $params) 
inherited_from \Zend_Mail_Storage_Maildir::__construct()

Parameters

$params

array

mail reader specific parameters

Exceptions

\Zend_Mail_Storage_Exception

Create instance with parameters

__construct(array $params) 
Inherited

Parameters

$params

array

mail reader specific parameters

Exceptions

\Zend_Mail_Storage_Exception

Destructor calls close() and therefore closes the resource.

__destruct() 
Inherited

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

__get(string $var) : boolean
Inherited

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
Inherited

Returns

null

Countable::count()

count() : integer
Inherited

Returns

integer

Count messages messages in current box/folder

countMessages() : integer
Inherited

Exceptions

\Zend_Mail_Storage_Exception

Returns

integernumber of messages

Iterator::current()

current() : \Zend_Mail_Message
Inherited

Returns

\Zend_Mail_Messagecurrent message

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

getCapabilities() : array
Inherited

Returns

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

get Zend_Mail_Storage_Folder instance for current folder

getCurrentFolder() : \Zend_Mail_Storage_Folder
inherited_from \Zend_Mail_Storage_Folder_Interface::getCurrentFolder()

Exceptions

\Zend_Mail_Storage_Exception

Returns

\Zend_Mail_Storage_Folderinstance of current folder

get root folder or given folder

getFolders(string $rootFolder = null) : \Zend_Mail_Storage_Folder
inherited_from \Zend_Mail_Storage_Folder_Interface::getFolders()

Parameters

$rootFolder

string

get folder structure for given folder, else root

Exceptions

\Zend_Mail_Storage_Exception

Returns

\Zend_Mail_Storage_Folderroot or wanted folder

Get a message with headers and body

getMessage(integer $id) : \Zend_Mail_Message
Inherited

Parameters

$id

integer

number of message

Returns

\Zend_Mail_Message

get a message number from a unique id

getNumberByUniqueId(string $id) : integer
Inherited

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
Inherited

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
Inherited

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
Inherited

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
Inherited

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
Inherited

Returns

integerid of current position

Iterator::next()

next() : void
Inherited

Keep the resource alive.

noop() : null
Inherited

Returns

null

ArrayAccess::offsetExists()

offsetExists(integer $id) : boolean
Inherited

Parameters

$id

integer

Returns

boolean

ArrayAccess::offsetGet()

offsetGet(integer $id) : \Zend_Mail_Message
Inherited

Parameters

$id

integer

Returns

\Zend_Mail_Messagemessage object

ArrayAccess::offsetSet()

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

Parameters

$id

\id

$value

mixed

Exceptions

\Zend_Mail_Storage_Exception

ArrayAccess::offsetUnset()

offsetUnset(integer $id) : boolean
Inherited

Parameters

$id

integer

Returns

booleansuccess

delete a message from current box/folder

removeMessage($id) : null
Inherited

Parameters

$id

Returns

null

Iterator::rewind()

rewind() : void
Inherited

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
Inherited

Parameters

$pos

integer

Exceptions

\OutOfBoundsException

select given folder

selectFolder(\Zend_Mail_Storage_Folder|string $globalName) : null

folder must be selectable!

inherited_from \Zend_Mail_Storage_Folder_Interface::selectFolder()

Parameters

$globalName

\Zend_Mail_Storage_Folderstring

global name of folder or instance for subfolder

Exceptions

\Zend_Mail_Storage_Exception

Returns

null

Iterator::valid()

valid() : boolean
Inherited

Returns

boolean

find all subfolders and mbox files for folder structure

_buildFolderTree() : null

Result is save in Zend_Mail_Storage_Folder instances with the root in $this->_rootFolder. $parentFolder and $parentGlobalName are only used internally for recursion.

Exceptions

\Zend_Mail_Storage_Exception

Returns

null

Get one or all fields from file structure. Also checks if message is valid

_getFileData(integer $id, string|null $field = null) : string | array
Inherited

Parameters

$id

integer

message number

$field

stringnull

wanted field

Exceptions

\Zend_Mail_Storage_Exception

Returns

stringarraywanted field or all fields as array

find all files in opened dir handle and add to maildir files

_getMaildirFiles(resource $dh, string $dirname, array $default_flags = array()) : null
Inherited

Parameters

$dh

resource

dir handle used for search

$dirname

string

dirname of dir in $dh

$default_flags

array

default flags for given dir

Returns

null

check if a given dir is a valid maildir

_isMaildir(string $dirname) : boolean
Inherited

Parameters

$dirname

string

name of dir

Returns

booleandir is valid maildir

open given dir as current maildir

_openMaildir(string $dirname) : null
Inherited

Parameters

$dirname

string

name of maildir

Exceptions

\Zend_Mail_Storage_Exception

Returns

null

 Properties

 

name of current folder

$_currentFolder : string

Default

 

delim char for subfolders

$_delim : string

Default

 

data of found message files in maildir dir

$_files : array

Default

array()
 

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
 

known flag chars in filenames

$_knownFlags : array

Default

array('D' => \Zend_Mail_Storage::FLAG_DRAFT, 'F' => \Zend_Mail_Storage::FLAG_FLAGGED, 'P' => \Zend_Mail_Storage::FLAG_PASSED, 'R' => \Zend_Mail_Storage::FLAG_ANSWERED, 'S' => \Zend_Mail_Storage::FLAG_SEEN, 'T' => \Zend_Mail_Storage::FLAG_DELETED)
Static

This list has to be in alphabetical order for setFlags()

 

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

$_messageClass : string

Default

'Zend_Mail_Message'
 

Zend_Mail_Storage_Folder root folder for folder structure

$_rootFolder : \Zend_Mail_Storage_Folder

Default

 

rootdir of folder structure

$_rootdir : string

Default