File/lib/api.php

Description

IMP external API interface.

This file defines IMP's external API interface. Other applications can interact with IMP through this API.

$Horde: imp/lib/api.php,v 1.94.10.22 2010/02/16 05:51:22 slusarz Exp $

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

Functions
_imp_addUser (line 397)

Adds a set of authentication credentials.

  • return: True on success or a PEAR_Error object on failure.
boolean _imp_addUser (string $userId)
  • string $userId: The userId to add.
_imp_adminDo (line 427)

Private function to perform an admin event.

void _imp_adminDo ( $task,  $params)
  • $task
  • $params
_imp_authCredentials (line 156)

Returns a list of authentication credentials, i.e. server settings that can be specified by the user on the login screen.

  • return: A hash with credentials, suited for the preferences interface.
array _imp_authCredentials ()
_imp_authenticate (line 125)

Tries to authenticate with the mail server and create a mail session.

  • return: True on success, false on failure.
boolean _imp_authenticate (string $userID, array $credentials, [array $params = array()])
  • string $userID: The username of the user.
  • array $credentials: Credentials of the user. Only allowed key: 'password'.
  • array $params: Additional parameters. Only allowed key: 'server'.
_imp_batchCompose (line 258)

Return a list of compose window links.

  • return: The list of links to the message composition screen.
string _imp_batchCompose ([mixed $args = array()], [array $extra = array()])
  • mixed $args: List of lists of arguments to pass to compose.php. If the lists are passed in as strings, they will be parsed as toaddress?subject=foo&cc=ccaddress (mailto-style) strings.
  • array $extra: List of hashes of extra, non-standard arguments to pass to compose.php.
_imp_changeLanguage (line 371)

Performs tasks necessary when the language is changed during the session.

void _imp_changeLanguage ()
_imp_compose (line 240)

Returns a compose window link.

  • return: The link to the message composition screen.
string _imp_compose ([string|array $args = array()], [array $extra = array()])
  • string|array $args: List of arguments to pass to compose.php. If this is passed in as a string, it will be parsed as a toaddress?subject=foo&cc=ccaddress (mailto-style) string.
  • array $extra: Hash of extra, non-standard arguments to pass to compose.php.
_imp_createFolder (line 312)

Creates a new folder.

  • return: The full folder name created on success, an empty string on failure.
string _imp_createFolder (string $folder)
  • string $folder: The UTF7-IMAP encoded name of the folder to create.
_imp_favouriteRecipients (line 352)

Returns the list of favorite recipients.

  • return: A list with the $limit most favourite recipients.
array _imp_favouriteRecipients (integer $limit, [array $filter = array('new', 'forward', 'reply', 'redirect')])
  • integer $limit: Return this number of recipients.
  • array $filter: A list of messages types that should be returned. A value of null returns all message types.
_imp_folderlist (line 282)

Returns the list of folders.

  • return: The list of IMAP folders or false if not available.
array _imp_folderlist ()
_imp_getStream (line 212)

Attempts to authenticate via IMP and return an IMAP stream.

  • return: An IMAP resource on success, false on failure.
mixed _imp_getStream ([string $mailbox = null], [int $flags = 0])
  • string $mailbox: The mailbox name.
  • int $flags: IMAP connection flags.
_imp_perms (line 88)

Returns a list of available permissions.

void _imp_perms ()
_imp_removeUser (line 409)

Deletes a set of authentication credentials.

  • return: True on success or a PEAR_Error object on failure.
boolean _imp_removeUser (string $userId)
  • string $userId: The userId to delete.
_imp_server (line 335)

Returns the currently logged on IMAP server.

  • return: The server hostname. Returns null if the user has not authenticated into IMP yet.
string _imp_server ()
_imp_userList (line 419)

Lists all users in the system.

  • return: The array of userIds, or a PEAR_Error object on failure.
array _imp_userList ()

Documentation generated on Sun, 30 Jan 2011 05:28:08 +0000 by phpDocumentor 1.4.3