Class Horde_Kolab_IMAP_test

Description

The Horde_Kolab_IMAP_Connection_test class simulates an IMAP server for testing purposes.

$Horde: framework/Kolab_Server/lib/Horde/Kolab/IMAP/test.php,v 1.1.2.4 2009/03/08 05:30:12 wrobel Exp $

Copyright 2007-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Located in /Kolab_Server/lib/Horde/Kolab/IMAP/test.php (line 27)

Horde_Kolab_IMAP
   |
   --Horde_Kolab_IMAP_test
Variable Summary
 string $_connected
 array $_mbox
 array $_mboxname
 string $_user
Method Summary
 mixed appendMessage (string $msg)
 mixed connect (string $login, string $password, [boolean $tls = false])
 mixed copyMessage (integer $uid, string $new_folder)
 mixed create (string $folder)
 string current ()
 mixed delete (string $folder)
 mixed deleteACL (string $folder, string $user)
 mixed deleteMessages (integer $uids)
 mixed disconnect ()
 mixed exists (string $folder)
 mixed expunge ()
 mixed getACL (string $folder)
 mixed getAnnotation (string $entries, string $value, string $mailbox_name)
 mixed getMailboxes ()
 mixed getMessage (integer $uid)
 mixed getMessageBody (integet $uid)
 mixed getMessageHeader (int $uid, [boolean $peek_for_body = true])
 mixed getMyRights (string $folder)
 array getUids ()
 mixed moveMessage (integer $uid, string $new_folder)
 mixed rename (string $old, string $new)
 mixed search (string $search_list, [ $uidSearch = true])
 mixed searchHeaders (string $field, string $value)
 mixed select (string $folder)
 mixed setACL (string $folder, string $user, string $acl)
 mixed setAnnotation (string $entries, array $values, string $mailbox_name)
 array status ()
 mixed undeleteMessages (integer $uid)
 mixed _appendMessage (array $msg)
 void _parseFolder ( $folder)
Variables
string $_connected (line 35)

If we are supposed to be connected this holds the user credentials and some connection details.

array $_mbox = null (line 49)

The data of the mailbox currently opened

array $_mboxname = null (line 56)

The name of the mailbox currently opened

string $_user (line 42)

Login of the current user

Inherited Variables

Inherited from Horde_Kolab_IMAP

Horde_Kolab_IMAP::$_imap
Horde_Kolab_IMAP::$_port
Horde_Kolab_IMAP::$_reuse_detection
Horde_Kolab_IMAP::$_server
Methods
appendMessage (line 551)

Appends a message to the current folder.

  • return: True or a PEAR error in case of an error.
mixed appendMessage (string $msg)
  • string $msg: The message to append.
connect (line 68)

Prepare the dummy server.

  • return: True in case the connection was opened successfully, a PEAR error otherwise.
mixed connect (string $login, string $password, [boolean $tls = false])
  • string $login: The user account name.
  • string $password: The user password.
  • boolean $tls: Should TLS be used for the connection?
copyMessage (line 590)

Copies a message to a new folder.

  • return: True or a PEAR error in case of an error.
mixed copyMessage (integer $uid, string $new_folder)
  • integer $uid: IMAP message id.
  • string $new_folder: Target folder.
create (line 145)

Create the specified folder.

  • return: True in case the operation was successfull, a PEAR error otherwise.
mixed create (string $folder)
  • string $folder: The folder to create.
current (line 724)

Return the currently selected mailbox

  • return: The mailbox currently selected
string current ()
delete (line 170)

Delete the specified folder.

  • return: True in case the operation was successfull, a PEAR error otherwise.
mixed delete (string $folder)
  • string $folder: The folder to delete.
deleteACL (line 523)

Delete the access rights for a user.

  • return: True if successfull, a PEAR error otherwise.
mixed deleteACL (string $folder, string $user)
  • string $folder: The folder that should be modified.
  • string $user: The user that should get the ACLs removed
deleteMessages (line 658)

Deletes messages from the current folder.

  • return: True or a PEAR error in case of an error.
mixed deleteMessages (integer $uids)
  • integer $uids: IMAP message ids.
disconnect (line 88)

Disconnects from the IMAP server.

  • return: True in case the connection was closed successfully, a PEAR error otherwise.
mixed disconnect ()
exists (line 128)

Does the given folder exist?

  • return: True in case the folder exists, false otherwise
mixed exists (string $folder)
  • string $folder: The folder to check.
expunge (line 703)

Expunges messages in the current folder.

  • return: True or a PEAR error in case of an error.
mixed expunge ()
getACL (line 432)

Retrieve the access rights from a folder

  • return: An array of rights if successfull, a PEAR error otherwise.
mixed getACL (string $folder)
  • string $folder: The folder to retrieve the ACLs from.
getAnnotation (line 367)

Fetches the annotation on a folder.

  • return: The annotation value or a PEAR error in case of an error.
mixed getAnnotation (string $entries, string $value, string $mailbox_name)
  • string $entries: The entry to fetch.
  • string $value: The specific value to fetch.
  • string $mailbox_name: The name of the folder.
getMailboxes (line 346)

Retrieves a list of mailboxes on the server.

  • return: The list of mailboxes or a PEAR error in case of an error.
mixed getMailboxes ()
getMessage (line 329)

Retrieves the full message text for a given message id.

  • return: The message text or a PEAR error in case of an error.
mixed getMessage (integer $uid)
  • integer $uid: The message id.
getMessageBody (line 311)

Retrieves the message body for a given message id.

  • return: The message body or a PEAR error in case of an error.
mixed getMessageBody (integet $uid)
  • integet $uid: The message id.
getMessageHeader (line 293)

Retrieves the message headers for a given message id.

  • return: The message header or a PEAR error in case of an error.
mixed getMessageHeader (int $uid, [boolean $peek_for_body = true])
  • int $uid: The message id.
  • boolean $peek_for_body: Prefetch the body.
getMyRights (line 461)

Retrieve the access rights on a folder not owned by the current user

  • return: An array of rights if successfull, a PEAR error otherwise.
mixed getMyRights (string $folder)
  • string $folder: The folder to retrieve the ACLs from.
getUids (line 223)

Returns the message ids of the messages in this folder.

  • return: The message ids.
array getUids ()
moveMessage (line 624)

Moves a message to a new folder.

  • return: True or a PEAR error in case of an error.
mixed moveMessage (integer $uid, string $new_folder)
  • integer $uid: IMAP message id.
  • string $new_folder: Target folder.
rename (line 189)

Rename the specified folder.

  • return: True in case the operation was successfull, a PEAR error otherwise.
mixed rename (string $old, string $new)
  • string $old: The folder to rename.
  • string $new: The new name of the folder.
search (line 245)

Searches the current folder using the given list of search criteria.

  • return: The list of matching message ids or a PEAR error in case of an error.
mixed search (string $search_list, [ $uidSearch = true])
  • string $search_list: A list of search criteria.
  • $uidSearch
searchHeaders (line 280)

Searches the headers of the messages.

  • return: The list of matching message ids or a PEAR error in case of an error.
mixed searchHeaders (string $field, string $value)
  • string $field: The name of the header field.
  • string $value: The value that field should match.
select (line 110)

Opens the given folder.

  • return: True in case the folder was opened successfully, a PEAR error otherwise.
mixed select (string $folder)
  • string $folder: The folder to open
setACL (line 494)

Set the access rights for a folder

  • return: True if successfull, a PEAR error otherwise.
mixed setACL (string $folder, string $user, string $acl)
  • string $folder: The folder to retrieve the ACLs from.
  • string $user: The user to set the ACLs for
  • string $acl: The ACLs
setAnnotation (line 398)

Sets the annotation on a folder.

  • return: True if successfull, a PEAR error otherwise.
mixed setAnnotation (string $entries, array $values, string $mailbox_name)
  • string $entries: The entry to set.
  • array $values: The values to set
  • string $mailbox_name: The name of the folder.
status (line 210)

Returns the status of the current folder.

  • return: An array that contains 'uidvalidity' and 'uidnext'.
array status ()
undeleteMessages (line 685)

Undeletes a message in the current folder.

  • return: True or a PEAR error in case of an error.
mixed undeleteMessages (integer $uid)
  • integer $uid: IMAP message id.
_appendMessage (line 566)

Appends a message to the current folder.

  • return: True or a PEAR error in case of an error.
mixed _appendMessage (array $msg)
  • array $msg: The message to append.
_parseFolder (line 93)
void _parseFolder ( $folder)
  • $folder

Inherited Methods

Inherited From Horde_Kolab_IMAP

 Horde_Kolab_IMAP::Horde_Kolab_IMAP()
 Horde_Kolab_IMAP::factory()
 Horde_Kolab_IMAP::singleton()

Documentation generated on Sun, 30 Jan 2011 05:22:46 +0000 by phpDocumentor 1.4.3