API Documentation

Mail/Storage/Maildir.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Mail
subpackage
Storage
version
$Id: Maildir.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Mail_Storage_Maildir

Description

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.

Zend_Mail_Storage_Maildir

Extends from
Zend_Mail_Storage_Abstract
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Mail
subpackage
Storage
Properties
$_messageClass
$_files
$_knownFlags
Methods
countMessages
_getFileData
getSize
getMessage
getRawHeader
getRawContent
__construct
_isMaildir
_openMaildir
_getMaildirFiles
close
noop
removeMessage
getUniqueId
getNumberByUniqueId

Description

Properties

$_files

array $_files = 'array'

data of found message files in maildir dir

Details

$_files
array
visibility
protected
default
array
final
false
static
false

$_knownFlags

array $_knownFlags = 'array'

known flag chars in filenames

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

Details

$_knownFlags
array
visibility
protected
default
array
final
false
static
true

$_messageClass

string $_messageClass = 'Zend_Mail_Message_File'

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

Details

$_messageClass
string
visibility
protected
default
Zend_Mail_Message_File
final
false
static
false

Methods

__construct

__construct( $params $params ) :

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

Arguments
$params
$params
array mail reader specific parameters
Details
visibility
public
final
false
static
false
throws

_getFileData

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

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

Arguments
$id
int
message number
$field
stringnull
wanted field
Output
string|array
wanted field or all fields as array
Details
visibility
protected
final
false
static
false
throws

_getMaildirFiles

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

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

Arguments
$dh
resource
dir handle used for search
$dirname
string
dirname of dir in $dh
$default_flags
array
default flags for given dir
Output
null
Details
visibility
protected
final
false
static
false

_isMaildir

_isMaildir( string $dirname ) : bool

check if a given dir is a valid maildir

Arguments
$dirname
string
name of dir
Output
bool
dir is valid maildir
Details
visibility
protected
final
false
static
false

_openMaildir

_openMaildir( string $dirname ) : null

open given dir as current maildir

Arguments
$dirname
string
name of maildir
Output
null
Details
visibility
protected
final
false
static
false
throws

close

close( ) : void

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

Details
visibility
public
final
false
static
false

countMessages

countMessages(  $flags = null ) : int

Count messages all messages in current box

Arguments
$flags
Output
int
number of messages
Details
visibility
public
final
false
static
false
throws

getMessage

getMessage( int $id ) : Zend_Mail_Message_File

Fetch a message

Arguments
$id
int
number of message
Details
visibility
public
final
false
static
false
throws

getNumberByUniqueId

getNumberByUniqueId( string $id ) : int

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

Arguments
$id
string
unique id
Output
int
message number
Details
visibility
public
final
false
static
false
throws

getRawContent

getRawContent(  $id,  $part = null ) :
Arguments
$id
$part
Details
visibility
public
final
false
static
false

getRawHeader

getRawHeader(  $id,  $part = null,  $topLines = 0 ) :
Arguments
$id
$part
$topLines
Details
visibility
public
final
false
static
false

getSize

getSize( int|null $id = null ) : int|array

Get a list of messages with number and size

Arguments
$id
intnull
number of message or null for all messages
Output
int|array
size of given message of list with all messages as array(num => size)
Details
visibility
public
final
false
static
false
throws

getUniqueId

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

get unique id for one or all messages

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

Arguments
$id
intnull
message number
Output
array|string
message number for given message or all messages as array
Details
visibility
public
final
false
static
false
throws

noop

noop( ) : void

Waste some CPU cycles doing nothing.

Details
visibility
public
final
false
static
false

removeMessage

removeMessage(  $id ) : null

stub for not supported message deletion

Arguments
$id
Output
null
Details
visibility
public
final
false
static
false
throws
Documentation was generated by DocBlox.