Class Zend_Mail_Storage_Imap

Description

Implements interfaces:

Located in /Mail/Storage/Imap.php (line 66)

Zend_Mail_Storage_Abstract
   |
   --Zend_Mail_Storage_Imap
Variable Summary
Method Summary
 Zend_Mail_Storage_Imap __construct (array $params)
 void appendMessage (string $message, [null|string|Zend_Mail_Storage_Folder $folder = null], [null|array $flags = null])
 null close ()
 null copyMessage (int $id, string|Zend_Mail_Storage_Folder $folder)
 int countMessages ()
 null createFolder (string $name, [string|Zend_Mail_Storage_Folder $parentFolder = null])
 Zend_Mail_Storage_Folder getFolders ([string $rootFolder = null])
 int getNumberByUniqueId (string $id)
 void getRawContent ( $id, [ $part = null])
 void getRawHeader ( $id, [ $part = null], [ $topLines = 0])
 int|array getSize ([int $id = 0])
 array|string getUniqueId ([int|null $id = null])
 null noop ()
 null removeFolder (string|Zend_Mail_Storage_Folder $name)
 null removeMessage (int $id)
 null renameFolder (string|Zend_Mail_Storage_Folder $oldName, string $newName)
 null selectFolder (Zend_Mail_Storage_Folder|string $globalName)
 void setFlags (int $id, array $flags)
Variables
static array $_knownFlags = array('\Passed' => Zend_Mail_Storage::FLAG_PASSED,
'\Answered' => Zend_Mail_Storage::FLAG_ANSWERED,
'\Seen' => Zend_Mail_Storage::FLAG_SEEN,
'\Deleted' => Zend_Mail_Storage::FLAG_DELETED,
'\Draft' => Zend_Mail_Storage::FLAG_DRAFT,
'\Flagged' => Zend_Mail_Storage::FLAG_FLAGGED)
(line 88)

imap flags to constants translation

  • access: protected
string $_currentFolder = '' (line 82)

name of current folder

  • access: protected
null|Zend_Mail_Protocol_Imap $_protocol (line 76)

protocol handler

  • access: protected

Inherited Variables

Inherited from Zend_Mail_Storage_Abstract

Zend_Mail_Storage_Abstract::$_has
Zend_Mail_Storage_Abstract::$_iterationMax
Zend_Mail_Storage_Abstract::$_iterationPos
Zend_Mail_Storage_Abstract::$_messageClass
Methods
Constructor __construct (line 201)

create instance with parameters

Supported paramters are

  • user username
  • host hostname or ip address of IMAP server [optional, default = 'localhost']
  • password password for user 'username' [optional, default = '']
  • port port for IMAP server [optional, default = 110]
  • ssl 'SSL' or 'TLS' for secure sockets
  • folder select this folder [optional, default = 'INBOX']

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

Redefinition of:
Zend_Mail_Storage_Abstract::__construct()
Create instance with parameters
appendMessage (line 476)

append a new message to mail storage

  • access: public
void appendMessage (string $message, [null|string|Zend_Mail_Storage_Folder $folder = null], [null|array $flags = null])
  • string $message: message as string or instance of message class
  • null|string|Zend_Mail_Storage_Folder $folder: folder for new message, else current folder is taken
  • null|array $flags: set flags for new message, else a default set is used

Implementation of:
Zend_Mail_Storage_Writable_Interface::appendMessage()
append a new message to mail storage
close (line 238)

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

  • access: public
null close ()

Redefinition of:
Zend_Mail_Storage_Abstract::close()
Close resource for mail lib. If you need to control, when the resource is closed. Otherwise the destructor would call this.
copyMessage (line 500)

copy an existing message

  • access: public
null copyMessage (int $id, string|Zend_Mail_Storage_Folder $folder)

Implementation of:
Zend_Mail_Storage_Writable_Interface::copyMessage()
copy an existing message
countMessages (line 102)

Count messages all messages in current box

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

Redefinition of:
Zend_Mail_Storage_Abstract::countMessages()
Count messages messages in current box/folder
createFolder (line 412)

create a new folder

This method also creates parent folders if necessary. Some mail storages may restrict, which folder may be used as parent or which chars may be used in the folder name

  • access: public
null createFolder (string $name, [string|Zend_Mail_Storage_Folder $parentFolder = null])
  • string $name: global name of folder, local name if $parentFolder is set
  • string|Zend_Mail_Storage_Folder $parentFolder: parent folder for new folder, else root folder is parent

Implementation of:
Zend_Mail_Storage_Writable_Interface::createFolder()
create a new folder
getCurrentFolder (line 396)

get Zend_Mail_Storage_Folder instance for current folder

  • return: instance of current folder
  • throws: Zend_Mail_Storage_Exception
  • access: public
Zend_Mail_Storage_Folder getCurrentFolder ()

Implementation of:
Zend_Mail_Storage_Folder_Interface::getCurrentFolder()
get Zend_Mail_Storage_Folder instance for current folder
getFolders (line 325)

get root folder or given folder

  • return: root or wanted folder
  • throws: Zend_Mail_Protocol_Exception
  • throws: Zend_Mail_Storage_Exception
  • access: public
Zend_Mail_Storage_Folder getFolders ([string $rootFolder = null])
  • string $rootFolder: get folder structure for given folder, else root

Implementation of:
Zend_Mail_Storage_Folder_Interface::getFolders()
get root folder or given folder
getMessage (line 135)

Fetch a message

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

Redefinition of:
Zend_Mail_Storage_Abstract::getMessage()
Get a message with headers and body
getNumberByUniqueId (line 303)

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
  • throws: Zend_Mail_Storage_Exception
  • access: public
int getNumberByUniqueId (string $id)
  • string $id: unique id

Redefinition of:
Zend_Mail_Storage_Abstract::getNumberByUniqueId()
get a message number from a unique id
getRawContent (line 177)
  • access: public
void getRawContent ( $id, [ $part = null])
  • $id
  • $part

Redefinition of:
Zend_Mail_Storage_Abstract::getRawContent()
Get raw content of message or part
getRawHeader (line 158)
  • access: public
void getRawHeader ( $id, [ $part = null], [ $topLines = 0])
  • $id
  • $part
  • $topLines

Redefinition of:
Zend_Mail_Storage_Abstract::getRawHeader()
Get raw header of message or part
getSize (line 120)

get a list of messages with number and size

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

Redefinition of:
Zend_Mail_Storage_Abstract::getSize()
Get a list of messages with number and size
getUniqueId (line 284)

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
  • throws: Zend_Mail_Storage_Exception
  • access: public
array|string getUniqueId ([int|null $id = null])
  • int|null $id: message number

Redefinition of:
Zend_Mail_Storage_Abstract::getUniqueId()
get unique id for one or all messages
noop (line 249)

Keep the server busy.

  • access: public
null noop ()

Redefinition of:
Zend_Mail_Storage_Abstract::noop()
Keep the resource alive.
removeFolder (line 435)

remove a folder

  • access: public
null removeFolder (string|Zend_Mail_Storage_Folder $name)

Implementation of:
Zend_Mail_Storage_Writable_Interface::removeFolder()
remove a folder
removeMessage (line 264)

Remove a message from server. If you're doing that from a web enviroment you should be careful and use a uniqueid as parameter if possible to identify the message.

  • access: public
null removeMessage (int $id)
  • int $id: number of message

Redefinition of:
Zend_Mail_Storage_Abstract::removeMessage()
delete a message from current box/folder
renameFolder (line 456)

rename and/or move folder

The new name has the same restrictions as in createFolder()

  • access: public
null renameFolder (string|Zend_Mail_Storage_Folder $oldName, string $newName)

Implementation of:
Zend_Mail_Storage_Writable_Interface::renameFolder()
rename and/or move folder
selectFolder (line 380)

select given folder

folder must be selectable!

  • throws: Zend_Mail_Protocol_Exception
  • throws: Zend_Mail_Storage_Exception
  • access: public
null selectFolder (Zend_Mail_Storage_Folder|string $globalName)

Implementation of:
Zend_Mail_Storage_Folder_Interface::selectFolder()
select given folder
setFlags (line 517)

set flags for message

NOTE: this method can't set the recent flag.

  • access: public
void setFlags (int $id, array $flags)
  • int $id: number of message
  • array $flags: new flags for message

Implementation of:
Zend_Mail_Storage_Writable_Interface::setFlags()
set flags for message

Inherited Methods

Inherited From Zend_Mail_Storage_Abstract

 Zend_Mail_Storage_Abstract::__construct()
 Zend_Mail_Storage_Abstract::close()
 Zend_Mail_Storage_Abstract::count()
 Zend_Mail_Storage_Abstract::countMessages()
 Zend_Mail_Storage_Abstract::current()
 Zend_Mail_Storage_Abstract::getCapabilities()
 Zend_Mail_Storage_Abstract::getMessage()
 Zend_Mail_Storage_Abstract::getNumberByUniqueId()
 Zend_Mail_Storage_Abstract::getRawContent()
 Zend_Mail_Storage_Abstract::getRawHeader()
 Zend_Mail_Storage_Abstract::getSize()
 Zend_Mail_Storage_Abstract::getUniqueId()
 Zend_Mail_Storage_Abstract::key()
 Zend_Mail_Storage_Abstract::next()
 Zend_Mail_Storage_Abstract::noop()
 Zend_Mail_Storage_Abstract::offsetExists()
 Zend_Mail_Storage_Abstract::offsetGet()
 Zend_Mail_Storage_Abstract::offsetSet()
 Zend_Mail_Storage_Abstract::offsetUnset()
 Zend_Mail_Storage_Abstract::removeMessage()
 Zend_Mail_Storage_Abstract::rewind()
 Zend_Mail_Storage_Abstract::seek()
 Zend_Mail_Storage_Abstract::valid()
 Zend_Mail_Storage_Abstract::__destruct()
 Zend_Mail_Storage_Abstract::__get()

Documentation generated on Sun, 27 May 2007 23:24:52 -0700 by phpDocumentor 1.3.2