__construct()
__destruct()
__get()
__sleep()
__wakeup()
close()
count()
countMessages()
current()
getCapabilities()
getCurrentFolder()
getFolders()
getMessage()
getNumberByUniqueId()
getRawContent()
getRawHeader()
getSize()
getUniqueId()
key()
next()
noop()
offsetExists()
offsetGet()
offsetSet()
offsetUnset()
removeMessage()
rewind()
seek()
selectFolder()
valid()
_buildFolderTree()
getPos()
isMboxFile()
openMboxFile()
$currentFolder
$fh
$filemtime
$filename
$has
$iterationMax
$iterationPos
$messageClass
$messageEOL
$positions
$rootFolder
$rootdir
__construct(\Zend\Mail\Storage\Folder\$params $params)
Disallowed parameters are: - filename use \Zend\Mail\Storage\Mbox for a single file Supported parameters are: - dirname rootdir of mbox structure - folder intial selected folder, default is 'INBOX'
\Zend\Mail\Storage\Folder\$params
array mail reader specific parameters
\Zend\Mail\Storage\Exception\InvalidArgumentException |
---|
__destruct()
inherited_from | \Zend\Mail\Storage\AbstractStorage::__destruct() |
---|---|
inherited_from | \Zend\Mail\Storage\Mbox::__destruct() |
__get(string $var) : bool
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
inherited_from | \Zend\Mail\Storage\AbstractStorage::__get() |
---|---|
inherited_from | \Zend\Mail\Storage\Mbox::__get() |
string
property name
\Zend\Mail\Storage\Exception\InvalidArgumentException |
---|
bool
supported or not__sleep() : array
with this method you can cache the mbox class
array
name of variables__wakeup()
with this method you can cache the mbox class for cache validation the mtime of the mbox file is used
\Zend\Mail\Storage\Exception\RuntimeException |
---|
close()
If you need to control, when the resource is closed. Otherwise the destructor would call this.
inherited_from | \Zend\Mail\Storage\Mbox::close() |
---|
count() : int
inherited_from | \Zend\Mail\Storage\AbstractStorage::count() |
---|---|
inherited_from | \Zend\Mail\Storage\Mbox::count() |
int
countMessages() : int
inherited_from | \Zend\Mail\Storage\Mbox::countMessages() |
---|
\Zend\Mail\Storage\Exception\ExceptionInterface |
---|
int
number of messagescurrent() : \Zend\Mail\Storage\Message
inherited_from | \Zend\Mail\Storage\AbstractStorage::current() |
---|---|
inherited_from | \Zend\Mail\Storage\Mbox::current() |
\Zend\Mail\Storage\Message
current messagegetCapabilities() : array
inherited_from | \Zend\Mail\Storage\AbstractStorage::getCapabilities() |
---|---|
inherited_from | \Zend\Mail\Storage\Mbox::getCapabilities() |
array
list of features as array(feature_name => true|false[|null])getCurrentFolder() : \Zend\Mail\Storage\Folder
\Zend\Mail\Storage\Exception\ExceptionInterface |
---|
\Zend\Mail\Storage\Folder
instance of current foldergetFolders(string $rootFolder) : \Zend\Mail\Storage\Folder
string
get folder structure for given folder, else root
\Zend\Mail\Storage\Exception\InvalidArgumentException |
---|
\Zend\Mail\Storage\Folder
root or wanted foldergetMessage(int $id) : \Zend\Mail\Storage\Message\File
inherited_from | \Zend\Mail\Storage\Mbox::getMessage() |
---|
int
number of message
\Zend\Mail\Storage\Exception\ExceptionInterface |
---|
getNumberByUniqueId(string $id) : int
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()
inherited_from | \Zend\Mail\Storage\Mbox::getNumberByUniqueId() |
---|
string
unique id
\Zend\Mail\Storage\Exception\ExceptionInterface |
---|
int
message numbergetRawContent(int $id, null | array | string $part) : string
inherited_from | \Zend\Mail\Storage\Mbox::getRawContent() |
---|
int
number of message
nullarraystring
path to part or null for message content
string
raw contentgetRawHeader(int $id, null | array | string $part, int $topLines) : string
inherited_from | \Zend\Mail\Storage\Mbox::getRawHeader() |
---|
int
number of message
nullarraystring
path to part or null for message header
int
include this many lines with header (after an empty line)
string
raw headergetSize(int | null $id) : int | array
inherited_from | \Zend\Mail\Storage\Mbox::getSize() |
---|
intnull
number of message or null for all messages
int
array
size of given message of list with all messages as array(num => size)getUniqueId(int | null $id) : array | string
Mbox does not support unique ids (yet) - it's always the same as the message number. That shouldn't be a problem, because we can't change mbox files. Therefor the message number is save enough.
inherited_from | \Zend\Mail\Storage\Mbox::getUniqueId() |
---|
intnull
message number
\Zend\Mail\Storage\Exception\ExceptionInterface |
---|
array
string
message number for given message or all messages as arraykey() : int
inherited_from | \Zend\Mail\Storage\AbstractStorage::key() |
---|---|
inherited_from | \Zend\Mail\Storage\Mbox::key() |
int
id of current positionnext()
inherited_from | \Zend\Mail\Storage\AbstractStorage::next() |
---|---|
inherited_from | \Zend\Mail\Storage\Mbox::next() |
noop() : bool
inherited_from | \Zend\Mail\Storage\Mbox::noop() |
---|
bool
always return trueoffsetExists(int $id) : bool
inherited_from | \Zend\Mail\Storage\AbstractStorage::offsetExists() |
---|---|
inherited_from | \Zend\Mail\Storage\Mbox::offsetExists() |
int
bool
offsetGet(int $id) : \Zend\Mail\Storage\Message
inherited_from | \Zend\Mail\Storage\AbstractStorage::offsetGet() |
---|---|
inherited_from | \Zend\Mail\Storage\Mbox::offsetGet() |
int
\Zend\Mail\Storage\Message
message objectoffsetSet(mixed $id, mixed $value)
inherited_from | \Zend\Mail\Storage\AbstractStorage::offsetSet() |
---|---|
inherited_from | \Zend\Mail\Storage\Mbox::offsetSet() |
mixed
mixed
\Zend\Mail\Storage\Exception\RuntimeException |
---|
offsetUnset(int $id) : bool
inherited_from | \Zend\Mail\Storage\AbstractStorage::offsetUnset() |
---|---|
inherited_from | \Zend\Mail\Storage\Mbox::offsetUnset() |
int
bool
successremoveMessage($id)
inherited_from | \Zend\Mail\Storage\Mbox::removeMessage() |
---|
\Zend\Mail\Storage\Exception\RuntimeException |
---|
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.
inherited_from | \Zend\Mail\Storage\AbstractStorage::rewind() |
---|---|
inherited_from | \Zend\Mail\Storage\Mbox::rewind() |
seek(int $pos)
inherited_from | \Zend\Mail\Storage\AbstractStorage::seek() |
---|---|
inherited_from | \Zend\Mail\Storage\Mbox::seek() |
int
\Zend\Mail\Storage\Exception\OutOfBoundsException |
---|
selectFolder(\Zend\Mail\Storage\Folder | string $globalName)
valid() : bool
inherited_from | \Zend\Mail\Storage\AbstractStorage::valid() |
---|---|
inherited_from | \Zend\Mail\Storage\Mbox::valid() |
bool
_buildFolderTree(string $currentDir, \Zend\Mail\Storage\Folder | null $parentFolder, string $parentGlobalName)
Result is save in \Zend\Mail\Storage\Folder instances with the root in $this->rootFolder. $parentFolder and $parentGlobalName are only used internally for recursion.
string
call with root dir, also used for recursion.
string
used for recursion
\Zend\Mail\Storage\Exception\InvalidArgumentException |
---|
getPos(int $id) : array
inherited_from | \Zend\Mail\Storage\Mbox::getPos() |
---|
int
number of message
\Zend\Mail\Storage\Exception\InvalidArgumentException |
---|
array
positions as in positionsisMboxFile(resource | string $file, bool $fileIsString) : bool
if $file is a resource its file pointer is moved after the first line
inherited_from | \Zend\Mail\Storage\Mbox::isMboxFile() |
---|
resourcestring
stream resource of name of file
bool
file is string or resource
bool
file is mbox fileopenMboxFile(string $filename)
inherited_from | \Zend\Mail\Storage\Mbox::openMboxFile() |
---|
string
filename of mbox file
\Zend\Mail\Storage\Exception\RuntimeException |
|
---|---|
\Zend\Mail\Storage\Exception\InvalidArgumentException |
$currentFolder : string
$fh : null | resource
inherited_from | \Zend\Mail\Storage\Mbox::$$fh |
---|
$filemtime : int
inherited_from | \Zend\Mail\Storage\Mbox::$$filemtime |
---|
$filename : string
inherited_from | \Zend\Mail\Storage\Mbox::$$filename |
---|
$has : array
inherited_from | \Zend\Mail\Storage\AbstractStorage::$$has |
---|---|
inherited_from | \Zend\Mail\Storage\Mbox::$$has |
$iterationMax : null | int
inherited_from | \Zend\Mail\Storage\AbstractStorage::$$iterationMax |
---|---|
inherited_from | \Zend\Mail\Storage\Mbox::$$iterationMax |
$iterationPos : int
inherited_from | \Zend\Mail\Storage\AbstractStorage::$$iterationPos |
---|---|
inherited_from | \Zend\Mail\Storage\Mbox::$$iterationPos |
$positions : array
inherited_from | \Zend\Mail\Storage\Mbox::$$positions |
---|
$rootdir : string