1806. Class

1806.1. Zend\Mail\Storage\AbstractStorage

1806.1.1. Methods

1806.1.1.1. __get

__get()

Getter for has-properties. 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
Parameters:string – property name
Throws ExceptionInvalidArgumentException:
 
Return type:bool supported or not

1806.1.1.2. getCapabilities

getCapabilities()

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

Return type:array list of features as array(feature_name => true|false[|null])

1806.1.1.3. countMessages

countMessages()

Count messages messages in current box/folder

Return type:int number of messages
Throws :ExceptionExceptionInterface

1806.1.1.4. getSize

getSize()

Get a list of messages with number and size

Parameters:int – number of message
Return type:int|array size of given message of list with all messages as array(num => size)

1806.1.1.5. getMessage

getMessage()

Get a message with headers and body

Parameters:$id – number of message
Return type:Message

1806.1.1.6. getRawHeader

getRawHeader()

Get raw header of message or part

Parameters:
  • int – number of message
  • null|array|string – path to part or null for message header
  • int – include this many lines with header (after an empty line)
Return type:

string raw header

1806.1.1.7. getRawContent

getRawContent()

Get raw content of message or part

Parameters:
  • int – number of message
  • null|array|string – path to part or null for message content
Return type:

string raw content

1806.1.1.8. __construct

__construct()

Create instance with parameters

Parameters:array – mail reader specific parameters
Throws ExceptionExceptionInterface:
 

1806.1.1.9. __destruct

__destruct()

Destructor calls close() and therefore closes the resource.

1806.1.1.10. close

close()

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

1806.1.1.11. noop

noop()

Keep the resource alive.

1806.1.1.12. removeMessage

removeMessage()

delete a message from current box/folder

Parameters:$id

1806.1.1.13. getUniqueId

getUniqueId()

get unique id for one or all messages

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

Parameters:int|null – message number
Return type:array|string message number for given message or all messages as array
Throws :ExceptionExceptionInterface

1806.1.1.14. getNumberByUniqueId

getNumberByUniqueId()

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

Parameters:string – unique id
Return type:int message number
Throws :ExceptionExceptionInterface

1806.1.1.15. count

count()

Countable::count()

Return type:int

1806.1.1.16. offsetExists

offsetExists()

ArrayAccess::offsetExists()

Parameters:int
Return type:boolean

1806.1.1.17. offsetGet

offsetGet()

ArrayAccess::offsetGet()

Parameters:int
Return type:ZendMailStorageMessage message object

1806.1.1.18. offsetSet

offsetSet()

ArrayAccess::offsetSet()

Parameters:
  • mixed
  • mixed
Throws ExceptionRuntimeException:
 

1806.1.1.19. offsetUnset

offsetUnset()

ArrayAccess::offsetUnset()

Parameters:int
Return type:boolean success

1806.1.1.20. rewind

rewind()

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.

1806.1.1.21. current

current()

Iterator::current()

Return type:Message current message

1806.1.1.22. key

key()

Iterator::key()

Return type:int id of current position

1806.1.1.24. valid

valid()

Iterator::valid()

Return type:bool

1806.1.1.25. seek

seek()

SeekableIterator::seek()

Parameters:int
Throws ExceptionOutOfBoundsException: