Zend Framework  1.12
Public Member Functions | Protected Attributes | List of all members
Zend_Mail_Storage_Abstract Class Reference

Public Member Functions

 __get ($var)
 Getter for has-properties.
 
 getCapabilities ()
 Get a full list of features supported by the specific mail lib and the server.
 
 countMessages ()
 Count messages messages in current box/folder.
 
 getSize ($id=0)
 Get a list of messages with number and size.
 
 getMessage ($id)
 Get a message with headers and body.
 
 getRawHeader ($id, $part=null, $topLines=0)
 Get raw header of message or part.
 
 getRawContent ($id, $part=null)
 Get raw content of message or part.
 
 __construct ($params)
 Create instance with parameters.
 
 __destruct ()
 Destructor calls close() and therefore closes the resource.
 
 close ()
 Close resource for mail lib.
 
 noop ()
 Keep the resource alive.
 
 removeMessage ($id)
 delete a message from current box/folder
 
 getUniqueId ($id=null)
 get unique id for one or all messages
 
 getNumberByUniqueId ($id)
 get a message number from a unique id
 
 count ()
 Countable::count()
 
 offsetExists ($id)
 ArrayAccess::offsetExists()
 
 offsetGet ($id)
 ArrayAccess::offsetGet()
 
 offsetSet ($id, $value)
 ArrayAccess::offsetSet()
 
 offsetUnset ($id)
 ArrayAccess::offsetUnset()
 
 rewind ()
 Iterator::rewind()
 
 current ()
 Iterator::current()
 
 key ()
 Iterator::key()
 
 next ()
 Iterator::next()
 
 valid ()
 Iterator::valid()
 
 seek ($pos)
 SeekableIterator::seek()
 

Protected Attributes

 $_has
 
 $_iterationPos = 0
 
 $_iterationMax = null
 
 $_messageClass = 'Zend_Mail_Message'
 

Constructor & Destructor Documentation

__construct (   $params)
abstract

Create instance with parameters.

Parameters
array$paramsmail reader specific parameters
Exceptions
Zend_Mail_Storage_Exception
__destruct ( )

Destructor calls close() and therefore closes the resource.

Member Function Documentation

__get (   $var)

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$varproperty name
Returns
bool supported or not
Exceptions
Zend_Mail_Storage_Exception
See Also
Zend_Mail_Storage_Exception
close ( )
abstract

Close resource for mail lib.

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

Returns
null
count ( )

Countable::count()

Returns
int
countMessages ( )
abstract

Count messages messages in current box/folder.

Returns
int number of messages
Exceptions
Zend_Mail_Storage_Exception
current ( )

Iterator::current()

Returns
Zend_Mail_Message current message
getCapabilities ( )

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

Returns
array list of features as array(featurename => true|false[|null])
getMessage (   $id)
abstract

Get a message with headers and body.

Parameters
int$idnumber of message
Returns
Zend_Mail_Message
getNumberByUniqueId (   $id)
abstract

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$idunique id
Returns
int message number
Exceptions
Zend_Mail_Storage_Exception
getRawContent (   $id,
  $part = null 
)
abstract

Get raw content of message or part.

Parameters
int$idnumber of message
null | array | string$partpath to part or null for messsage content
Returns
string raw content
getRawHeader (   $id,
  $part = null,
  $topLines = 0 
)
abstract

Get raw header of message or part.

Parameters
int$idnumber of message
null | array | string$partpath to part or null for messsage header
int$topLinesinclude this many lines with header (after an empty line)
Returns
string raw header
getSize (   $id = 0)
abstract

Get a list of messages with number and size.

Parameters
int$idnumber of message
Returns
int|array size of given message of list with all messages as array(num => size)
getUniqueId (   $id = null)
abstract

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$idmessage number
Returns
array|string message number for given message or all messages as array
Exceptions
Zend_Mail_Storage_Exception
key ( )

Iterator::key()

Returns
int id of current position
next ( )

Iterator::next()

Returns
void
noop ( )
abstract

Keep the resource alive.

Returns
null
offsetExists (   $id)

ArrayAccess::offsetExists()

Parameters
int$id
Returns
boolean
offsetGet (   $id)

ArrayAccess::offsetGet()

Parameters
int$id
Returns
Zend_Mail_Message message object
offsetSet (   $id,
  $value 
)

ArrayAccess::offsetSet()

Parameters
id$id
mixed$value
Exceptions
Zend_Mail_Storage_Exception
Returns
void
See Also
Zend_Mail_Storage_Exception
offsetUnset (   $id)

ArrayAccess::offsetUnset()

Parameters
int$id
Returns
boolean success
removeMessage (   $id)
abstract

delete a message from current box/folder

Returns
null
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.

Returns
void
seek (   $pos)

SeekableIterator::seek()

Parameters
int$pos
Returns
void
Exceptions
OutOfBoundsException
valid ( )

Iterator::valid()

Returns
boolean

Member Data Documentation

$_has
protected
Initial value:
= array('uniqueid' => true,
'delete' => false,
'create' => false,
'top' => false,
'fetchPart' => true,
'flags' => false)
$_iterationMax = null
protected
$_iterationPos = 0
protected
$_messageClass = 'Zend_Mail_Message'
protected