Fully Qualified Name: | Laminas\Mail\Storage\AbstractStorage |
Implements: | ArrayAccess, Countable, SeekableIterator |
Name | Description | Defined By |
---|---|---|
__construct() | Create instance with parameters | AbstractStorage |
__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. | AbstractStorage |
count() | Countable::count() | AbstractStorage |
countMessages() | Count messages messages in current box/folder | AbstractStorage |
current() | Iterator::current() | AbstractStorage |
getCapabilities() | Get a full list of features supported by the specific mail lib and the server | AbstractStorage |
getMessage() | Get a message with headers and body | AbstractStorage |
getNumberByUniqueId() | get a message number from a unique id | AbstractStorage |
getRawContent() | Get raw content of message or part | AbstractStorage |
getRawHeader() | Get raw header of message or part | AbstractStorage |
getSize() | Get a list of messages with number and size | AbstractStorage |
getUniqueId() | get unique id for one or all messages | AbstractStorage |
key() | Iterator::key() | AbstractStorage |
next() | Iterator::next() | AbstractStorage |
noop() | Keep the resource alive. | AbstractStorage |
offsetExists() | ArrayAccess::offsetExists() | AbstractStorage |
offsetGet() | ArrayAccess::offsetGet() | AbstractStorage |
offsetSet() | ArrayAccess::offsetSet() | AbstractStorage |
offsetUnset() | ArrayAccess::offsetUnset() | AbstractStorage |
removeMessage() | delete a message from current box/folder | AbstractStorage |
rewind() | Iterator::rewind() | AbstractStorage |
seek() | SeekableIterator::seek() | AbstractStorage |
valid() | Iterator::valid() | AbstractStorage |
Create instance with parameters
Parameter Name | Type | Description |
---|---|---|
$params | array |
Returns:
Destructor calls close() and therefore closes the resource.
Returns:
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 resource for mail lib. If you need to control, when the resource is closed. Otherwise the destructor would call this.
Returns:
Countable::count()
Returns: int
Count messages messages in current box/folder
Returns: int number of messages
Iterator::current()
Returns: \Message current message
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])
Get a message with headers and body
Parameter Name | Type | Description |
---|---|---|
$id | number | |
$id |
Returns: \Message
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
Get raw content of message or part
Parameter Name | Type | Description |
---|---|---|
$id | int | number |
$part | null|array|string | path |
Returns: string raw content
Get raw header of message or part
Parameter Name | Type | Description |
---|---|---|
$id | int | number |
$part | null|array|string | path |
$topLines | int | include |
Returns: string raw header
Get a list of messages with number and size
Parameter Name | Type | Description |
---|---|---|
$id | int | number |
Returns: int|array size of given message of list with all messages as array(num => size)
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
Iterator::key()
Returns: int id of current position
Iterator::next()
Returns:
Keep the resource alive.
Returns:
ArrayAccess::offsetExists()
Parameter Name | Type | Description |
---|---|---|
$id | int |
Returns: bool
ArrayAccess::offsetGet()
Parameter Name | Type | Description |
---|---|---|
$id | int |
Returns: \Laminas\Mail\Storage\Message message object
ArrayAccess::offsetSet()
Parameter Name | Type | Description |
---|---|---|
$id | mixed | |
$value | mixed |
Returns:
ArrayAccess::offsetUnset()
Parameter Name | Type | Description |
---|---|---|
$id | int |
Returns: bool success
delete a message from current box/folder
Parameter Name | Type | Description |
---|---|---|
$id | ||
$id |
Returns:
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:
SeekableIterator::seek()
Parameter Name | Type | Description |
---|---|---|
$pos | int |
Returns:
Iterator::valid()
Returns: bool