Public Member Functions | Protected Attributes

Zend_Mail_Storage_Abstract Class Reference

Inheritance diagram for Zend_Mail_Storage_Abstract:
Zend_Mail_Storage_Imap Zend_Mail_Storage_Maildir Zend_Mail_Storage_Mbox Zend_Mail_Storage_Pop3 Zend_Mail_Storage_Folder_Maildir Zend_Mail_Storage_Folder_Mbox Zend_Mail_Storage_Writable_Maildir

Public Member Functions

 __get ($var)
 getCapabilities ()
 countMessages ()
 getSize ($id=0)
 getMessage ($id)
 getRawHeader ($id, $part=null, $topLines=0)
 getRawContent ($id, $part=null)
 __construct ($params)
 __destruct ()
 close ()
 noop ()
 removeMessage ($id)
 getUniqueId ($id=null)
 getNumberByUniqueId ($id)
 count ()
 offsetExists ($id)
 offsetGet ($id)
 offsetSet ($id, $value)
 offsetUnset ($id)
 rewind ()
 current ()
 key ()
 next ()
 valid ()
 seek ($pos)

Protected Attributes

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

Detailed Description

Definition at line 31 of file Abstract.php.


Constructor & Destructor Documentation

__construct ( params ) [abstract]
__destruct (  )

Destructor calls close() and therefore closes the resource.

Definition at line 159 of file Abstract.php.


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

Reimplemented in Zend_Mail_Storage_Pop3.

Definition at line 75 of file Abstract.php.

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

Reimplemented in Zend_Mail_Storage_Imap, Zend_Mail_Storage_Maildir, Zend_Mail_Storage_Mbox, and Zend_Mail_Storage_Pop3.

count (  )

Countable::count()

Returns:
int

Definition at line 218 of file Abstract.php.

countMessages (  ) [abstract]

Count messages messages in current box/folder

Returns:
int number of messages
Exceptions:
Zend_Mail_Storage_Exception

Reimplemented in Zend_Mail_Storage_Mbox, and Zend_Mail_Storage_Pop3.

current (  )

Iterator::current()

Returns:
Zend_Mail_Message current message

Definition at line 305 of file Abstract.php.

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

Definition at line 95 of file Abstract.php.

getMessage ( id ) [abstract]

Get a message with headers and body

Parameters:
$idint number of message
Returns:
Zend_Mail_Message

Reimplemented in Zend_Mail_Storage_Imap, Zend_Mail_Storage_Maildir, Zend_Mail_Storage_Mbox, and Zend_Mail_Storage_Pop3.

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

Reimplemented in Zend_Mail_Storage_Imap, Zend_Mail_Storage_Maildir, Zend_Mail_Storage_Mbox, and Zend_Mail_Storage_Pop3.

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

Reimplemented in Zend_Mail_Storage_Imap, Zend_Mail_Storage_Maildir, Zend_Mail_Storage_Mbox, and Zend_Mail_Storage_Pop3.

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

Reimplemented in Zend_Mail_Storage_Imap, Zend_Mail_Storage_Maildir, Zend_Mail_Storage_Mbox, and Zend_Mail_Storage_Pop3.

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)

Reimplemented in Zend_Mail_Storage_Imap, Zend_Mail_Storage_Maildir, Zend_Mail_Storage_Mbox, and Zend_Mail_Storage_Pop3.

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

Reimplemented in Zend_Mail_Storage_Imap, Zend_Mail_Storage_Maildir, Zend_Mail_Storage_Mbox, and Zend_Mail_Storage_Pop3.

key (  )

Iterator::key()

Returns:
int id of current position

Definition at line 316 of file Abstract.php.

next (  )

Iterator::next()

Returns:
void

Definition at line 327 of file Abstract.php.

noop (  ) [abstract]

Keep the resource alive.

Returns:
null

Reimplemented in Zend_Mail_Storage_Imap, Zend_Mail_Storage_Maildir, Zend_Mail_Storage_Mbox, and Zend_Mail_Storage_Pop3.

offsetExists ( id )

ArrayAccess::offsetExists()

Parameters:
int$id
Returns:
boolean

Definition at line 230 of file Abstract.php.

offsetGet ( id )

ArrayAccess::offsetGet()

Parameters:
int$id
Returns:
Zend_Mail_Message message object

Definition at line 248 of file Abstract.php.

offsetSet ( id,
value 
)

ArrayAccess::offsetSet()

Parameters:
id$id
mixed$value
Exceptions:
Zend_Mail_Storage_Exception
Returns:
void

See also:
Zend_Mail_Storage_Exception

Definition at line 262 of file Abstract.php.

offsetUnset ( id )

ArrayAccess::offsetUnset()

Parameters:
int$id
Returns:
boolean success

Definition at line 278 of file Abstract.php.

removeMessage ( id ) [abstract]

delete a message from current box/folder

Returns:
null

Reimplemented in Zend_Mail_Storage_Imap, Zend_Mail_Storage_Maildir, Zend_Mail_Storage_Mbox, Zend_Mail_Storage_Pop3, and Zend_Mail_Storage_Writable_Maildir.

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

Definition at line 293 of file Abstract.php.

seek ( pos )

SeekableIterator::seek()

Parameters:
int$pos
Returns:
void
Exceptions:
OutOfBoundsException

Definition at line 354 of file Abstract.php.

valid (  )

Iterator::valid()

Returns:
boolean

Definition at line 338 of file Abstract.php.


Field Documentation

$_has [protected]
Initial value:
 array('uniqueid'  => true,
                            'delete'    => false,
                            'create'    => false,
                            'top'       => false,
                            'fetchPart' => true,
                            'flags'     => false)

Definition at line 37 of file Abstract.php.


The documentation for this class was generated from the following file: