Abstract Class Zend_Mail_Storage_Abstract

Description

Implements interfaces:

  • Countable (internal interface)
  • ArrayAccess (internal interface)
  • SeekableIterator (internal interface)

Located in /Mail/Storage/Abstract.php (line 30)


	
			
Direct descendents
Variable Summary
Method Summary
 Zend_Mail_Storage_Abstract __construct (array $params)
 void __destruct ()
 null close ()
 int count ()
 int countMessages ()
 array getCapabilities ()
 int getNumberByUniqueId (string $id)
 string getRawContent (int $id, [null|array|string $part = null])
 string getRawHeader (int $id, [null|array|string $part = null], [int $topLines = 0])
 int|array getSize ([int $id = 0])
 array|string getUniqueId ([int|null $id = null])
 int key ()
 void next ()
 null noop ()
 boolean offsetExists (int $id)
 void offsetSet (id $id, mixed $value)
 boolean offsetUnset (int $id)
 null removeMessage ( $id)
 void rewind ()
 void seek (int $pos)
 boolean valid ()
 bool __get (string $var)
Variables
array $_has = array('uniqueid' => true,
'delete' => false,
'create' => false,
'top' => false,
'fetchPart' => true,
'flags' => false)
(line 36)

class capabilities with default values

  • access: protected
null|int $_iterationMax = null (line 53)

maximum iteration position (= message count)

  • access: protected
int $_iterationPos = 0 (line 47)

current iteration position

  • access: protected
string $_messageClass = 'Zend_Mail_Message' (line 59)

used message class, change it in an extened class to extend the returned message class

  • access: protected
Methods
Constructor __construct (line 148)

Create instance with parameters

  • abstract:
  • throws: Zend_Mail_Storage_Exception
  • access: public
Zend_Mail_Storage_Abstract __construct (array $params)
  • array $params: mail reader specific parameters

Redefined in descendants as:
Destructor __destruct (line 154)

Destructor calls close() and therefore closes the resource.

  • access: public
void __destruct ()
close (line 166)

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

  • abstract:
  • access: public
null close ()

Redefined in descendants as:
  • Zend_Mail_Storage_Imap::close() : Close resource for mail lib. If you need to control, when the resource is closed. Otherwise the destructor would call this.
  • Zend_Mail_Storage_Maildir::close() : Close resource for mail lib. If you need to control, when the resource is closed. Otherwise the destructor would call this.
  • Zend_Mail_Storage_Mbox::close() : Close resource for mail lib. If you need to control, when the resource is closed. Otherwise the destructor would call this.
  • Zend_Mail_Storage_Pop3::close() : Close resource for mail lib. If you need to control, when the resource is closed. Otherwise the destructor would call this.
count (line 213)

Countable::count()

  • access: public
int count ()

Implementation of:
Countable::count
countMessages (line 102)

Count messages messages in current box/folder

  • return: number of messages
  • abstract:
  • throws: Zend_Mail_Storage_Exception
  • access: public
int countMessages ()

Redefined in descendants as:
current (line 296)

Iterator::current()

  • return: current message
  • access: public
Zend_Mail_Message current ()

Implementation of:
SeekableIterator::current
getCapabilities (line 90)

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

  • return: list of features as array(featurename => true|false[|null])
  • access: public
array getCapabilities ()
getMessage (line 120)

Get a message with headers and body

  • abstract:
  • access: public
Zend_Mail_Message getMessage ($id $id)
  • $id $id: int number of message

Redefined in descendants as:
getNumberByUniqueId (line 204)

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

  • return: message number
  • abstract:
  • throws: Zend_Mail_Storage_Exception
  • access: public
int getNumberByUniqueId (string $id)
  • string $id: unique id

Redefined in descendants as:
getRawContent (line 140)

Get raw content of message or part

  • return: raw content
  • abstract:
  • access: public
string getRawContent (int $id, [null|array|string $part = null])
  • int $id: number of message
  • null|array|string $part: path to part or null for messsage content

Redefined in descendants as:
getRawHeader (line 131)

Get raw header of message or part

  • return: raw header
  • abstract:
  • access: public
string getRawHeader (int $id, [null|array|string $part = null], [int $topLines = 0])
  • int $id: number of message
  • null|array|string $part: path to part or null for messsage header
  • int $topLines: include this many lines with header (after an empty line)

Redefined in descendants as:
getSize (line 111)

Get a list of messages with number and size

  • return: size of given message of list with all messages as array(num => size)
  • abstract:
  • access: public
int|array getSize ([int $id = 0])
  • int $id: number of message

Redefined in descendants as:
getUniqueId (line 192)

get unique id for one or all messages

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

  • return: message number for given message or all messages as array
  • abstract:
  • throws: Zend_Mail_Storage_Exception
  • access: public
array|string getUniqueId ([int|null $id = null])
  • int|null $id: message number

Redefined in descendants as:
key (line 307)

Iterator::key()

  • return: id of current position
  • access: public
int key ()

Implementation of:
SeekableIterator::key
next (line 318)

Iterator::next()

  • access: public
void next ()

Implementation of:
SeekableIterator::next
noop (line 174)

Keep the resource alive.

  • abstract:
  • access: public
null noop ()

Redefined in descendants as:
offsetExists (line 225)

ArrayAccess::offsetExists()

  • access: public
boolean offsetExists (int $id)
  • int $id

Implementation of:
ArrayAccess::offsetExists
offsetGet (line 243)

ArrayAccess::offsetGet()

  • return: message object
  • access: public
Zend_Mail_Message offsetGet (int $id)
  • int $id

Implementation of:
ArrayAccess::offsetGet
offsetSet (line 257)

ArrayAccess::offsetSet()

  • throws: Zend_Mail_Storage_Exception
  • access: public
void offsetSet (id $id, mixed $value)
  • id $id
  • mixed $value

Implementation of:
ArrayAccess::offsetSet
offsetUnset (line 269)

ArrayAccess::offsetUnset()

  • return: success
  • access: public
boolean offsetUnset (int $id)
  • int $id

Implementation of:
ArrayAccess::offsetUnset
removeMessage (line 181)

delete a message from current box/folder

  • abstract:
  • access: public
null removeMessage ( $id)
  • $id

Redefined in descendants as:
rewind (line 284)

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.

  • access: public
void rewind ()

Implementation of:
SeekableIterator::rewind
seek (line 345)

SeekableIterator::seek()

  • throws: OutOfBoundsException
  • access: public
void seek (int $pos)
  • int $pos

Implementation of:
SeekableIterator::seek
valid (line 329)

Iterator::valid()

  • access: public
boolean valid ()

Implementation of:
SeekableIterator::valid
__get (line 74)

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

  • return: supported or not
  • throws: Zend_Mail_Storage_Exception
  • access: public
bool __get (string $var)
  • string $var: property name

Redefined in descendants as:
  • Zend_Mail_Storage_Pop3::__get() : Special handling for hasTop and hasUniqueid. The headers of the first message is retrieved if Top wasn't needed/tried yet.

Documentation generated on Sun, 27 May 2007 23:19:46 -0700 by phpDocumentor 1.3.2