Zend\Mail\Storage\Mbox
Synopsis
class Mbox
extends AbstractStorage
{
- // members
- protected null|resource $fh;
- protected string $filename;
- protected int $filemtime;
- protected array $positions;
- protected string $messageClass;
- // Inherited members from AbstractStorage
- protected array $has;
- protected integer $iterationPos;
- protected null|int $iterationMax;
- protected string $messageClass;
- // methods
- public int countMessages()
- public int|array getSize()
- protected array getPos()
- public File getMessage()
- public void getRawHeader()
- public void getRawContent()
- public void __construct()
- protected bool isMboxFile()
- protected void openMboxFile()
- public void close()
- public bool noop()
- public void removeMessage()
- public array|string getUniqueId()
- public int getNumberByUniqueId()
- public array __sleep()
- public void __wakeup()
- // Inherited methods from AbstractStorage
- public bool __get()
- public array getCapabilities()
- public abstract int countMessages()
- public abstract int|array getSize()
- public abstract Message getMessage()
- public abstract string getRawHeader()
- public abstract string getRawContent()
- public abstract void __construct()
- public void __destruct()
- public abstract void close()
- public abstract void noop()
- public abstract void removeMessage()
- public abstract array|string getUniqueId()
- public abstract int getNumberByUniqueId()
- public int count()
- public bool offsetExists()
- public Message offsetGet()
- public void offsetSet()
- public bool offsetUnset()
- public void rewind()
- public Message current()
- public int key()
- public void next()
- public bool valid()
- public void seek()
Hierarchy
Tasks
Line | Task |
---|---|
106 | that's ugly, would be better to let the message class decide |
109 | top/body lines |
115 | need a way to change that |
142 | implement |
146 | toplines |
162 | implement |
Members
protected
- $fh
—
Zend\Mail\Storage\null|resource
file handle to mbox file - $filemtime
—
int
modification date of mbox file for __wakeup - $filename
—
string
filename of mbox file for __wakeup - $has
—
array
class capabilities with default values - $iterationMax
—
Zend\Mail\Storage\null|int
maximum iteration position (= message count) - $iterationPos
—
int
current iteration position - $messageClass
—
string
used message class, change it in an extended class to extend the returned message class - $messageClass
—
string
used message class, change it in an extended class to extend the returned message class - $positions
—
array
start and end position of messages as array('start' => start, 'separator' => headersep, 'end' => end)
Methods
protected
- getPos() — Get positions for mail message or throw exception if id is invalid
- isMboxFile() — check if given file is a mbox file
- openMboxFile() — open given file as current mbox file
public
- __construct() — Create instance with parameters Supported parameters are: - filename filename of mbox file
- __sleep() — magic method for serialize()
- __wakeup() — magic method for unserialize()
- close() — Close resource for mail lib. If you need to control, when the resource is closed. Otherwise the destructor would call this.
- countMessages() — Count messages all messages in current box
- getMessage() — Fetch a message
- getNumberByUniqueId() — get a message number from a unique id
- getRawContent()
- getRawHeader()
- getSize() — Get a list of messages with number and size
- getUniqueId() — get unique id for one or all messages
- noop() — Waste some CPU cycles doing nothing.
- removeMessage() — stub for not supported message deletion
Inherited from Zend\Mail\Storage\AbstractStorage
public
- __get() — Getter for has-properties. The standard has properties are: hasFolder, hasUniqueid, hasDelete, hasCreate, hasTop
- close() — Close resource for mail lib. If you need to control, when the resource is closed. Otherwise the destructor would call this.
- count() — Countable::count()
- countMessages() — Count messages messages in current box/folder
- current() — Iterator::current()
- getCapabilities() — Get a full list of features supported by the specific mail lib and the server
- getMessage() — Get a message with headers and body
- getNumberByUniqueId() — get a message number from a unique id
- getRawContent() — Get raw content of message or part
- getRawHeader() — Get raw header of message or part
- getSize() — Get a list of messages with number and size
- getUniqueId() — get unique id for one or all messages
- key() — Iterator::key()
- next() — Iterator::next()
- noop() — Keep the resource alive.
- offsetExists() — ArrayAccess::offsetExists()
- offsetGet() — ArrayAccess::offsetGet()
- offsetSet() — ArrayAccess::offsetSet()
- offsetUnset() — ArrayAccess::offsetUnset()
- removeMessage() — delete a message from current box/folder
- rewind() — Iterator::rewind()
- seek() — SeekableIterator::seek()
- valid() — Iterator::valid()